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.
This commit is contained in:
pennae 2022-08-30 12:35:47 +02:00
parent 5841c386a0
commit 0cfcb5908c
6 changed files with 46 additions and 37 deletions

View File

@ -32,13 +32,14 @@ in
Useful for not loosing track of configurations built from different Useful for not loosing track of configurations built from different
nixos branches/revisions, e.g.: nixos branches/revisions, e.g.:
<screen> <programlisting>
#!/bin/sh #!/bin/sh
today=`date +%Y%m%d` today=`date +%Y%m%d`
branch=`(cd nixpkgs ; git branch 2>/dev/null | sed -n '/^\* / { s|^\* ||; p; }')` branch=`(cd nixpkgs ; git branch 2>/dev/null | sed -n '/^\* / { s|^\* ||; p; }')`
revision=`(cd nixpkgs ; git rev-parse HEAD)` revision=`(cd nixpkgs ; git rev-parse HEAD)`
export NIXOS_LABEL_VERSION="$today.$branch-''${revision:0:7}" 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 Useful for not loosing track of configurations built with
different options, e.g.: different options, e.g.:
<screen> <programlisting>
{ {
system.nixos.tags = [ "with-xen" ]; system.nixos.tags = [ "with-xen" ];
virtualisation.xen.enable = true; virtualisation.xen.enable = true;
} }
</screen> </programlisting>
''; '';
}; };

View File

@ -160,9 +160,9 @@ in
Needs to be a 64 byte long string of hexadecimal Needs to be a 64 byte long string of hexadecimal
characters. You can generate one by running characters. You can generate one by running
<screen> <programlisting>
<prompt>$ </prompt>openssl rand -hex 64 >/path/to/secret_key_base_file openssl rand -hex 64 >/path/to/secret_key_base_file
</screen> </programlisting>
This should be a string, not a nix path, since nix paths are This should be a string, not a nix path, since nix paths are
copied into the world-readable nix store. copied into the world-readable nix store.

View File

@ -215,22 +215,28 @@ let
]; ];
description = '' description = ''
Listed primary servers are allowed to notify this secondary server. 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: Format: <literal>&lt;ip&gt; &lt;key-name | NOKEY | BLOCKED&gt;</literal>
* 10.0.0.0/24 # via subnet size
* 10.0.0.0&255.255.255.0 # via subnet mask <literal>&lt;ip&gt;</literal> either a plain IPv4/IPv6 address or range.
* 10.0.0.1-10.0.0.254 # via 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>
A optional port number could be added with a '@': A optional port number could be added with a '@':
* 2001:1234::1@1234 <itemizedlist>
<listitem><para><literal>2001:1234::1@1234</literal></para></listitem>
</itemizedlist>
<key-name | NOKEY | BLOCKED> <literal>&lt;key-name | NOKEY | BLOCKED&gt;</literal>
* <key-name> will use the specified TSIG key <itemizedlist>
* NOKEY no TSIG signature is required <listitem><para><literal>&lt;key-name&gt;</literal> will use the specified TSIG key</para></listitem>
* BLOCKED notifies from non-listed or blocked IPs will be ignored <listitem><para><literal>NOKEY</literal> no TSIG signature is required</para></listitem>
* ]]></screen> <listitem><para><literal>BLOCKED</literal>notifies from non-listed or blocked IPs will be ignored</para></listitem>
</itemizedlist>
''; '';
}; };
@ -347,15 +353,16 @@ let
description = '' description = ''
This primary server will notify all given secondary servers about This primary server will notify all given secondary servers about
zone changes. 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>
<key-name | NOKEY> <literal>&lt;ip&gt;</literal> a plain IPv4/IPv6 address with on optional port number (ip@port)
* <key-name> sign notifies with the specified key
* NOKEY don't sign notifies <literal>&lt;key-name | NOKEY&gt;</literal>
]]></screen> <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>
''; '';
}; };

View File

@ -68,9 +68,9 @@ in
Needs to be a 64 byte long string of hexadecimal Needs to be a 64 byte long string of hexadecimal
characters. You can generate one by running characters. You can generate one by running
<screen> <programlisting>
<prompt>$ </prompt>openssl rand -hex 64 >/path/to/secret_key_base_file openssl rand -hex 64 >/path/to/secret_key_base_file
</screen> </programlisting>
This should be a string, not a nix path, since nix paths are This should be a string, not a nix path, since nix paths are
copied into the world-readable nix store. copied into the world-readable nix store.

View File

@ -172,9 +172,9 @@ in
To switch to a specialised configuration To switch to a specialised configuration
(e.g. <literal>fewJobsManyCores</literal>) at runtime, run: (e.g. <literal>fewJobsManyCores</literal>) at runtime, run:
<screen> <programlisting>
<prompt># </prompt>sudo /run/current-system/specialisation/fewJobsManyCores/bin/switch-to-configuration test sudo /run/current-system/specialisation/fewJobsManyCores/bin/switch-to-configuration test
</screen> </programlisting>
''; '';
type = types.attrsOf (types.submodule ( type = types.attrsOf (types.submodule (
local@{ ... }: let local@{ ... }: let

View File

@ -51,12 +51,13 @@ in
Specify SSH host keys to import into the initrd. Specify SSH host keys to import into the initrd.
To generate keys, use 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> <programlisting>
<prompt># </prompt>ssh-keygen -t rsa -N "" -f /etc/secrets/initrd/ssh_host_rsa_key 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 ssh-keygen -t ed25519 -N "" -f /etc/secrets/initrd/ssh_host_ed25519_key
</screen> </programlisting>
<warning> <warning>
<para> <para>