4 ms·
It only seems that way now because some platforms have begun locking down their root directories. Nix, by design, doesn't conform to the FHS way of organizing d
by soraminazuki 6y ago
It only seems that way now because some platforms have begun locking down their root directories. Nix, by design, doesn't conform to the FHS way of organizing directories so it made perfect sense to use /nix when the decision was originally made.
- zozbot234 6y ago> Nix, by design, doesn't conform to the FHS way of organizing directories That's why /opt/ exists. What's wrong with /opt/nix/ ? Or /var/opt/nix/ for read-write files that need not be a fixed part of any package installation (the Unix equivalent of system-wide "Application Data").
- soraminazuki 6y agoNix isn't designed as an application. It's designed as a system package manager.
- californical 6y agoIt's also an application, it just happens to manage other applications
- soraminazuki 6y agoTo be more clear, it wasn't designed as a third-party package manager. It's supposed to be part of the system.
- sneak 6y agoOr NIX_PATH, or ~/.nix, et c. I am infinitely tired of this node_modules “we know better than you, it isn’t configurable and will never be configurable so stop asking” hubris. It’s not open source entitlement to say that a maintainer with that attitude is bad and wrong. My homebrew is installed to ~/Library/Homebrew and while they claim it’s unsupported, it works, and if it stops working, then I’ll stop using Homebrew. I don’t trust software that demands root when it doesn’t need it.
- jeremyjh 6y agoYou can use an alternate path with Nix. When you choose to do that, you will have to build all packages from source instead of installing prebuilt binaries.
- sneak 6y agoThat makes sense, and is good news. I withdraw my complaint against Nix; in my defense my ignorance was based on the thread on their GitHub about how Catalina makes Nix basically unusable. Turns out those people were both a) wrong and b) speaking authoritatively from ignorance. :/ I’m quite glad I can just install it somewhere else, and finally ditch the Homebrew spyware. Thank you for letting me know!
- danudey 6y ago> Nix, by design, doesn't conform to the FHS way of organizing directories so it made perfect sense to use /nix when the decision was originally made. Refusing to conform to the FHS doesn't mean their decision made sense; refusing to conform to the FHS means they made a bad decision in the past and everything progressed from there. It doesn't 'seem that way now because some platforms have begun locking down their root directories'; it seems that way because creating arbitrary directories in / is a terrible idea, and has been at least since I started using UNIX/Linux systems in the 90's. Fact is, they made a bad design choice, and now it's come back to bite them (and their users) in the ass.
- matheusmoreira 6y ago> creating arbitrary directories in / is a terrible idea, and has been at least since I started using UNIX/Linux systems in the 90's Why?
- cesarb 6y agoBecause the root directory might be on a very small partition (perhaps only a few hundred megabytes), while other mount points like /usr might have more space; the only things which should be in / are the things which are necessary to mount the other filesystems (perhaps through the network using NFS). (Yes, nowadays hard disks are much larger, we have things like initrd, and we now make /bin and /sbin symlinks to within /usr, but the parent comment did mention the 90s...)
- chungy 6y agoEasy solution: /nix as its own partition with plenty of space.
- mixedCase 6y agoBecause the filesystem root is the domain of the OS, if tomorrow they decide they are going to create a symlink of /dev/null in /nix because they thought it sounded cooler as a way to "nix" stuff, there goes the Nix package manager. The OS gives you places to put your files, use them so that you prevent breakage. We have the FHS, so you even have some degree of certainty of where to do it across Unixes. EDIT: Two downvoted comments answering a "why" but no rebuttal to either. HN is slowly but surely becoming Reddit.