3 ms·
NixOS and nix, by design, do not and can not follow FHS, so I guess they decided to shorten that path while at it. That said, it is possible to use a different
by matrss 3y ago
NixOS and nix, by design, do not and can not follow FHS, so I guess they decided to shorten that path while at it. That said, it is possible to use a different location than /nix/store through chroot/proot/bubblewrap or similar mechanisms and AFAIK the `nix` CLI can do this natively.
- latexr 3y agoPerhaps one of us is misunderstanding the other, but I don’t mean follow FHS for what it installs, I mean doing it only for its root. /opt is exactly the place where you put the “other”. Homebrew (by default on Apple Silicon) does it perfectly well in a self-contained manner that does not need to fudge with the hierarchy.
- matrss 3y agoI understand what you mean, I just made a guess why it was not a priority to follow FHS for its root when it doesn't really follow FHS anywhere else anyway. Also, /nix is self-contained as well, so that is not an advantage to following FHS.
- madjam002 3y agoMoving /nix to another location would require a lot of package authors that make the assumption of /nix/store being a constant to rewrite their packages, an effort that doesn’t really seem worth it.
- takeda 3y agoI don't believe this is a big issue, typically package authors just use $output variable which returns whatever path the package should be stored at. The real reason for it are libraries. The binaries that are packaged in /nix/store very often depend on at least glibc and many other libraries. Their path is hardcoded to /nix/store/... Changing the path would require recompiling, which also means all the caches that were generated would have to be purged and everything would need to be rebuilt. Though in my limited experience I was able to also use a symlink. I got a warning that some thing could break but all things I was interested in continued to work.