summary refs log tree commit diff
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2022-08-30 12:35:47 +0200
committerpennae <github@quasiparticle.net>2022-08-31 16:27:24 +0200
commit0cfcb5908cc7164236f78cd21e02cc168dd028ac (patch)
treefc1a77405167e49fd1250130551546ac7b2709c7
parent5841c386a0ce5fc02b1d32a2e423e81923c32052 (diff)
downloadnixpkgs-0cfcb5908cc7164236f78cd21e02cc168dd028ac.tar
nixpkgs-0cfcb5908cc7164236f78cd21e02cc168dd028ac.tar.gz
nixpkgs-0cfcb5908cc7164236f78cd21e02cc168dd028ac.tar.bz2
nixpkgs-0cfcb5908cc7164236f78cd21e02cc168dd028ac.tar.lz
nixpkgs-0cfcb5908cc7164236f78cd21e02cc168dd028ac.tar.xz
nixpkgs-0cfcb5908cc7164236f78cd21e02cc168dd028ac.tar.zst
nixpkgs-0cfcb5908cc7164236f78cd21e02cc168dd028ac.zip
nixos/*: <screen> -> <programlisting>
most of the screen tags used in option docs are actually listings of
some sort. nsd had a notable exception where its screen usage was pretty
much a raw markdown block that made most sense to convert into docbook lists.
-rw-r--r--nixos/modules/misc/label.nix9
-rw-r--r--nixos/modules/services/development/zammad.nix6
-rw-r--r--nixos/modules/services/networking/nsd.nix47
-rw-r--r--nixos/modules/services/web-apps/discourse.nix6
-rw-r--r--nixos/modules/system/activation/top-level.nix6
-rw-r--r--nixos/modules/system/boot/initrd-ssh.nix11
6 files changed, 47 insertions, 38 deletions
diff --git a/nixos/modules/misc/label.nix b/nixos/modules/misc/label.nix
index b97cbaa2630..e51e935c5c2 100644
--- a/nixos/modules/misc/label.nix
+++ b/nixos/modules/misc/label.nix
@@ -32,13 +32,14 @@ in
         Useful for not loosing track of configurations built from different
         nixos branches/revisions, e.g.:
 
-        <screen>
+        <programlisting>
         #!/bin/sh
         today=`date +%Y%m%d`
         branch=`(cd nixpkgs ; git branch 2>/dev/null | sed -n '/^\* / { s|^\* ||; p; }')`
         revision=`(cd nixpkgs ; git rev-parse HEAD)`
         export NIXOS_LABEL_VERSION="$today.$branch-''${revision:0:7}"
-        nixos-rebuild switch</screen>
+        nixos-rebuild switch
+        </programlisting>
       '';
     };
 
@@ -53,12 +54,12 @@ in
         Useful for not loosing track of configurations built with
         different options, e.g.:
 
-        <screen>
+        <programlisting>
         {
           system.nixos.tags = [ "with-xen" ];
           virtualisation.xen.enable = true;
         }
-        </screen>
+        </programlisting>
       '';
     };
 
diff --git a/nixos/modules/services/development/zammad.nix b/nixos/modules/services/development/zammad.nix
index e81eef3c0a5..b18906f776f 100644
--- a/nixos/modules/services/development/zammad.nix
+++ b/nixos/modules/services/development/zammad.nix
@@ -160,9 +160,9 @@ in
           Needs to be a 64 byte long string of hexadecimal
           characters. You can generate one by running
 
-          <screen>
-          <prompt>$ </prompt>openssl rand -hex 64 >/path/to/secret_key_base_file
-          </screen>
+          <programlisting>
+          openssl rand -hex 64 >/path/to/secret_key_base_file
+          </programlisting>
 
           This should be a string, not a nix path, since nix paths are
           copied into the world-readable nix store.
diff --git a/nixos/modules/services/networking/nsd.nix b/nixos/modules/services/networking/nsd.nix
index cf2afcacc52..8fc171b2321 100644
--- a/nixos/modules/services/networking/nsd.nix
+++ b/nixos/modules/services/networking/nsd.nix
@@ -215,22 +215,28 @@ let
                   ];
         description = ''
           Listed primary servers are allowed to notify this secondary server.
-          <screen><![CDATA[
-          Format: <ip> <key-name | NOKEY | BLOCKED>
 
-          <ip> either a plain IPv4/IPv6 address or range. Valid patters for ranges:
-          * 10.0.0.0/24            # via subnet size
-          * 10.0.0.0&255.255.255.0 # via subnet mask
-          * 10.0.0.1-10.0.0.254    # via range
+          Format: <literal>&lt;ip&gt; &lt;key-name | NOKEY | BLOCKED&gt;</literal>
 
-          A optional port number could be added with a '@':
-          * 2001:1234::1@1234
+          <literal>&lt;ip&gt;</literal> either a plain IPv4/IPv6 address or range.
+          Valid patters for ranges:
+          <itemizedlist>
+            <listitem><para><literal>10.0.0.0/24</literal>: via subnet size</para></listitem>
+            <listitem><para><literal>10.0.0.0&amp;255.255.255.0</literal>: via subnet mask</para></listitem>
+            <listitem><para><literal>10.0.0.1-10.0.0.254</literal>: via range</para></listitem>
+          </itemizedlist>
 
-          <key-name | NOKEY | BLOCKED>
-          * <key-name> will use the specified TSIG key
-          * NOKEY      no TSIG signature is required
-          * BLOCKED    notifies from non-listed or blocked IPs will be ignored
-          * ]]></screen>
+          A optional port number could be added with a '@':
+          <itemizedlist>
+            <listitem><para><literal>2001:1234::1@1234</literal></para></listitem>
+          </itemizedlist>
+
+          <literal>&lt;key-name | NOKEY | BLOCKED&gt;</literal>
+          <itemizedlist>
+            <listitem><para><literal>&lt;key-name&gt;</literal> will use the specified TSIG key</para></listitem>
+            <listitem><para><literal>NOKEY</literal> no TSIG signature is required</para></listitem>
+            <listitem><para><literal>BLOCKED</literal>notifies from non-listed or blocked IPs will be ignored</para></listitem>
+          </itemizedlist>
         '';
       };
 
@@ -347,15 +353,16 @@ let
         description = ''
           This primary server will notify all given secondary servers about
           zone changes.
-          <screen><![CDATA[
-          Format: <ip> <key-name | NOKEY>
 
-          <ip> a plain IPv4/IPv6 address with on optional port number (ip@port)
+          Format: <literal>&lt;ip&gt; &lt;key-name | NOKEY&gt;</literal>
+
+          <literal>&lt;ip&gt;</literal> a plain IPv4/IPv6 address with on optional port number (ip@port)
 
-          <key-name | NOKEY>
-          * <key-name> sign notifies with the specified key
-          * NOKEY      don't sign notifies
-          ]]></screen>
+          <literal>&lt;key-name | NOKEY&gt;</literal>
+          <itemizedlist>
+            <listitem><para><literal>&lt;key-name&gt;</literal> sign notifies with the specified key</para></listitem>
+            <listitem><para><literal>NOKEY</literal> don't sign notifies</para></listitem>
+          </itemizedlist>
         '';
       };
 
diff --git a/nixos/modules/services/web-apps/discourse.nix b/nixos/modules/services/web-apps/discourse.nix
index a1ab3bfca4a..49db9d8da5a 100644
--- a/nixos/modules/services/web-apps/discourse.nix
+++ b/nixos/modules/services/web-apps/discourse.nix
@@ -68,9 +68,9 @@ in
           Needs to be a 64 byte long string of hexadecimal
           characters. You can generate one by running
 
-          <screen>
-          <prompt>$ </prompt>openssl rand -hex 64 >/path/to/secret_key_base_file
-          </screen>
+          <programlisting>
+          openssl rand -hex 64 >/path/to/secret_key_base_file
+          </programlisting>
 
           This should be a string, not a nix path, since nix paths are
           copied into the world-readable nix store.
diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix
index 76150cc9599..9f27727cbf8 100644
--- a/nixos/modules/system/activation/top-level.nix
+++ b/nixos/modules/system/activation/top-level.nix
@@ -172,9 +172,9 @@ in
         To switch to a specialised configuration
         (e.g. <literal>fewJobsManyCores</literal>) at runtime, run:
 
-        <screen>
-        <prompt># </prompt>sudo /run/current-system/specialisation/fewJobsManyCores/bin/switch-to-configuration test
-        </screen>
+        <programlisting>
+        sudo /run/current-system/specialisation/fewJobsManyCores/bin/switch-to-configuration test
+        </programlisting>
       '';
       type = types.attrsOf (types.submodule (
         local@{ ... }: let
diff --git a/nixos/modules/system/boot/initrd-ssh.nix b/nixos/modules/system/boot/initrd-ssh.nix
index 265399e562f..171c51308a7 100644
--- a/nixos/modules/system/boot/initrd-ssh.nix
+++ b/nixos/modules/system/boot/initrd-ssh.nix
@@ -51,12 +51,13 @@ in
         Specify SSH host keys to import into the initrd.
 
         To generate keys, use
-        <citerefentry><refentrytitle>ssh-keygen</refentrytitle><manvolnum>1</manvolnum></citerefentry>:
+        <citerefentry><refentrytitle>ssh-keygen</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+        as root:
 
-        <screen>
-        <prompt># </prompt>ssh-keygen -t rsa -N "" -f /etc/secrets/initrd/ssh_host_rsa_key
-        <prompt># </prompt>ssh-keygen -t ed25519 -N "" -f /etc/secrets/initrd/ssh_host_ed25519_key
-        </screen>
+        <programlisting>
+        ssh-keygen -t rsa -N "" -f /etc/secrets/initrd/ssh_host_rsa_key
+        ssh-keygen -t ed25519 -N "" -f /etc/secrets/initrd/ssh_host_ed25519_key
+        </programlisting>
 
         <warning>
           <para>