3 ms·
> Snappy, FlatPak, and Nix need to install to a root directory Not sure about Snappy and FlatPak, but Nix can use any directory as its "root"; users can run it
by chriswarbo 10y ago
> Snappy, FlatPak, and Nix need to install to a root directory
Not sure about Snappy and FlatPak, but Nix can use any directory as its "root"; users can run it from somewhere in their home directory without any need for admin rights.
The downsides to doing that, compared to a global /nix directory, are a) waste of disk space if multiple users have Nix running from their home directories and b) having to build stuff locally, since the official binary caches are built with /nix as the root.
Also, there are other distro-agnostic package managers like 0install, Autopackage and Listaller; packagekit is arguably related, as it provides a distro-agnostic abstraction layer; systemd's "portable services" are another recent addition to this space.
- grhmc 10y agoI don't know of anyone running nix with the nix store being in their home directory, as it would require recompiling the entire world and receiving no benefit of the pre-built cache. Much more commonly the user will install a "single-user" mode nix, where the nix store is still located at `/nix/store` (in the root,) where it could possibly be that multiple users share it.
- ghkbrew 10y agoIt does seem to be much less common, but the home directory based nix install is extremely useful if you don't actually have admin rights on the machine. I.e. in basically any institutional system. I have a very handy nix install in my home directory on a university supercomputing cluster. As annoying as it is to have to compile everything it's much better than not having that software at all or having to go though the sys admins to maybe get something installed a month later.