Upgrade docs: improve the upgrade command

and make it more copy-pastable.
This commit is contained in:
Anders Riutta 2018-09-17 13:19:02 -07:00 committed by Graham Christensen
parent 2ca6ef0fec
commit 1915862767
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C

View file

@ -7,15 +7,16 @@
<title>Upgrading Nix</title> <title>Upgrading Nix</title>
<para> <para>
Multi-user Nix users on macOS can upgrade Nix by running Multi-user Nix users on macOS can upgrade Nix by running:
<command>sudo -i sh -c 'nix-channel --update &amp;&amp; nix-env <command>sudo -i sh -c 'nix-channel --update &amp;&amp;
-iA nixpkgs.nix'; sudo launchctl stop org.nixos.nix-daemon; sudo nix-env -iA nixpkgs.nix &amp;&amp;
launchctl start org.nixos.nix-daemon</command>. launchctl remove org.nixos.nix-daemon &amp;&amp;
launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist'</command>
</para> </para>
<para> <para>
Single-user installations of Nix should run <command>nix-channel Single-user installations of Nix should run this:
--update; nix-env -iA nixpkgs.nix</command>. <command>nix-channel --update; nix-env -iA nixpkgs.nix</command>
</para> </para>
</chapter> </chapter>