Nix Home Directory Installation Tutorial

I am trying to follow this tutorial to install the Nix package manager in my home directory instead /nix.

I am installing PRoot (see 2. in the tutorial). At the end, the tutorial suggests being smart in the “Creating native packages” section to be able to run packages without PRoot:

To run packages initially (without PRoot), you need to build them from the source, because all paths to the nix repository are hard-coded. It is simple, really:

mkdir $ HOME / nix

nix-channel --update

env NIX_STORE_DIR = $ HOME / nix nix-env -i nix

Your Nix store will now be created using new paths. Embedded binaries can be run right from there.

I did this, but I don’t see how it frees me from PRoot. If I do not execute the installation point /nixusing PRoot, nothing works (there nix-envis no executable file, I can’t install new packages).

Should this environment variable NIX_STORE_DIRbe put in mine .bashrc?

It seems that I always need to run PRoot, because it ~/.nix-profilepoints to a /nix/...:

.nix-profile -> /nix/var/nix/profiles/default

The textbook has more steps (5., 6.) - should they be followed? They seem to apply only when using manual installation (step 4), although it is not explicit.

Any help would be appreciated :)

+4
source share
1 answer

, : Nix root. wiki https://nixos.wiki/wiki/Nix_Installation_Guide. . PRoot , , , , .

Nix .

+1

Source: https://habr.com/ru/post/1649129/


All Articles