about summary refs log tree commit diff
path: root/nixos/doc/manual/installation/changing-config.xml
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/doc/manual/installation/changing-config.xml')
-rw-r--r--nixos/doc/manual/installation/changing-config.xml23
1 files changed, 14 insertions, 9 deletions
diff --git a/nixos/doc/manual/installation/changing-config.xml b/nixos/doc/manual/installation/changing-config.xml
index 1a116ec0b655..b77d71389a9d 100644
--- a/nixos/doc/manual/installation/changing-config.xml
+++ b/nixos/doc/manual/installation/changing-config.xml
@@ -9,7 +9,8 @@
   <link linkend="ch-configuration">changed something</link> in that file, you
   should do
 <screen>
-# nixos-rebuild switch</screen>
+<prompt># </prompt>nixos-rebuild switch
+</screen>
   to build the new configuration, make it the default configuration for
   booting, and try to realise the configuration in the running system (e.g., by
   restarting system services).
@@ -23,7 +24,8 @@
  <para>
   You can also do
 <screen>
-# nixos-rebuild test</screen>
+<prompt># </prompt>nixos-rebuild test
+</screen>
   to build the configuration and switch the running system to it, but without
   making it the boot default. So if (say) the configuration locks up your
   machine, you can just reboot to get back to a working configuration.
@@ -31,7 +33,8 @@
  <para>
   There is also
 <screen>
-# nixos-rebuild boot</screen>
+<prompt># </prompt>nixos-rebuild boot
+</screen>
   to build the configuration and make it the boot default, but not switch to it
   now (so it will only take effect after the next reboot).
  </para>
@@ -39,7 +42,8 @@
   You can make your configuration show up in a different submenu of the GRUB 2
   boot screen by giving it a different <emphasis>profile name</emphasis>, e.g.
 <screen>
-# nixos-rebuild switch -p test </screen>
+<prompt># </prompt>nixos-rebuild switch -p test
+</screen>
   which causes the new configuration (and previous ones created using
   <literal>-p test</literal>) to show up in the GRUB submenu “NixOS - Profile
   'test'”. This can be useful to separate test configurations from
@@ -48,7 +52,8 @@
  <para>
   Finally, you can do
 <screen>
-$ nixos-rebuild build</screen>
+<prompt>$ </prompt>nixos-rebuild build
+</screen>
   to build the configuration but nothing more. This is useful to see whether
   everything compiles cleanly.
  </para>
@@ -58,8 +63,8 @@ $ nixos-rebuild build</screen>
   <emphasis>virtual machine</emphasis> that contains the desired configuration.
   Just do
 <screen>
-$ nixos-rebuild build-vm
-$ ./result/bin/run-*-vm
+<prompt>$ </prompt>nixos-rebuild build-vm
+<prompt>$ </prompt>./result/bin/run-*-vm
 </screen>
   The VM does not have any data from your host system, so your existing user
   accounts and home directories will not be available unless you have set
@@ -74,12 +79,12 @@ $ ./result/bin/run-*-vm
   guest. For instance, the following will forward host port 2222 to guest port
   22 (SSH):
 <screen>
-$ QEMU_NET_OPTS="hostfwd=tcp::2222-:22" ./result/bin/run-*-vm
+<prompt>$ </prompt>QEMU_NET_OPTS="hostfwd=tcp::2222-:22" ./result/bin/run-*-vm
 </screen>
   allowing you to log in via SSH (assuming you have set the appropriate
   passwords or SSH authorized keys):
 <screen>
-$ ssh -p 2222 localhost
+<prompt>$ </prompt>ssh -p 2222 localhost
 </screen>
  </para>
 </chapter>