docs: clarify stand-alone installation instructions

Specifically,

- include system-wide Nixpkgs channel so `NIX_PATH` solution also
  works on multi-user installations;

- additionally link to Nix Discourse reply for more information on
  `NIX_PATH`; and

- remove note about relog on NixOS since all the channels in
  `~/.nix-defexpr/channels/` are included by default, so the Home
  Manager channel should be picked up automatically.
This commit is contained in:
rcerc 2022-01-10 09:57:17 -05:00 committed by Robert Helgesson
parent 85f13acb81
commit a5dd5d5f19
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -62,14 +62,15 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/releas
$ nix-channel --update
----
+
On NixOS you may need to log out and back in for the channel to become
available. On non-NixOS you may have to add
On non-NixOS, you may have to add
+
[source,bash]
export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH
export NIX_PATH=$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels${NIX_PATH:+:$NIX_PATH}
+
to your shell (see
https://github.com/NixOS/nix/issues/2033[nix#2033]).
to your shell (see https://github.com/NixOS/nix/issues/2033[nix#2033]
and
https://discourse.nixos.org/t/where-is-nix-path-supposed-to-be-set/16434/8[this
reply on the Nix Discourse]).
3. Run the Home Manager installation command and create the first Home
Manager generation: