3 ms·
And then there was Nix(OS). [1] > A big implication of the way that Nix/NixOS stores packages is that there is no /bin, /sbin, /lib, /usr, and so on. Instead a
by Fnoord 7y ago
And then there was Nix(OS). [1]
> A big implication of the way that Nix/NixOS stores packages is that there is no /bin, /sbin, /lib, /usr, and so on. Instead all packages are kept in /nix/store. (The only exception is a symlink /bin/sh to Bash in the Nix store.) Not using ‘global’ directories such as /bin is what allows multiple versions of a package to coexist. Nix does have a /etc to keep system-wide configuration files, but most files in that directory are symlinks to generated files in /nix/store.
[Insert obligatory xkcd quote about competing standards.]
[1] https://nixos.org/nixos/about.html https://nixos.org/nixos/about.html
- saghm 7y ago> The only exception is a symlink /bin/sh to Bash in the Nix store I only briefly tried out Nix a while back, but doesn't /usr/bin/env also exist (to facilitate shebangs)?
- Fnoord 7y agoI run Unstable, not Stable, but yes it exists.
- marcosdumay 7y agoThe idea of Nix is that you have a huge datastore somewhere with views, where a possible view is a Unix OS. So those differences are no more relevant than saying your data is kept on disk sectors too.
- squiggleblaz 7y agoreally? I have only used nix - not nixos - but when I'm using nix, i can tell you, that i don't see a huge datastore somewhere with views. The programs that i use that have been installed with nix just uses exclusively absolute paths. So if bash wants to load up a library, it doesn't say "dearest operating system, please provide me with a convenient version of libdl.so.2". Instead, it says "dearest operating system, please provide me with a convenient version of /nix/store/blahblahblah-glibc-2.27/lib/libdl.so.2". I do have a profile folder, symlinked as ~/.nix-profile where some programs I've specifically requested to install are symlinked, but that's not sufficient and all encompassing - every program there still refers to the hardcoded /nix/store locations. I guess they also launch programs from $PATH. But I've never seen or heard of a pseudo-FHS nix view of the store.
- marcosdumay 7y agoWell, ok, I've only used nixos, so I don't know all the details. But on the case of nix, your view is the set of packages you installed. It can not be a full Unix for obvious reasons, and the dependencies are not part of the view (so the packages themselves are not installed in a normal Unix).