git.iko.soy/typeable/nixpkgs
on master help sign in
Manual: Explicitly mark commands that require to be run as root (#15589)

* manual: Mark commands that require root Mark every command that requires to be run as root by prefixing them with '#' instead of '$'. * manual: Add note about commands that require root

commit5f8d14546b6a5a5df8a4768833497a674083dd8e authorWilhelm Schuster <ws@wilhelm.re> dateWed 1 Jun 2016, 16:23 (11 years ago) parentf547137
28 files changed+101−98
nixos/doc/manual/administration/cleaning-store.xml+2−2 nixos/doc/manual/administration/container-networking.xml+2−2 nixos/doc/manual/administration/imperative-containers.xml+12−12 nixos/doc/manual/administration/maintenance-mode.xml+2−2 nixos/doc/manual/administration/network-problems.xml+2−2 nixos/doc/manual/administration/rebooting.xml+4−4 nixos/doc/manual/administration/rollback.xml+4−4 nixos/doc/manual/administration/service-mgmt.xml+3−3 nixos/doc/manual/administration/store-corruption.xml+3−3 nixos/doc/manual/administration/user-sessions.xml+2−2 nixos/doc/manual/configuration/adding-custom-packages.xml+1−1 nixos/doc/manual/configuration/linux-kernel.xml+1−1 nixos/doc/manual/configuration/luks-file-systems.xml+3−3 nixos/doc/manual/configuration/user-mgmt.xml+4−4 nixos/doc/manual/configuration/wireless.xml+2−2 nixos/doc/manual/configuration/x-windows.xml+2−2 nixos/doc/manual/development/building-nixos.xml+2−2 nixos/doc/manual/development/building-parts.xml+3−3 nixos/doc/manual/development/sources.xml+1−1 nixos/doc/manual/development/testing-installer.xml+4−4 nixos/doc/manual/installation/changing-config.xml+4−4 nixos/doc/manual/installation/installing-uefi.xml+1−1 nixos/doc/manual/installation/installing.xml+19−19 nixos/doc/manual/installation/upgrading.xml+6−6 nixos/doc/manual/man-configuration.xml+2−2 nixos/doc/manual/man-nixos-build-vms.xml+4−4 nixos/doc/manual/man-nixos-option.xml+2−2 nixos/doc/manual/manual.xml+4−1
nixos/doc/manual/administration/cleaning-store.xml+2−2
@@ -21,7 +21,7 @@ Alternatively, you can use a systemd unit that does the same in the
2121background:
2222
2323<screen>
24−$ systemctl start nix-gc.service
24+# systemctl start nix-gc.service
2525</screen>
2626
2727You can tell NixOS in <filename>configuration.nix</filename> to run
@@ -59,4 +59,4 @@ $ nix-store --optimise
5959Since this command needs to read the entire Nix store, it can take
6060quite a while to finish.</para>
6161
62−</chapter>
62+</chapter>
nixos/doc/manual/administration/container-networking.xml+2−2
@@ -13,7 +13,7 @@ create</literal>, it gets it own private IPv4 address in the range
1313address as follows:
1414
1515<screen>
16−$ nixos-container show-ip foo
16+# nixos-container show-ip foo
171710.233.4.2
1818
1919$ ping -c1 10.233.4.2
@@ -47,4 +47,4 @@ where <literal>eth0</literal> should be replaced with the desired
4747external interface. Note that <literal>ve-+</literal> is a wildcard
4848that matches all container interfaces.</para>
4949
50−</section>
50+</section>
nixos/doc/manual/administration/imperative-containers.xml+12−12
@@ -11,7 +11,7 @@
1111identifier <literal>foo</literal> as follows:
1212
1313<screen>
14−$ nixos-container create foo
14+# nixos-container create foo
1515</screen>
1616
1717This creates the container’s root directory in
@@ -25,7 +25,7 @@ line. For instance, to create a container that has
2525<literal>root</literal>:
2626
2727<screen>
28−$ nixos-container create foo --config 'services.openssh.enable = true; \
28+# nixos-container create foo --config 'services.openssh.enable = true; \
2929 users.extraUsers.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N…"];'
3030</screen>
3131
@@ -35,7 +35,7 @@ $ nixos-container create foo --config 'services.openssh.enable = true; \
3535run:
3636
3737<screen>
38−$ nixos-container start foo
38+# nixos-container start foo
3939</screen>
4040
4141This command will return as soon as the container has booted and has
@@ -46,7 +46,7 @@ Thus, if something went wrong, you can get status info using
4646<command>systemctl</command>:
4747
4848<screen>
49−$ systemctl status container@foo
49+# systemctl status container@foo
5050</screen>
5151
5252</para>
@@ -55,7 +55,7 @@ $ systemctl status container@foo
5555root using the <command>root-login</command> operation:
5656
5757<screen>
58−$ nixos-container root-login foo
58+# nixos-container root-login foo
5959[root@foo:~]#
6060</screen>
6161
@@ -65,7 +65,7 @@ authentication). You can also get a regular login prompt using the
6565the host:
6666
6767<screen>
68−$ nixos-container login foo
68+# nixos-container login foo
6969foo login: alice
7070Password: ***
7171</screen>
@@ -74,7 +74,7 @@ With <command>nixos-container run</command>, you can execute arbitrary
7474commands in the container:
7575
7676<screen>
77−$ nixos-container run foo -- uname -a
77+# nixos-container run foo -- uname -a
7878Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux
7979</screen>
8080
@@ -86,17 +86,17 @@ container. First, on the host, you can edit
8686and run
8787
8888<screen>
89−$ nixos-container update foo
89+# nixos-container update foo
9090</screen>
9191
9292This will build and activate the new configuration. You can also
9393specify a new configuration on the command line:
9494
9595<screen>
96−$ nixos-container update foo --config 'services.httpd.enable = true; \
96+# nixos-container update foo --config 'services.httpd.enable = true; \
9797 services.httpd.adminAddr = "foo@example.org";'
9898
99−$ curl http://$(nixos-container show-ip foo)/
99+# curl http://$(nixos-container show-ip foo)/
100100&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">…
101101</screen>
102102
@@ -116,9 +116,9 @@ start</literal>, respectively, or by using
116116destroy a container, including its file system, do
117117
118118<screen>
119−$ nixos-container destroy foo
119+# nixos-container destroy foo
120120</screen>
121121
122122</para>
123123
124−</section>
124+</section>
nixos/doc/manual/administration/maintenance-mode.xml+2−2
@@ -9,10 +9,10 @@
99<para>You can enter rescue mode by running:
1010
1111<screen>
12−$ systemctl rescue</screen>
12+# systemctl rescue</screen>
1313
1414This will eventually give you a single-user root shell. Systemd will
1515stop (almost) all system services. To get out of maintenance mode,
1616just exit from the rescue shell.</para>
1717
18−</section>
18+</section>
nixos/doc/manual/administration/network-problems.xml+2−2
@@ -18,14 +18,14 @@ You can disable the use of the binary cache by adding <option>--option
1818use-binary-caches false</option>, e.g.
1919
2020<screen>
21−$ nixos-rebuild switch --option use-binary-caches false
21+# nixos-rebuild switch --option use-binary-caches false
2222</screen>
2323
2424If you have an alternative binary cache at your disposal, you can use
2525it instead:
2626
2727<screen>
28−$ nixos-rebuild switch --option binary-caches http://my-cache.example.org/
28+# nixos-rebuild switch --option binary-caches http://my-cache.example.org/
2929</screen>
3030
3131</para>
nixos/doc/manual/administration/rebooting.xml+4−4
@@ -10,7 +10,7 @@
1010doing:
1111
1212<screen>
13−$ shutdown
13+# shutdown
1414</screen>
1515
1616This is equivalent to running <command>systemctl
@@ -19,7 +19,7 @@ poweroff</command>.</para>
1919<para>To reboot the system, run
2020
2121<screen>
22−$ reboot
22+# reboot
2323</screen>
2424
2525which is equivalent to <command>systemctl reboot</command>.
@@ -28,7 +28,7 @@ Alternatively, you can quickly reboot the system using
2828the new kernel into memory:
2929
3030<screen>
31−$ systemctl kexec
31+# systemctl kexec
3232</screen>
3333
3434</para>
@@ -41,4 +41,4 @@ $ systemctl kexec
4141i.e. on a virtual console or in X11; otherwise, the user is asked for
4242authentication.</para>
4343
44−</chapter>
44+</chapter>
nixos/doc/manual/administration/rollback.xml+4−4
@@ -19,7 +19,7 @@ fails to boot. After the system has booted, you can make the selected
1919configuration the default for subsequent boots:
2020
2121<screen>
22−$ /run/current-system/bin/switch-to-configuration boot</screen>
22+# /run/current-system/bin/switch-to-configuration boot</screen>
2323
2424</para>
2525
@@ -27,12 +27,12 @@ $ /run/current-system/bin/switch-to-configuration boot</screen>
2727system:
2828
2929<screen>
30−$ nixos-rebuild switch --rollback</screen>
30+# nixos-rebuild switch --rollback</screen>
3131
3232This is equivalent to running:
3333
3434<screen>
35−$ /nix/var/nix/profiles/system-<replaceable>N</replaceable>-link/bin/switch-to-configuration switch</screen>
35+# /nix/var/nix/profiles/system-<replaceable>N</replaceable>-link/bin/switch-to-configuration switch</screen>
3636
3737where <replaceable>N</replaceable> is the number of the NixOS system
3838configuration. To get a list of the available configurations, do:
@@ -45,4 +45,4 @@ lrwxrwxrwx 1 root root 78 Aug 12 13:54 /nix/var/nix/profiles/system-268-link ->
4545
4646</para>
4747
48−</section>
48+</section>
nixos/doc/manual/administration/service-mgmt.xml+3−3
@@ -66,9 +66,9 @@ messages from the service.
6666<para>Units can be stopped, started or restarted:
6767
6868<screen>
69−$ systemctl stop postgresql.service
70−$ systemctl start postgresql.service
71−$ systemctl restart postgresql.service
69+# systemctl stop postgresql.service
70+# systemctl start postgresql.service
71+# systemctl restart postgresql.service
7272</screen>
7373
7474These operations are synchronous: they wait until the service has
nixos/doc/manual/administration/store-corruption.xml+3−3
@@ -18,7 +18,7 @@ you may be able to fix it automatically.</para>
1818system configuration, you can fix it by doing
1919
2020<screen>
21−$ nixos-rebuild switch --repair
21+# nixos-rebuild switch --repair
2222</screen>
2323
2424This will cause Nix to check every path in the closure, and if its
@@ -28,10 +28,10 @@ the path is rebuilt or redownloaded.</para>
2828<para>You can also scan the entire Nix store for corrupt paths:
2929
3030<screen>
31−$ nix-store --verify --check-contents --repair
31+# nix-store --verify --check-contents --repair
3232</screen>
3333
3434Any corrupt paths will be redownloaded if they’re available in a
3535binary cache; otherwise, they cannot be repaired.</para>
3636
37−</section>
37+</section>
nixos/doc/manual/administration/user-sessions.xml+2−2
@@ -45,9 +45,9 @@ track of this, you can terminate a session in a way that ensures that
4545all the session’s processes are gone:
4646
4747<screen>
48−$ loginctl terminate-session c3
48+# loginctl terminate-session c3
4949</screen>
5050
5151</para>
5252
53−</chapter>
53+</chapter>
nixos/doc/manual/configuration/adding-custom-packages.xml+1−1
@@ -31,7 +31,7 @@ and you run <command>nixos-rebuild</command>, specifying your own
3131Nixpkgs tree:
3232
3333<screen>
34−$ nixos-rebuild switch -I nixpkgs=/path/to/my/nixpkgs</screen>
34+# nixos-rebuild switch -I nixpkgs=/path/to/my/nixpkgs</screen>
3535
3636</para>
3737
nixos/doc/manual/configuration/linux-kernel.xml+1−1
@@ -82,7 +82,7 @@ $ nix-shell '<nixpkgs>' -A linuxPackages.kernel
8282$ unpackPhase
8383$ cd linux-*
8484$ make -C $dev/lib/modules/*/build M=$(pwd)/drivers/net/ethernet/mellanox modules
85−$ sudo insmod ./drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko
85+# insmod ./drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko
8686]]></screen>
8787
8888</section>
nixos/doc/manual/configuration/luks-file-systems.xml+3−3
@@ -12,7 +12,7 @@ here is how you create an encrypted Ext4 file system on the device
1212<filename>/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d</filename>:
1313
1414<screen>
15−$ cryptsetup luksFormat /dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d
15+# cryptsetup luksFormat /dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d
1616
1717WARNING!
1818========
@@ -22,10 +22,10 @@ Are you sure? (Type uppercase yes): YES
2222Enter LUKS passphrase: ***
2323Verify passphrase: ***
2424
25−$ cryptsetup luksOpen /dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d crypted
25+# cryptsetup luksOpen /dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d crypted
2626Enter passphrase for /dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d: ***
2727
28−$ mkfs.ext4 /dev/mapper/crypted
28+# mkfs.ext4 /dev/mapper/crypted
2929</screen>
3030
3131To ensure that this file system is automatically mounted at boot time
nixos/doc/manual/configuration/user-mgmt.xml+4−4
@@ -63,14 +63,14 @@ commands such as <command>useradd</command>,
6363account named <literal>alice</literal>:
6464
6565<screen>
66−$ useradd -m alice</screen>
66+# useradd -m alice</screen>
6767
6868To make all nix tools available to this new user use `su - USER` which
6969opens a login shell (==shell that loads the profile) for given user.
7070This will create the ~/.nix-defexpr symlink. So run:
7171
7272<screen>
73−$ su - alice -c "true"</screen>
73+# su - alice -c "true"</screen>
7474
7575
7676The flag <option>-m</option> causes the creation of a home directory
@@ -79,7 +79,7 @@ have an initial password and therefore cannot log in. A password can
7979be set using the <command>passwd</command> utility:
8080
8181<screen>
82−$ passwd alice
82+# passwd alice
8383Enter new UNIX password: ***
8484Retype new UNIX password: ***
8585</screen>
@@ -87,7 +87,7 @@ Retype new UNIX password: ***
8787A user can be deleted using <command>userdel</command>:
8888
8989<screen>
90−$ userdel -r alice</screen>
90+# userdel -r alice</screen>
9191
9292The flag <option>-r</option> deletes the user’s home directory.
9393Accounts can be modified using <command>usermod</command>. Unix
nixos/doc/manual/configuration/wireless.xml+2−2
@@ -41,13 +41,13 @@ If you are using WPA2 the <command>wpa_passphrase</command> tool might be useful
4141to generate the <literal>wpa_supplicant.conf</literal>.
4242
4343<screen>
44−$ wpa_passphrase ESSID PSK > /etc/wpa_supplicant.conf</screen>
44+# wpa_passphrase ESSID PSK > /etc/wpa_supplicant.conf</screen>
4545
4646After you have edited the <literal>wpa_supplicant.conf</literal>,
4747you need to restart the wpa_supplicant service.
4848
4949<screen>
50−$ systemctl restart wpa_supplicant.service</screen>
50+# systemctl restart wpa_supplicant.service</screen>
5151</para>
5252
5353</section>
nixos/doc/manual/configuration/x-windows.xml+2−2
@@ -5,7 +5,7 @@
55 xml:id="sec-x11">
66
77<title>X Window System</title>
8−
8+
99<para>The X Window System (X11) provides the basis of NixOS’ graphical
1010user interface. It can be enabled as follows:
1111<programlisting>
@@ -48,7 +48,7 @@ services.xserver.autorun = false;
4848</programlisting>
4949The X server can then be started manually:
5050<screen>
51−$ systemctl start display-manager.service
51+# systemctl start display-manager.service
5252</screen>
5353</para>
5454
nixos/doc/manual/development/building-nixos.xml+2−2
@@ -25,8 +25,8 @@ $ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd
2525suggested by the following command:
2626
2727<screen>
28−$ mount -o loop -t iso9660 ./result/iso/cd.iso /mnt/iso</screen>
28+# mount -o loop -t iso9660 ./result/iso/cd.iso /mnt/iso</screen>
2929
3030</para>
3131
32−</chapter>
32+</chapter>
nixos/doc/manual/development/building-parts.xml+3−3
@@ -94,8 +94,8 @@ $ nix-build -A 'config.systemd.units."httpd.service".unit'
9494<screen>
9595$ cp $(nix-build -A 'config.systemd.units."httpd.service".unit')/httpd.service \
9696 /run/systemd/system/tmp-httpd.service
97−$ systemctl daemon-reload
98−$ systemctl start tmp-httpd.service
97+# systemctl daemon-reload
98+# systemctl start tmp-httpd.service
9999</screen>
100100
101101 Note that the unit must not have the same name as any unit in
@@ -110,4 +110,4 @@ $ systemctl start tmp-httpd.service
110110
111111</para>
112112
113−</chapter>
113+</chapter>
nixos/doc/manual/development/sources.xml+1−1
@@ -70,7 +70,7 @@ sources, you need to tell <command>nixos-rebuild</command> about them
7070using the <option>-I</option> flag:
7171
7272<screen>
73−$ nixos-rebuild switch -I nixpkgs=<replaceable>/my/sources</replaceable>/nixpkgs
73+# nixos-rebuild switch -I nixpkgs=<replaceable>/my/sources</replaceable>/nixpkgs
7474</screen>
7575
7676</para>
nixos/doc/manual/development/testing-installer.xml+4−4
@@ -12,16 +12,16 @@ properly:
1212
1313<screen>
1414$ nix-build -A config.system.build.nixos-install
15−$ mount -t tmpfs none /mnt
16−$ ./result/bin/nixos-install</screen>
15+# mount -t tmpfs none /mnt
16+# ./result/bin/nixos-install</screen>
1717
1818To start a login shell in the new NixOS installation in
1919<filename>/mnt</filename>:
2020
2121<screen>
22−$ ./result/bin/nixos-install --chroot
22+# ./result/bin/nixos-install --chroot
2323</screen>
2424
2525</para>
2626
27−</chapter>
27+</chapter>
nixos/doc/manual/installation/changing-config.xml+4−4
@@ -10,7 +10,7 @@ contains the current configuration of your machine. Whenever you’ve
1010changed something to that file, you should do
1111
1212<screen>
13−$ nixos-rebuild switch</screen>
13+# nixos-rebuild switch</screen>
1414
1515to build the new configuration, make it the default configuration for
1616booting, and try to realise the configuration in the running system
@@ -23,7 +23,7 @@ either run them from a root shell or by prefixing them with
2323<para>You can also do
2424
2525<screen>
26−$ nixos-rebuild test</screen>
26+# nixos-rebuild test</screen>
2727
2828to build the configuration and switch the running system to it, but
2929without making it the boot default. So if (say) the configuration
@@ -33,7 +33,7 @@ configuration.</para>
3333<para>There is also
3434
3535<screen>
36−$ nixos-rebuild boot</screen>
36+# nixos-rebuild boot</screen>
3737
3838to build the configuration and make it the boot default, but not
3939switch to it now (so it will only take effect after the next
@@ -44,7 +44,7 @@ of the GRUB 2 boot screen by giving it a different <emphasis>profile
4444name</emphasis>, e.g.
4545
4646<screen>
47−$ nixos-rebuild switch -p test </screen>
47+# nixos-rebuild switch -p test </screen>
4848
4949which causes the new configuration (and previous ones created using
5050<literal>-p test</literal>) to show up in the GRUB submenu “NixOS -
nixos/doc/manual/installation/installing-uefi.xml+1−1
@@ -5,7 +5,7 @@
55 xml:id="sec-uefi-installation">
66
77<title>UEFI Installation</title>
8−
8+
99<para>NixOS can also be installed on UEFI systems. The procedure
1010is by and large the same as a BIOS installation, with the following
1111changes:
nixos/doc/manual/installation/installing.xml+19−19
@@ -54,7 +54,7 @@
5454 changes. For example:
5555
5656<screen>
57−$ mkfs.ext4 -L nixos /dev/sda1</screen>
57+# mkfs.ext4 -L nixos /dev/sda1</screen>
5858
5959 </para></listitem>
6060
@@ -66,10 +66,10 @@ $ mkfs.ext4 -L nixos /dev/sda1</screen>
6666 <listitem><para>For creating LVM volumes, the LVM commands, e.g.,
6767
6868<screen>
69−$ pvcreate /dev/sda1 /dev/sdb1
70−$ vgcreate MyVolGroup /dev/sda1 /dev/sdb1
71−$ lvcreate --size 2G --name bigdisk MyVolGroup
72−$ lvcreate --size 1G --name smalldisk MyVolGroup</screen>
69+# pvcreate /dev/sda1 /dev/sdb1
70+# vgcreate MyVolGroup /dev/sda1 /dev/sdb1
71+# lvcreate --size 2G --name bigdisk MyVolGroup
72+# lvcreate --size 1G --name smalldisk MyVolGroup</screen>
7373
7474 </para></listitem>
7575
@@ -84,7 +84,7 @@ $ lvcreate --size 1G --name smalldisk MyVolGroup</screen>
8484 be installed on <filename>/mnt</filename>, e.g.
8585
8686<screen>
87−$ mount /dev/disk/by-label/nixos /mnt
87+# mount /dev/disk/by-label/nixos /mnt
8888</screen>
8989
9090 </para></listitem>
@@ -113,14 +113,14 @@ $ mount /dev/disk/by-label/nixos /mnt
113113 generate an initial configuration file for you:
114114
115115<screen>
116−$ nixos-generate-config --root /mnt</screen>
116+# nixos-generate-config --root /mnt</screen>
117117
118118 You should then edit
119119 <filename>/mnt/etc/nixos/configuration.nix</filename> to suit your
120120 needs:
121121
122122<screen>
123−$ nano /mnt/etc/nixos/configuration.nix
123+# nano /mnt/etc/nixos/configuration.nix
124124</screen>
125125
126126 If you’re using the graphical ISO image, other editors may be
@@ -162,7 +162,7 @@ $ nano /mnt/etc/nixos/configuration.nix
162162 <listitem><para>Do the installation:
163163
164164<screen>
165−$ nixos-install</screen>
165+# nixos-install</screen>
166166
167167 Cross fingers. If this fails due to a temporary problem (such as
168168 a network issue while downloading binaries from the NixOS binary
@@ -186,7 +186,7 @@ Retype new UNIX password: ***
186186 <listitem><para>If everything went well:
187187
188188<screen>
189−$ reboot</screen>
189+# reboot</screen>
190190
191191 </para></listitem>
192192
@@ -235,15 +235,15 @@ drive (here <filename>/dev/sda</filename>). <xref linkend="ex-config"
235235
236236<example xml:id='ex-install-sequence'><title>Commands for Installing NixOS on <filename>/dev/sda</filename></title>
237237<screen>
238−$ fdisk /dev/sda # <lineannotation>(or whatever device you want to install on)</lineannotation>
239−$ mkfs.ext4 -L nixos /dev/sda1
240−$ mkswap -L swap /dev/sda2
241−$ swapon /dev/sda2
242−$ mount /dev/disk/by-label/nixos /mnt
243−$ nixos-generate-config --root /mnt
244−$ nano /mnt/etc/nixos/configuration.nix
245−$ nixos-install
246−$ reboot</screen>
238+# fdisk /dev/sda # <lineannotation>(or whatever device you want to install on)</lineannotation>
239+# mkfs.ext4 -L nixos /dev/sda1
240+# mkswap -L swap /dev/sda2
241+# swapon /dev/sda2
242+# mount /dev/disk/by-label/nixos /mnt
243+# nixos-generate-config --root /mnt
244+# nano /mnt/etc/nixos/configuration.nix
245+# nixos-install
246+# reboot</screen>
247247</example>
248248
249249<example xml:id='ex-config'><title>NixOS Configuration</title>
nixos/doc/manual/installation/upgrading.xml+6−6
@@ -60,33 +60,33 @@ the <literal>nixos-14.12</literal> channel. To see which NixOS
6060channel you’re subscribed to, run the following as root:
6161
6262<screen>
63−$ nix-channel --list | grep nixos
63+# nix-channel --list | grep nixos
6464nixos https://nixos.org/channels/nixos-unstable
6565</screen>
6666
6767To switch to a different NixOS channel, do
6868
6969<screen>
70−$ nix-channel --add https://nixos.org/channels/<replaceable>channel-name</replaceable> nixos
70+# nix-channel --add https://nixos.org/channels/<replaceable>channel-name</replaceable> nixos
7171</screen>
7272
7373(Be sure to include the <literal>nixos</literal> parameter at the
7474end.) For instance, to use the NixOS 14.12 stable channel:
7575
7676<screen>
77−$ nix-channel --add https://nixos.org/channels/nixos-14.12 nixos
77+# nix-channel --add https://nixos.org/channels/nixos-14.12 nixos
7878</screen>
7979
8080If you have a server, you may want to use the “small” channel instead:
8181
8282<screen>
83−$ nix-channel --add https://nixos.org/channels/nixos-14.12-small nixos
83+# nix-channel --add https://nixos.org/channels/nixos-14.12-small nixos
8484</screen>
8585
8686And if you want to live on the bleeding edge:
8787
8888<screen>
89−$ nix-channel --add https://nixos.org/channels/nixos-unstable nixos
89+# nix-channel --add https://nixos.org/channels/nixos-unstable nixos
9090</screen>
9191
9292</para>
@@ -95,7 +95,7 @@ $ nix-channel --add https://nixos.org/channels/nixos-unstable nixos
9595channel by running
9696
9797<screen>
98−$ nixos-rebuild switch --upgrade
98+# nixos-rebuild switch --upgrade
9999</screen>
100100
101101which is equivalent to the more verbose <literal>nix-channel --update
nixos/doc/manual/man-configuration.xml+2−2
@@ -1,7 +1,7 @@
11<refentry xmlns="http://docbook.org/ns/docbook"
22 xmlns:xlink="http://www.w3.org/1999/xlink"
33 xmlns:xi="http://www.w3.org/2001/XInclude">
4−
4+
55<refmeta>
66 <refentrytitle><filename>configuration.nix</filename></refentrytitle>
77 <manvolnum>5</manvolnum>
@@ -34,5 +34,5 @@ therein.</para>
3434<xi:include href="options-db.xml" />
3535
3636</refsection>
37−
37+
3838</refentry>
nixos/doc/manual/man-nixos-build-vms.xml+4−4
@@ -1,7 +1,7 @@
11<refentry xmlns="http://docbook.org/ns/docbook"
22 xmlns:xlink="http://www.w3.org/1999/xlink"
33 xmlns:xi="http://www.w3.org/2001/XInclude">
4−
4+
55<refmeta>
66 <refentrytitle><command>nixos-build-vms</command></refentrytitle>
77 <manvolnum>8</manvolnum>
@@ -42,10 +42,10 @@ points to the generated virtual network.
4242 services.openssh.enable = true;
4343 nixpkgs.system = "i686-linux";
4444 deployment.targetHost = "test1.example.net";
45−
45+
4646 # Other NixOS options
4747 };
48−
48+
4949 test2 = {pkgs, config, ...}:
5050 {
5151 services.openssh.enable = true;
@@ -53,7 +53,7 @@ points to the generated virtual network.
5353 environment.systemPackages = [ pkgs.lynx ];
5454 nixpkgs.system = "x86_64-linux";
5555 deployment.targetHost = "test2.example.net";
56−
56+
5757 # Other NixOS options
5858 };
5959}
nixos/doc/manual/man-nixos-option.xml+2−2
@@ -1,7 +1,7 @@
11<refentry xmlns="http://docbook.org/ns/docbook"
22 xmlns:xlink="http://www.w3.org/1999/xlink"
33 xmlns:xi="http://www.w3.org/2001/XInclude">
4−
4+
55<refmeta>
66 <refentrytitle><command>nixos-option</command></refentrytitle>
77 <manvolnum>8</manvolnum>
@@ -64,7 +64,7 @@ $ nixos-option boot.loader.grub.enable
6464Value:
6565true
6666
67−Default:
67+Default:
6868true
6969
7070Description:
nixos/doc/manual/manual.xml+4−1
@@ -3,7 +3,7 @@
33 xmlns:xi="http://www.w3.org/2001/XInclude"
44 version="5.0"
55 xml:id="book-nixos-manual">
6−
6+
77 <info>
88 <title>NixOS Manual</title>
99 <subtitle>Version <xi:include href="version" parse="text" /></subtitle>
@@ -26,6 +26,9 @@
2626 xlink:href="https://github.com/NixOS/nixpkgs/issues">NixOS’ GitHub
2727 issue tracker</link>.</para>
2828
29+ <note>Commands prefixed with <literal>#</literal> have to be run as
30+ root, either requiring to login as root user or temporarily switching
31+ to it using <literal>sudo</literal> for example.</note>
2932 </preface>
3033
3134 <xi:include href="installation/installation.xml" />