4 ms·
However, Nix requires you to create a /nix directory, which is not possible in some cases.
by whenov 8y ago
However, Nix requires you to create a /nix directory, which is not possible in some cases.
- danieldk 8y agoIt doesn't require it: - You can create the nix store in some directory you own. But this entails recompiling every package, because the precompiled binaries have dependencies on the store being in /nix. - If user namespaces are enabled, you can bind mount /nix to some directory that you own: https://nixos.wiki/wiki/Nix_Installation_Guide https://nixos.wiki/wiki/Nix_Installation_Guide Of course, it is more convenient if you can convince a sysadmin to install multi-user Nix. From there on, every user can install their own packages (in a non-conflicting manner).
- paulnechifor 8y agoI don't think recompilation is required. You can use proot (like chroot) to make a local dir look like "/nix" to subprocesses. I've seen it here (but not tested it): https://gist.github.com/mbbx6spp/4f467adb4e0133063fd87e264c6b9f78 https://gist.github.com/mbbx6spp/4f467adb4e0133063fd87e264c6...
- danieldk 8y agoYes, that's a similar approach to the use of user namespaces that I mentioned, which also doesn't require recompilation. I guess proot also works on systems with user namespaces disabled (which is sometimes done for security reasons).
- whenov 8y agoThat’s good to know, thanks for sharing!