diff options
Diffstat (limited to 'home-manager/doc/installation.xml')
-rw-r--r-- | home-manager/doc/installation.xml | 76 |
1 files changed, 50 insertions, 26 deletions
diff --git a/home-manager/doc/installation.xml b/home-manager/doc/installation.xml index 52119886800..3e1f75abb59 100644 --- a/home-manager/doc/installation.xml +++ b/home-manager/doc/installation.xml @@ -44,22 +44,12 @@ <orderedlist> <listitem> <para> - Make sure you have a working Nix installation. If you are not using NixOS - then it may be necessary to run - </para> -<screen> -<prompt>$</prompt> <userinput>mkdir -m 0755 -p /nix/var/nix/{profiles,gcroots}/per-user/$USER</userinput> -</screen> - <para> - since Home Manager uses these directories to manage your profile - generations. On NixOS these should already be available. - </para> - <para> - Also make sure that your user is able to build and install Nix packages. - For example, you should be able to successfully run a command like - <literal>nix-instantiate '<nixpkgs>' -A hello</literal> without - having to switch to the root user. For a multi-user install of Nix this - means that your user must be covered by the + Make sure you have a working Nix installation. Specifically, make + sure that your user is able to build and install Nix packages. + For example, you should be able to successfully run a command + like <literal>nix-instantiate '<nixpkgs>' -A hello</literal> + without having to switch to the root user. For a multi-user + install of Nix this means that your user must be covered by the <link xlink:href="https://nixos.org/nix/manual/#conf-allowed-users"><literal>allowed-users</literal></link> Nix option. On NixOS you can control this option using the <link xlink:href="https://nixos.org/nixos/manual/options.html#opt-nix.allowedUsers"><literal>nix.allowedUsers</literal></link> @@ -79,11 +69,11 @@ if you are following Nixpkgs master or an unstable channel and </para> <screen> -<prompt>$</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/release-19.09.tar.gz home-manager</userinput> +<prompt>$</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/release-20.03.tar.gz home-manager</userinput> <prompt>$</prompt> <userinput>nix-channel --update</userinput> </screen> <para> - if you follow a Nixpkgs version 19.09 channel. + if you follow a Nixpkgs version 20.03 channel. </para> <para> On NixOS you may need to log out and back in for the channel to become @@ -159,7 +149,7 @@ $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh a Home Manager channel, for example </para> -<screen> +<screen language="console"> <prompt>#</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/master.tar.gz home-manager</userinput> <prompt>#</prompt> <userinput>nix-channel --update</userinput> </screen> @@ -168,13 +158,13 @@ $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh if you are following Nixpkgs master or an unstable channel and </para> -<screen> -<prompt>#</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/release-19.09.tar.gz home-manager</userinput> +<screen language="console"> +<prompt>#</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/release-20.03.tar.gz home-manager</userinput> <prompt>#</prompt> <userinput>nix-channel --update</userinput> </screen> <para> - if you follow a Nixpkgs version 19.09 channel. + if you follow a Nixpkgs version 20.03 channel. </para> <para> @@ -225,6 +215,23 @@ home-manager.useUserPackages = true; become the default value in the future. </para> </note> + + <note> + <para> + By default, Home Manager uses a private <literal>pkgs</literal> instance + that is configured via the <option>home-manager.users.<name>.nixpkgs</option> options. + To instead use the global <literal>pkgs</literal> that is configured via + the system level <option>nixpkgs</option> options, set + </para> +<programlisting language="nix"> +home-manager.useGlobalPkgs = true; +</programlisting> + <para> + This saves an extra Nixpkgs evaluation, adds consistency, and removes the + dependency on <envar>NIX_PATH</envar>, which is otherwise used for + importing Nixpkgs. + </para> + </note> </section> <section xml:id="sec-install-nix-darwin-module"> <title>nix-darwin module</title> @@ -241,7 +248,7 @@ home-manager.useUserPackages = true; a Home Manager channel, for example </para> -<screen> +<screen language="console"> <prompt>#</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/master.tar.gz home-manager</userinput> <prompt>#</prompt> <userinput>nix-channel --update</userinput> </screen> @@ -250,13 +257,13 @@ home-manager.useUserPackages = true; if you are following Nixpkgs master or an unstable channel and </para> -<screen> -<prompt>#</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/release-19.09.tar.gz home-manager</userinput> +<screen language="console"> +<prompt>#</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/release-20.03.tar.gz home-manager</userinput> <prompt>#</prompt> <userinput>nix-channel --update</userinput> </screen> <para> - if you follow a Nixpkgs version 19.09 channel. + if you follow a Nixpkgs version 20.03 channel. </para> <para> @@ -306,5 +313,22 @@ home-manager.useUserPackages = true; value in the future. </para> </note> + + <note> + <para> + By default, Home Manager uses a private <literal>pkgs</literal> instance + that is configured via the <option>home-manager.users.<name>.nixpkgs</option> options. + To instead use the global <literal>pkgs</literal> that is configured via + the system level <option>nixpkgs</option> options, set + </para> +<programlisting language="nix"> +home-manager.useGlobalPkgs = true; +</programlisting> + <para> + This saves an extra Nixpkgs evaluation, adds consistency, and removes the + dependency on <envar>NIX_PATH</envar>, which is otherwise used for + importing Nixpkgs. + </para> + </note> </section> </chapter> |