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.

pennae 0cfcb590 5841c386

Changed files
+46 -37
nixos
modules
misc
services
development
networking
web-apps
system
activation
boot
+5 -4
nixos/modules/misc/label.nix
···
Useful for not loosing track of configurations built from different
nixos branches/revisions, e.g.:
-
<screen>
#!/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>
'';
};
···
Useful for not loosing track of configurations built with
different options, e.g.:
-
<screen>
{
system.nixos.tags = [ "with-xen" ];
virtualisation.xen.enable = true;
}
-
</screen>
'';
};
···
Useful for not loosing track of configurations built from different
nixos branches/revisions, e.g.:
+
<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
+
</programlisting>
'';
};
···
Useful for not loosing track of configurations built with
different options, e.g.:
+
<programlisting>
{
system.nixos.tags = [ "with-xen" ];
virtualisation.xen.enable = true;
}
+
</programlisting>
'';
};
+3 -3
nixos/modules/services/development/zammad.nix
···
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>
This should be a string, not a nix path, since nix paths are
copied into the world-readable nix store.
···
Needs to be a 64 byte long string of hexadecimal
characters. You can generate one by running
+
<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.
+26 -19
nixos/modules/services/networking/nsd.nix
···
];
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
A optional port number could be added with a '@':
-
* 2001:1234::1@1234
-
<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>
'';
};
···
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)
-
<key-name | NOKEY>
-
* <key-name> sign notifies with the specified key
-
* NOKEY don't sign notifies
-
]]></screen>
'';
};
···
];
description = ''
Listed primary servers are allowed to notify this secondary server.
+
+
Format: <literal>&lt;ip&gt; &lt;key-name | NOKEY | BLOCKED&gt;</literal>
+
<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>
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>
'';
};
···
description = ''
This primary server will notify all given secondary servers about
zone changes.
+
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)
+
+
<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>
'';
};
+3 -3
nixos/modules/services/web-apps/discourse.nix
···
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>
This should be a string, not a nix path, since nix paths are
copied into the world-readable nix store.
···
Needs to be a 64 byte long string of hexadecimal
characters. You can generate one by running
+
<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.
+3 -3
nixos/modules/system/activation/top-level.nix
···
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>
'';
type = types.attrsOf (types.submodule (
local@{ ... }: let
···
To switch to a specialised configuration
(e.g. <literal>fewJobsManyCores</literal>) at runtime, run:
+
<programlisting>
+
sudo /run/current-system/specialisation/fewJobsManyCores/bin/switch-to-configuration test
+
</programlisting>
'';
type = types.attrsOf (types.submodule (
local@{ ... }: let
+6 -5
nixos/modules/system/boot/initrd-ssh.nix
···
Specify SSH host keys to import into the initrd.
To generate keys, use
-
<citerefentry><refentrytitle>ssh-keygen</refentrytitle><manvolnum>1</manvolnum></citerefentry>:
-
<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>
<warning>
<para>
···
Specify SSH host keys to import into the initrd.
To generate keys, use
+
<citerefentry><refentrytitle>ssh-keygen</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+
as root:
+
<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>