summary refs log tree commit diff
path: root/nixos/doc/manual/configuration
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-06-17 13:25:50 +0200
committerJan Tojnar <jtojnar@gmail.com>2019-06-17 13:25:50 +0200
commita3f2131eb69c57570a41d036f395df9252c39b8b (patch)
tree881b6c92c7d70ee63e37e0416a3bc9d1ec6fd87b /nixos/doc/manual/configuration
parent3c14bda7f5a065d3d290399db2ef15457af3906b (diff)
downloadnixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.tar
nixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.gz
nixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.bz2
nixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.lz
nixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.xz
nixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.zst
nixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.zip
doc: Use prompt more often
Diffstat (limited to 'nixos/doc/manual/configuration')
-rw-r--r--nixos/doc/manual/configuration/ad-hoc-packages.xml10
-rw-r--r--nixos/doc/manual/configuration/adding-custom-packages.xml8
-rw-r--r--nixos/doc/manual/configuration/declarative-packages.xml2
-rw-r--r--nixos/doc/manual/configuration/matrix.xml16
-rw-r--r--nixos/doc/manual/configuration/modularity.xml10
-rw-r--r--nixos/doc/manual/configuration/wireless.xml6
-rw-r--r--nixos/doc/manual/configuration/xfce.xml2
7 files changed, 27 insertions, 27 deletions
diff --git a/nixos/doc/manual/configuration/ad-hoc-packages.xml b/nixos/doc/manual/configuration/ad-hoc-packages.xml
index 19159d8db5b..c7e882d846f 100644
--- a/nixos/doc/manual/configuration/ad-hoc-packages.xml
+++ b/nixos/doc/manual/configuration/ad-hoc-packages.xml
@@ -9,7 +9,7 @@
   With the command <command>nix-env</command>, you can install and uninstall
   packages from the command line. For instance, to install Mozilla Thunderbird:
 <screen>
-$ nix-env -iA nixos.thunderbird</screen>
+<prompt>$ </prompt>nix-env -iA nixos.thunderbird</screen>
   If you invoke this as root, the package is installed in the Nix profile
   <filename>/nix/var/nix/profiles/default</filename> and visible to all users
   of the system; otherwise, the package ends up in
@@ -25,7 +25,7 @@ $ nix-env -iA nixos.thunderbird</screen>
   Packages come from the NixOS channel. You typically upgrade a package by
   updating to the latest version of the NixOS channel:
 <screen>
-$ nix-channel --update nixos
+<prompt>$ </prompt>nix-channel --update nixos
 </screen>
   and then running <literal>nix-env -i</literal> again. Other packages in the
   profile are <emphasis>not</emphasis> affected; this is the crucial difference
@@ -34,21 +34,21 @@ $ nix-channel --update nixos
   their current versions in the NixOS channel. You can however upgrade all
   packages for which there is a newer version by doing:
 <screen>
-$ nix-env -u '*'
+<prompt>$ </prompt>nix-env -u '*'
 </screen>
  </para>
 
  <para>
   A package can be uninstalled using the <option>-e</option> flag:
 <screen>
-$ nix-env -e thunderbird
+<prompt>$ </prompt>nix-env -e thunderbird
 </screen>
  </para>
 
  <para>
   Finally, you can roll back an undesirable <command>nix-env</command> action:
 <screen>
-$ nix-env --rollback
+<prompt>$ </prompt>nix-env --rollback
 </screen>
  </para>
 
diff --git a/nixos/doc/manual/configuration/adding-custom-packages.xml b/nixos/doc/manual/configuration/adding-custom-packages.xml
index cdcfa10b820..182641055e4 100644
--- a/nixos/doc/manual/configuration/adding-custom-packages.xml
+++ b/nixos/doc/manual/configuration/adding-custom-packages.xml
@@ -14,8 +14,8 @@
 xlink:href="http://nixos.org/nixpkgs/manual">Nixpkgs
   manual</link>. In short, you clone Nixpkgs:
 <screen>
-$ git clone https://github.com/NixOS/nixpkgs
-$ cd nixpkgs
+<prompt>$ </prompt>git clone https://github.com/NixOS/nixpkgs
+<prompt>$ </prompt>cd nixpkgs
 </screen>
   Then you write and test the package as described in the Nixpkgs manual.
   Finally, you add it to <literal>environment.systemPackages</literal>, e.g.
@@ -65,8 +65,8 @@ stdenv.mkDerivation rec {
 </programlisting>
   This allows testing the package easily:
 <screen>
-$ nix-build my-hello.nix
-$ ./result/bin/hello
+<prompt>$ </prompt>nix-build my-hello.nix
+<prompt>$ </prompt>./result/bin/hello
 Hello, world!
 </screen>
  </para>
diff --git a/nixos/doc/manual/configuration/declarative-packages.xml b/nixos/doc/manual/configuration/declarative-packages.xml
index c9acbefea60..5fb3bcb9f8f 100644
--- a/nixos/doc/manual/configuration/declarative-packages.xml
+++ b/nixos/doc/manual/configuration/declarative-packages.xml
@@ -22,7 +22,7 @@
  <para>
   You can get a list of the available packages as follows:
 <screen>
-$ nix-env -qaP '*' --description
+<prompt>$ </prompt>nix-env -qaP '*' --description
 nixos.firefox   firefox-23.0   Mozilla Firefox - the browser, reloaded
 <replaceable>...</replaceable>
 </screen>
diff --git a/nixos/doc/manual/configuration/matrix.xml b/nixos/doc/manual/configuration/matrix.xml
index e43b70faf7a..4c559a71e81 100644
--- a/nixos/doc/manual/configuration/matrix.xml
+++ b/nixos/doc/manual/configuration/matrix.xml
@@ -141,15 +141,15 @@ in {
    <option>services.matrix-synapse.registration_shared_secret</option>. To
    create a new user or admin, run the following after you have set the secret
    and have rebuilt NixOS:
-<programlisting>
-$ nix run nixpkgs.matrix-synapse
-$ register_new_matrix_user -k &lt;your-registration-shared-secret&gt; http://localhost:8008
-New user localpart: &lt;your-username&gt;
-Password:
-Confirm password:
-Make admin [no]:
+<screen>
+<prompt>$ </prompt>nix run nixpkgs.matrix-synapse
+<prompt>$ </prompt>register_new_matrix_user -k <replaceable>your-registration-shared-secret</replaceable> http://localhost:8008
+<prompt>New user localpart: </prompt><replaceable>your-username</replaceable>
+<prompt>Password:</prompt>
+<prompt>Confirm password:</prompt>
+<prompt>Make admin [no]:</prompt>
 Success!
-</programlisting>
+</screen>
    In the example, this would create a user with the Matrix Identifier
    <literal>@your-username:example.org</literal>. Note that the registration
    secret ends up in the nix store and therefore is world-readable by any user
diff --git a/nixos/doc/manual/configuration/modularity.xml b/nixos/doc/manual/configuration/modularity.xml
index 67bb5a47d72..7ad0ae80a48 100644
--- a/nixos/doc/manual/configuration/modularity.xml
+++ b/nixos/doc/manual/configuration/modularity.xml
@@ -106,21 +106,21 @@ The unique option `services.httpd.adminAddr' is defined multiple times, in `/etc
   configuration option is. The command <option>nixos-option</option> allows you
   to find out:
 <screen>
-$ nixos-option <xref linkend="opt-services.xserver.enable"/>
+<prompt>$ </prompt>nixos-option <xref linkend="opt-services.xserver.enable"/>
 true
 
-$ nixos-option <xref linkend="opt-boot.kernelModules"/>
+<prompt>$ </prompt>nixos-option <xref linkend="opt-boot.kernelModules"/>
 [ "tun" "ipv6" "loop" <replaceable>...</replaceable> ]
 </screen>
   Interactive exploration of the configuration is possible using <command>nix
   repl</command>, a read-eval-print loop for Nix expressions. A typical use:
 <screen>
-$ nix repl '&lt;nixpkgs/nixos>'
+<prompt>$ </prompt>nix repl '&lt;nixpkgs/nixos>'
 
-nix-repl> config.<xref linkend="opt-networking.hostName"/>
+<prompt>nix-repl> </prompt>config.<xref linkend="opt-networking.hostName"/>
 "mandark"
 
-nix-repl> map (x: x.hostName) config.<xref linkend="opt-services.httpd.virtualHosts"/>
+<prompt>nix-repl> </prompt>map (x: x.hostName) config.<xref linkend="opt-services.httpd.virtualHosts"/>
 [ "example.org" "example.gov" ]
 </screen>
  </para>
diff --git a/nixos/doc/manual/configuration/wireless.xml b/nixos/doc/manual/configuration/wireless.xml
index 7c7b3b4a65a..9c0e3a8d7aa 100644
--- a/nixos/doc/manual/configuration/wireless.xml
+++ b/nixos/doc/manual/configuration/wireless.xml
@@ -37,7 +37,7 @@
   If you are using WPA2 you can generate pskRaw key using
   <command>wpa_passphrase</command>:
 <screen>
-$ wpa_passphrase ESSID PSK
+<prompt>$ </prompt>wpa_passphrase ESSID PSK
 network={
         ssid="echelon"
         #psk="abcdefgh"
@@ -54,10 +54,10 @@ network={
   or you can use it to directly generate the
   <literal>wpa_supplicant.conf</literal>:
 <screen>
-# wpa_passphrase ESSID PSK > /etc/wpa_supplicant.conf</screen>
+<prompt># </prompt>wpa_passphrase ESSID PSK > /etc/wpa_supplicant.conf</screen>
   After you have edited the <literal>wpa_supplicant.conf</literal>, you need to
   restart the wpa_supplicant service.
 <screen>
-# systemctl restart wpa_supplicant.service</screen>
+<prompt># </prompt>systemctl restart wpa_supplicant.service</screen>
  </para>
 </section>
diff --git a/nixos/doc/manual/configuration/xfce.xml b/nixos/doc/manual/configuration/xfce.xml
index f2967fa3b10..6ac99c6b2be 100644
--- a/nixos/doc/manual/configuration/xfce.xml
+++ b/nixos/doc/manual/configuration/xfce.xml
@@ -64,7 +64,7 @@ Thunar:2410): GVFS-RemoteVolumeMonitor-WARNING **: remote volume monitor with db
    Session and Startup settings panel. Alternatively, you can run this command
    to do the same thing.
 <programlisting>
-$ xfconf-query -c xfce4-session -p /compat/LaunchGNOME -s true
+<prompt>$ </prompt>xfconf-query -c xfce4-session -p /compat/LaunchGNOME -s true
 </programlisting>
    A log-out and re-log will be needed for this to take effect.
   </para>