nixos/*: literalDocBook -> literalMD

no change to rendered output
This commit is contained in:
pennae
2022-08-20 22:27:20 +02:00
committed by pennae
parent 169072fb60
commit 51a11254a7
31 changed files with 48 additions and 47 deletions

View File

@@ -35,7 +35,7 @@ in
networking.hostFiles = lib.mkOption { networking.hostFiles = lib.mkOption {
type = types.listOf types.path; type = types.listOf types.path;
defaultText = literalDocBook "Hosts from <option>networking.hosts</option> and <option>networking.extraHosts</option>"; defaultText = literalMD "Hosts from {option}`networking.hosts` and {option}`networking.extraHosts`";
example = literalExpression ''[ "''${pkgs.my-blocklist-package}/share/my-blocklist/hosts" ]''; example = literalExpression ''[ "''${pkgs.my-blocklist-package}/share/my-blocklist/hosts" ]'';
description = lib.mdDoc '' description = lib.mdDoc ''
Files that should be concatenated together to form {file}`/etc/hosts`. Files that should be concatenated together to form {file}`/etc/hosts`.

View File

@@ -78,10 +78,11 @@ in
defaultPackages = mkOption { defaultPackages = mkOption {
type = types.listOf types.package; type = types.listOf types.package;
default = defaultPackages; default = defaultPackages;
defaultText = literalDocBook '' defaultText = literalMD ''
these packages, with their <literal>meta.priority</literal> numerically increased these packages, with their `meta.priority` numerically increased
(thus lowering their installation priority): (thus lowering their installation priority):
<programlisting>${defaultPackagesText}</programlisting>
${defaultPackagesText}
''; '';
example = []; example = [];
description = lib.mdDoc '' description = lib.mdDoc ''

View File

@@ -183,8 +183,8 @@ in
pruneNames = mkOption { pruneNames = mkOption {
type = listOf str; type = listOf str;
default = lib.optionals (!isFindutils) [ ".bzr" ".cache" ".git" ".hg" ".svn" ]; default = lib.optionals (!isFindutils) [ ".bzr" ".cache" ".git" ".hg" ".svn" ];
defaultText = literalDocBook '' defaultText = literalMD ''
<literal>[ ".bzr" ".cache" ".git" ".hg" ".svn" ]</literal>, if `[ ".bzr" ".cache" ".git" ".hg" ".svn" ]`, if
supported by the locate implementation (i.e. mlocate or plocate). supported by the locate implementation (i.e. mlocate or plocate).
''; '';
description = lib.mdDoc '' description = lib.mdDoc ''

View File

@@ -71,7 +71,7 @@ in
type = types.nullOr (types.enum pkgs.pinentry.flavors); type = types.nullOr (types.enum pkgs.pinentry.flavors);
example = "gnome3"; example = "gnome3";
default = defaultPinentryFlavor; default = defaultPinentryFlavor;
defaultText = literalDocBook ''matching the configured desktop environment''; defaultText = literalMD ''matching the configured desktop environment'';
description = lib.mdDoc '' description = lib.mdDoc ''
Which pinentry interface to use. If not null, the path to the Which pinentry interface to use. If not null, the path to the
pinentry binary will be passed to gpg-agent via commandline and pinentry binary will be passed to gpg-agent via commandline and

View File

@@ -128,9 +128,9 @@ in {
mpdCfg.credentials).passwordFile mpdCfg.credentials).passwordFile
else else
null; null;
defaultText = literalDocBook '' defaultText = literalMD ''
The first password file with read access configured for MPD when using a local instance, The first password file with read access configured for MPD when using a local instance,
otherwise <literal>null</literal>. otherwise `null`.
''; '';
type = types.nullOr types.str; type = types.nullOr types.str;
description = lib.mdDoc '' description = lib.mdDoc ''

View File

@@ -23,9 +23,9 @@ in {
take 3 (splitString "." config.services.kubernetes.apiserver.serviceClusterIpRange take 3 (splitString "." config.services.kubernetes.apiserver.serviceClusterIpRange
)) ))
) + ".254"; ) + ".254";
defaultText = literalDocBook '' defaultText = literalMD ''
The <literal>x.y.z.254</literal> IP of The `x.y.z.254` IP of
<literal>config.${options.services.kubernetes.apiserver.serviceClusterIpRange}</literal>. `config.${options.services.kubernetes.apiserver.serviceClusterIpRange}`.
''; '';
type = types.str; type = types.str;
}; };

View File

@@ -40,7 +40,7 @@ let
key = mkOption { key = mkOption {
description = lib.mdDoc "Key of taint."; description = lib.mdDoc "Key of taint.";
default = name; default = name;
defaultText = literalDocBook "Name of this submodule."; defaultText = literalMD "Name of this submodule.";
type = str; type = str;
}; };
value = mkOption { value = mkOption {

View File

@@ -281,9 +281,9 @@ in
type = types.path; type = types.path;
internal = true; internal = true;
default = etcSlurm; default = etcSlurm;
defaultText = literalDocBook '' defaultText = literalMD ''
Directory created from generated config files and Directory created from generated config files and
<literal>config.${opt.extraConfigPaths}</literal>. `config.${opt.extraConfigPaths}`.
''; '';
description = '' description = ''
Path to directory with slurm config files. This option is set by default from the Path to directory with slurm config files. This option is set by default from the

View File

@@ -94,7 +94,7 @@ in {
type = types.path; type = types.path;
description = lib.mdDoc "Optionally pass master.cfg path. Other options in this configuration will be ignored."; description = lib.mdDoc "Optionally pass master.cfg path. Other options in this configuration will be ignored.";
default = defaultMasterCfg; default = defaultMasterCfg;
defaultText = literalDocBook ''generated configuration file''; defaultText = literalMD ''generated configuration file'';
example = "/etc/nixos/buildbot/master.cfg"; example = "/etc/nixos/buildbot/master.cfg";
}; };

View File

@@ -168,7 +168,7 @@ let
hooksPath = mkOption { hooksPath = mkOption {
type = types.path; type = types.path;
default = hooksDir config; default = hooksDir config;
defaultText = literalDocBook "generated from <option>services.buildkite-agents.&lt;name&gt;.hooks</option>"; defaultText = literalMD "generated from {option}`services.buildkite-agents.<name>.hooks`";
description = lib.mdDoc '' description = lib.mdDoc ''
Path to the directory storing the hooks. Path to the directory storing the hooks.
Consider using {option}`services.buildkite-agents.<name>.hooks.<name>` Consider using {option}`services.buildkite-agents.<name>.hooks.<name>`

View File

@@ -10,7 +10,7 @@
let let
inherit (lib) inherit (lib)
filterAttrs filterAttrs
literalDocBook literalMD
literalExpression literalExpression
mkIf mkIf
mkOption mkOption
@@ -235,7 +235,7 @@ in
tomlFile = mkOption { tomlFile = mkOption {
type = types.path; type = types.path;
internal = true; internal = true;
defaultText = literalDocBook "generated <literal>hercules-ci-agent.toml</literal>"; defaultText = literalMD "generated `hercules-ci-agent.toml`";
description = '' description = ''
The fully assembled config file. The fully assembled config file.
''; '';

View File

@@ -71,7 +71,7 @@ in {
baseq3 = mkOption { baseq3 = mkOption {
type = types.either types.package types.path; type = types.either types.package types.path;
default = defaultBaseq3; default = defaultBaseq3;
defaultText = literalDocBook "Manually downloaded Quake 3 installation directory."; defaultText = literalMD "Manually downloaded Quake 3 installation directory.";
example = "/var/lib/q3ds"; example = "/var/lib/q3ds";
description = lib.mdDoc '' description = lib.mdDoc ''
Path to the baseq3 files (pak*.pk3). If this is on the nix store (type = package) all .pk3 files should be saved Path to the baseq3 files (pak*.pk3). If this is on the nix store (type = package) all .pk3 files should be saved

View File

@@ -47,7 +47,7 @@ in
$highlight_bin = "${pkgs.highlight}/bin/highlight"; $highlight_bin = "${pkgs.highlight}/bin/highlight";
${cfg.extraConfig} ${cfg.extraConfig}
''; '';
defaultText = literalDocBook "generated config file"; defaultText = literalMD "generated config file";
type = types.path; type = types.path;
readOnly = true; readOnly = true;
internal = true; internal = true;

View File

@@ -401,7 +401,7 @@ in
config = mkOption { config = mkOption {
internal = true; internal = true;
default = pkgs.writeText "rippled.conf" rippledCfg; default = pkgs.writeText "rippled.conf" rippledCfg;
defaultText = literalDocBook "generated config file"; defaultText = literalMD "generated config file";
}; };
}; };
}; };

View File

@@ -83,8 +83,8 @@ let
mkArgumentsOption = cmd: mkOption { mkArgumentsOption = cmd: mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = argumentsOf cmd; default = argumentsOf cmd;
defaultText = literalDocBook '' defaultText = literalMD ''
calculated from <literal>config.services.thanos.${cmd}</literal> calculated from `config.services.thanos.${cmd}`
''; '';
description = lib.mdDoc '' description = lib.mdDoc ''
Arguments to the `thanos ${cmd}` command. Arguments to the `thanos ${cmd}` command.

View File

@@ -56,7 +56,7 @@ in
''} ''}
${pkgs.remarshal}/bin/json2toml < config.json > $out ${pkgs.remarshal}/bin/json2toml < config.json > $out
''; '';
defaultText = literalDocBook "TOML file generated from <option>services.dnscrypt-proxy2.settings</option>"; defaultText = literalMD "TOML file generated from {option}`services.dnscrypt-proxy2.settings`";
}; };
}; };

View File

@@ -30,7 +30,7 @@ in {
config = mkOption { config = mkOption {
description = lib.mdDoc "Verbatim ferm.conf configuration."; description = lib.mdDoc "Verbatim ferm.conf configuration.";
default = ""; default = "";
defaultText = literalDocBook "empty firewall, allows any traffic"; defaultText = literalMD "empty firewall, allows any traffic";
type = types.lines; type = types.lines;
}; };
package = mkOption { package = mkOption {

View File

@@ -417,7 +417,7 @@ in
checkReversePath = mkOption { checkReversePath = mkOption {
type = types.either types.bool (types.enum ["strict" "loose"]); type = types.either types.bool (types.enum ["strict" "loose"]);
default = kernelHasRPFilter; default = kernelHasRPFilter;
defaultText = literalDocBook "<literal>true</literal> if supported by the chosen kernel"; defaultText = literalMD "`true` if supported by the chosen kernel";
example = "loose"; example = "loose";
description = description =
lib.mdDoc '' lib.mdDoc ''

View File

@@ -88,7 +88,7 @@ in
name = "nftables-rules"; name = "nftables-rules";
text = cfg.ruleset; text = cfg.ruleset;
}; };
defaultText = literalDocBook ''a file with the contents of <option>networking.nftables.ruleset</option>''; defaultText = literalMD ''a file with the contents of {option}`networking.nftables.ruleset`'';
description = description =
lib.mdDoc '' lib.mdDoc ''
The ruleset file to be used with nftables. Should be in a format that The ruleset file to be used with nftables. Should be in a format that

View File

@@ -100,7 +100,7 @@ in
confDir = mkOption { confDir = mkOption {
type = types.path; type = types.path;
default = confDir; default = confDir;
defaultText = literalDocBook "generated from configuration"; defaultText = literalMD "generated from configuration";
description = lib.mdDoc "The location of the config files for xrdp."; description = lib.mdDoc "The location of the config files for xrdp.";
}; };
}; };

View File

@@ -100,9 +100,9 @@ in
enableACME = lib.mkOption { enableACME = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = cfg.sslCertificate == null && cfg.sslCertificateKey == null; default = cfg.sslCertificate == null && cfg.sslCertificateKey == null;
defaultText = lib.literalDocBook '' defaultText = lib.literalMD ''
<literal>true</literal>, unless <option>services.discourse.sslCertificate</option> `true`, unless {option}`services.discourse.sslCertificate`
and <option>services.discourse.sslCertificateKey</option> are set. and {option}`services.discourse.sslCertificateKey` are set.
''; '';
description = lib.mdDoc '' description = lib.mdDoc ''
Whether an ACME certificate should be used to secure Whether an ACME certificate should be used to secure

View File

@@ -20,7 +20,7 @@ let
mkDefault mkDefault
literalExpression literalExpression
isAttrs isAttrs
literalDocBook literalMD
maintainers maintainers
catAttrs catAttrs
collect collect
@@ -165,7 +165,7 @@ in
mkOption { mkOption {
type = port; type = port;
default = dbPorts.${cfg.database.type}; default = dbPorts.${cfg.database.type};
defaultText = literalDocBook "default port of selected database"; defaultText = literalMD "default port of selected database";
description = lib.mdDoc '' description = lib.mdDoc ''
Port of the database to connect to. Port of the database to connect to.
''; '';

View File

@@ -527,7 +527,7 @@ in {
occ = mkOption { occ = mkOption {
type = types.package; type = types.package;
default = occ; default = occ;
defaultText = literalDocBook "generated script"; defaultText = literalMD "generated script";
internal = true; internal = true;
description = '' description = ''
The nextcloud-occ program preconfigured to target this Nextcloud instance. The nextcloud-occ program preconfigured to target this Nextcloud instance.

View File

@@ -30,8 +30,8 @@ in
collectionCgi = mkOption { collectionCgi = mkOption {
type = types.path; type = types.path;
default = defaultCollectionCgi; default = defaultCollectionCgi;
defaultText = literalDocBook '' defaultText = literalMD ''
<literal>config.${options.services.collectd.package}</literal> configured for lighttpd `config.${options.services.collectd.package}` configured for lighttpd
''; '';
description = lib.mdDoc '' description = lib.mdDoc ''
Path to collection.cgi script from (collectd sources)/contrib/collection.cgi Path to collection.cgi script from (collectd sources)/contrib/collection.cgi

View File

@@ -62,7 +62,7 @@ in
ipAllow = mkOption { ipAllow = mkOption {
type = types.nullOr yaml.type; type = types.nullOr yaml.type;
default = lib.importJSON ./ip_allow.json; default = lib.importJSON ./ip_allow.json;
defaultText = literalDocBook "upstream defaults"; defaultText = literalMD "upstream defaults";
example = literalExpression '' example = literalExpression ''
{ {
ip_allow = [{ ip_allow = [{
@@ -85,7 +85,7 @@ in
logging = mkOption { logging = mkOption {
type = types.nullOr yaml.type; type = types.nullOr yaml.type;
default = lib.importJSON ./logging.json; default = lib.importJSON ./logging.json;
defaultText = literalDocBook "upstream defaults"; defaultText = literalMD "upstream defaults";
example = { }; example = { };
description = lib.mdDoc '' description = lib.mdDoc ''
Configure logs. Configure logs.

View File

@@ -285,7 +285,7 @@ in
defaultSessionFromLegacyOptions defaultSessionFromLegacyOptions
else else
null; null;
defaultText = literalDocBook '' defaultText = literalMD ''
Taken from display manager settings or window manager settings, if either is set. Taken from display manager settings or window manager settings, if either is set.
''; '';
example = "gnome"; example = "gnome";

View File

@@ -143,7 +143,7 @@ in
readOnly = true; readOnly = true;
internal = true; internal = true;
default = systemActivationScript (removeAttrs config.system.activationScripts [ "script" ]) true; default = systemActivationScript (removeAttrs config.system.activationScripts [ "script" ]) true;
defaultText = literalDocBook "generated activation script"; defaultText = literalMD "generated activation script";
}; };
system.userActivationScripts = mkOption { system.userActivationScripts = mkOption {

View File

@@ -75,10 +75,10 @@ in
themePackages = mkOption { themePackages = mkOption {
default = lib.optional (cfg.theme == "breeze") nixosBreezePlymouth; default = lib.optional (cfg.theme == "breeze") nixosBreezePlymouth;
defaultText = literalDocBook '' defaultText = literalMD ''
A NixOS branded variant of the breeze theme when A NixOS branded variant of the breeze theme when
<literal>config.${opt.theme} == "breeze"</literal>, otherwise `config.${opt.theme} == "breeze"`, otherwise
<literal>[ ]</literal>. `[ ]`.
''; '';
type = types.listOf types.package; type = types.listOf types.package;
description = lib.mdDoc '' description = lib.mdDoc ''

View File

@@ -611,7 +611,7 @@ in
then "zstd" then "zstd"
else "gzip" else "gzip"
); );
defaultText = literalDocBook "<literal>zstd</literal> if the kernel supports it (5.9+), <literal>gzip</literal> if not"; defaultText = literalMD "`zstd` if the kernel supports it (5.9+), `gzip` if not";
type = types.either types.str (types.functionTo types.str); type = types.either types.str (types.functionTo types.str);
description = '' description = ''
The compressor to use on the initrd image. May be any of: The compressor to use on the initrd image. May be any of:

View File

@@ -209,7 +209,7 @@ in
readOnly = true; readOnly = true;
type = types.bool; type = types.bool;
default = inInitrd || inSystem; default = inInitrd || inSystem;
defaultText = literalDocBook "<literal>true</literal> if ZFS filesystem support is enabled"; defaultText = literalMD "`true` if ZFS filesystem support is enabled";
description = lib.mdDoc "True if ZFS filesystem support is enabled"; description = lib.mdDoc "True if ZFS filesystem support is enabled";
}; };

View File

@@ -20,7 +20,7 @@ in {
options.virtualisation.digitalOcean.defaultConfigFile = mkOption { options.virtualisation.digitalOcean.defaultConfigFile = mkOption {
type = types.path; type = types.path;
default = defaultConfigFile; default = defaultConfigFile;
defaultText = literalDocBook '' defaultText = literalMD ''
The default configuration imports user-data if applicable and The default configuration imports user-data if applicable and
`(modulesPath + "/virtualisation/digital-ocean-config.nix")`. `(modulesPath + "/virtualisation/digital-ocean-config.nix")`.
''; '';