From 51a11254a7031ddfaa820e7dec55436f74881da9 Mon Sep 17 00:00:00 2001 From: pennae Date: Sat, 20 Aug 2022 22:27:20 +0200 Subject: [PATCH] nixos/*: literalDocBook -> literalMD no change to rendered output --- nixos/modules/config/networking.nix | 2 +- nixos/modules/config/system-path.nix | 7 ++++--- nixos/modules/misc/locate.nix | 4 ++-- nixos/modules/programs/gnupg.nix | 2 +- nixos/modules/services/audio/mpdscribble.nix | 4 ++-- nixos/modules/services/cluster/kubernetes/addons/dns.nix | 6 +++--- nixos/modules/services/cluster/kubernetes/kubelet.nix | 2 +- nixos/modules/services/computing/slurm/slurm.nix | 4 ++-- .../services/continuous-integration/buildbot/master.nix | 2 +- .../services/continuous-integration/buildkite-agents.nix | 2 +- .../continuous-integration/hercules-ci-agent/common.nix | 4 ++-- nixos/modules/services/games/quake3-server.nix | 2 +- nixos/modules/services/misc/gitweb.nix | 2 +- nixos/modules/services/misc/rippled.nix | 2 +- nixos/modules/services/monitoring/thanos.nix | 4 ++-- nixos/modules/services/networking/dnscrypt-proxy2.nix | 2 +- nixos/modules/services/networking/ferm.nix | 2 +- nixos/modules/services/networking/firewall.nix | 2 +- nixos/modules/services/networking/nftables.nix | 2 +- nixos/modules/services/networking/xrdp.nix | 2 +- nixos/modules/services/web-apps/discourse.nix | 6 +++--- nixos/modules/services/web-apps/keycloak.nix | 4 ++-- nixos/modules/services/web-apps/nextcloud.nix | 2 +- nixos/modules/services/web-servers/lighttpd/collectd.nix | 4 ++-- .../modules/services/web-servers/trafficserver/default.nix | 4 ++-- nixos/modules/services/x11/display-managers/default.nix | 2 +- nixos/modules/system/activation/activation-script.nix | 2 +- nixos/modules/system/boot/plymouth.nix | 6 +++--- nixos/modules/system/boot/stage-1.nix | 2 +- nixos/modules/tasks/filesystems/zfs.nix | 2 +- nixos/modules/virtualisation/digital-ocean-init.nix | 2 +- 31 files changed, 48 insertions(+), 47 deletions(-) diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix index 185eff746de0..22e580233a10 100644 --- a/nixos/modules/config/networking.nix +++ b/nixos/modules/config/networking.nix @@ -35,7 +35,7 @@ in networking.hostFiles = lib.mkOption { type = types.listOf types.path; - defaultText = literalDocBook "Hosts from and "; + defaultText = literalMD "Hosts from {option}`networking.hosts` and {option}`networking.extraHosts`"; example = literalExpression ''[ "''${pkgs.my-blocklist-package}/share/my-blocklist/hosts" ]''; description = lib.mdDoc '' Files that should be concatenated together to form {file}`/etc/hosts`. diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix index b2d546b721de..a35510b215fc 100644 --- a/nixos/modules/config/system-path.nix +++ b/nixos/modules/config/system-path.nix @@ -78,10 +78,11 @@ in defaultPackages = mkOption { type = types.listOf types.package; default = defaultPackages; - defaultText = literalDocBook '' - these packages, with their meta.priority numerically increased + defaultText = literalMD '' + these packages, with their `meta.priority` numerically increased (thus lowering their installation priority): - ${defaultPackagesText} + + ${defaultPackagesText} ''; example = []; description = lib.mdDoc '' diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix index b83e280b2846..acf441cda628 100644 --- a/nixos/modules/misc/locate.nix +++ b/nixos/modules/misc/locate.nix @@ -183,8 +183,8 @@ in pruneNames = mkOption { type = listOf str; default = lib.optionals (!isFindutils) [ ".bzr" ".cache" ".git" ".hg" ".svn" ]; - defaultText = literalDocBook '' - [ ".bzr" ".cache" ".git" ".hg" ".svn" ], if + defaultText = literalMD '' + `[ ".bzr" ".cache" ".git" ".hg" ".svn" ]`, if supported by the locate implementation (i.e. mlocate or plocate). ''; description = lib.mdDoc '' diff --git a/nixos/modules/programs/gnupg.nix b/nixos/modules/programs/gnupg.nix index ad27766b72ec..1028ef53bae1 100644 --- a/nixos/modules/programs/gnupg.nix +++ b/nixos/modules/programs/gnupg.nix @@ -71,7 +71,7 @@ in type = types.nullOr (types.enum pkgs.pinentry.flavors); example = "gnome3"; default = defaultPinentryFlavor; - defaultText = literalDocBook ''matching the configured desktop environment''; + defaultText = literalMD ''matching the configured desktop environment''; description = lib.mdDoc '' Which pinentry interface to use. If not null, the path to the pinentry binary will be passed to gpg-agent via commandline and diff --git a/nixos/modules/services/audio/mpdscribble.nix b/nixos/modules/services/audio/mpdscribble.nix index d829bc7ae0d0..01d4c11e734a 100644 --- a/nixos/modules/services/audio/mpdscribble.nix +++ b/nixos/modules/services/audio/mpdscribble.nix @@ -128,9 +128,9 @@ in { mpdCfg.credentials).passwordFile else null; - defaultText = literalDocBook '' + defaultText = literalMD '' The first password file with read access configured for MPD when using a local instance, - otherwise null. + otherwise `null`. ''; type = types.nullOr types.str; description = lib.mdDoc '' diff --git a/nixos/modules/services/cluster/kubernetes/addons/dns.nix b/nixos/modules/services/cluster/kubernetes/addons/dns.nix index 5b1e9a687682..5b7790a64577 100644 --- a/nixos/modules/services/cluster/kubernetes/addons/dns.nix +++ b/nixos/modules/services/cluster/kubernetes/addons/dns.nix @@ -23,9 +23,9 @@ in { take 3 (splitString "." config.services.kubernetes.apiserver.serviceClusterIpRange )) ) + ".254"; - defaultText = literalDocBook '' - The x.y.z.254 IP of - config.${options.services.kubernetes.apiserver.serviceClusterIpRange}. + defaultText = literalMD '' + The `x.y.z.254` IP of + `config.${options.services.kubernetes.apiserver.serviceClusterIpRange}`. ''; type = types.str; }; diff --git a/nixos/modules/services/cluster/kubernetes/kubelet.nix b/nixos/modules/services/cluster/kubernetes/kubelet.nix index cbb1cffc1694..2489cb2be7ce 100644 --- a/nixos/modules/services/cluster/kubernetes/kubelet.nix +++ b/nixos/modules/services/cluster/kubernetes/kubelet.nix @@ -40,7 +40,7 @@ let key = mkOption { description = lib.mdDoc "Key of taint."; default = name; - defaultText = literalDocBook "Name of this submodule."; + defaultText = literalMD "Name of this submodule."; type = str; }; value = mkOption { diff --git a/nixos/modules/services/computing/slurm/slurm.nix b/nixos/modules/services/computing/slurm/slurm.nix index 0860b9a220c3..21877456754b 100644 --- a/nixos/modules/services/computing/slurm/slurm.nix +++ b/nixos/modules/services/computing/slurm/slurm.nix @@ -281,9 +281,9 @@ in type = types.path; internal = true; default = etcSlurm; - defaultText = literalDocBook '' + defaultText = literalMD '' Directory created from generated config files and - config.${opt.extraConfigPaths}. + `config.${opt.extraConfigPaths}`. ''; description = '' Path to directory with slurm config files. This option is set by default from the diff --git a/nixos/modules/services/continuous-integration/buildbot/master.nix b/nixos/modules/services/continuous-integration/buildbot/master.nix index ab1a8076c935..d9055149b77f 100644 --- a/nixos/modules/services/continuous-integration/buildbot/master.nix +++ b/nixos/modules/services/continuous-integration/buildbot/master.nix @@ -94,7 +94,7 @@ in { type = types.path; description = lib.mdDoc "Optionally pass master.cfg path. Other options in this configuration will be ignored."; default = defaultMasterCfg; - defaultText = literalDocBook ''generated configuration file''; + defaultText = literalMD ''generated configuration file''; example = "/etc/nixos/buildbot/master.cfg"; }; diff --git a/nixos/modules/services/continuous-integration/buildkite-agents.nix b/nixos/modules/services/continuous-integration/buildkite-agents.nix index 8e8a65b56b78..3d29a641a195 100644 --- a/nixos/modules/services/continuous-integration/buildkite-agents.nix +++ b/nixos/modules/services/continuous-integration/buildkite-agents.nix @@ -168,7 +168,7 @@ let hooksPath = mkOption { type = types.path; default = hooksDir config; - defaultText = literalDocBook "generated from "; + defaultText = literalMD "generated from {option}`services.buildkite-agents..hooks`"; description = lib.mdDoc '' Path to the directory storing the hooks. Consider using {option}`services.buildkite-agents..hooks.` diff --git a/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix b/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix index 83518344b36b..6f803236daad 100644 --- a/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix +++ b/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix @@ -10,7 +10,7 @@ let inherit (lib) filterAttrs - literalDocBook + literalMD literalExpression mkIf mkOption @@ -235,7 +235,7 @@ in tomlFile = mkOption { type = types.path; internal = true; - defaultText = literalDocBook "generated hercules-ci-agent.toml"; + defaultText = literalMD "generated `hercules-ci-agent.toml`"; description = '' The fully assembled config file. ''; diff --git a/nixos/modules/services/games/quake3-server.nix b/nixos/modules/services/games/quake3-server.nix index 69fdbc50d87d..ee1bb9aad47a 100644 --- a/nixos/modules/services/games/quake3-server.nix +++ b/nixos/modules/services/games/quake3-server.nix @@ -71,7 +71,7 @@ in { baseq3 = mkOption { type = types.either types.package types.path; default = defaultBaseq3; - defaultText = literalDocBook "Manually downloaded Quake 3 installation directory."; + defaultText = literalMD "Manually downloaded Quake 3 installation directory."; example = "/var/lib/q3ds"; 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 diff --git a/nixos/modules/services/misc/gitweb.nix b/nixos/modules/services/misc/gitweb.nix index ef20347ee245..aac0dac8a080 100644 --- a/nixos/modules/services/misc/gitweb.nix +++ b/nixos/modules/services/misc/gitweb.nix @@ -47,7 +47,7 @@ in $highlight_bin = "${pkgs.highlight}/bin/highlight"; ${cfg.extraConfig} ''; - defaultText = literalDocBook "generated config file"; + defaultText = literalMD "generated config file"; type = types.path; readOnly = true; internal = true; diff --git a/nixos/modules/services/misc/rippled.nix b/nixos/modules/services/misc/rippled.nix index 8b6704c1be77..5af48af740f4 100644 --- a/nixos/modules/services/misc/rippled.nix +++ b/nixos/modules/services/misc/rippled.nix @@ -401,7 +401,7 @@ in config = mkOption { internal = true; default = pkgs.writeText "rippled.conf" rippledCfg; - defaultText = literalDocBook "generated config file"; + defaultText = literalMD "generated config file"; }; }; }; diff --git a/nixos/modules/services/monitoring/thanos.nix b/nixos/modules/services/monitoring/thanos.nix index c7404241fbf5..fabc3f867f9a 100644 --- a/nixos/modules/services/monitoring/thanos.nix +++ b/nixos/modules/services/monitoring/thanos.nix @@ -83,8 +83,8 @@ let mkArgumentsOption = cmd: mkOption { type = types.listOf types.str; default = argumentsOf cmd; - defaultText = literalDocBook '' - calculated from config.services.thanos.${cmd} + defaultText = literalMD '' + calculated from `config.services.thanos.${cmd}` ''; description = lib.mdDoc '' Arguments to the `thanos ${cmd}` command. diff --git a/nixos/modules/services/networking/dnscrypt-proxy2.nix b/nixos/modules/services/networking/dnscrypt-proxy2.nix index ff7934101039..60e9a91bc176 100644 --- a/nixos/modules/services/networking/dnscrypt-proxy2.nix +++ b/nixos/modules/services/networking/dnscrypt-proxy2.nix @@ -56,7 +56,7 @@ in ''} ${pkgs.remarshal}/bin/json2toml < config.json > $out ''; - defaultText = literalDocBook "TOML file generated from "; + defaultText = literalMD "TOML file generated from {option}`services.dnscrypt-proxy2.settings`"; }; }; diff --git a/nixos/modules/services/networking/ferm.nix b/nixos/modules/services/networking/ferm.nix index ea96a736fecf..09151eb0b544 100644 --- a/nixos/modules/services/networking/ferm.nix +++ b/nixos/modules/services/networking/ferm.nix @@ -30,7 +30,7 @@ in { config = mkOption { description = lib.mdDoc "Verbatim ferm.conf configuration."; default = ""; - defaultText = literalDocBook "empty firewall, allows any traffic"; + defaultText = literalMD "empty firewall, allows any traffic"; type = types.lines; }; package = mkOption { diff --git a/nixos/modules/services/networking/firewall.nix b/nixos/modules/services/networking/firewall.nix index 48cb83e344ec..7f42df0b08ff 100644 --- a/nixos/modules/services/networking/firewall.nix +++ b/nixos/modules/services/networking/firewall.nix @@ -417,7 +417,7 @@ in checkReversePath = mkOption { type = types.either types.bool (types.enum ["strict" "loose"]); default = kernelHasRPFilter; - defaultText = literalDocBook "true if supported by the chosen kernel"; + defaultText = literalMD "`true` if supported by the chosen kernel"; example = "loose"; description = lib.mdDoc '' diff --git a/nixos/modules/services/networking/nftables.nix b/nixos/modules/services/networking/nftables.nix index 4e7d5ce59ce8..008528ad35bb 100644 --- a/nixos/modules/services/networking/nftables.nix +++ b/nixos/modules/services/networking/nftables.nix @@ -88,7 +88,7 @@ in name = "nftables-rules"; text = cfg.ruleset; }; - defaultText = literalDocBook ''a file with the contents of ''; + defaultText = literalMD ''a file with the contents of {option}`networking.nftables.ruleset`''; description = lib.mdDoc '' The ruleset file to be used with nftables. Should be in a format that diff --git a/nixos/modules/services/networking/xrdp.nix b/nixos/modules/services/networking/xrdp.nix index 17caeab27264..761f576495a6 100644 --- a/nixos/modules/services/networking/xrdp.nix +++ b/nixos/modules/services/networking/xrdp.nix @@ -100,7 +100,7 @@ in confDir = mkOption { type = types.path; default = confDir; - defaultText = literalDocBook "generated from configuration"; + defaultText = literalMD "generated from configuration"; description = lib.mdDoc "The location of the config files for xrdp."; }; }; diff --git a/nixos/modules/services/web-apps/discourse.nix b/nixos/modules/services/web-apps/discourse.nix index 0ebc6f5399c0..a1ab3bfca4a6 100644 --- a/nixos/modules/services/web-apps/discourse.nix +++ b/nixos/modules/services/web-apps/discourse.nix @@ -100,9 +100,9 @@ in enableACME = lib.mkOption { type = lib.types.bool; default = cfg.sslCertificate == null && cfg.sslCertificateKey == null; - defaultText = lib.literalDocBook '' - true, unless - and are set. + defaultText = lib.literalMD '' + `true`, unless {option}`services.discourse.sslCertificate` + and {option}`services.discourse.sslCertificateKey` are set. ''; description = lib.mdDoc '' Whether an ACME certificate should be used to secure diff --git a/nixos/modules/services/web-apps/keycloak.nix b/nixos/modules/services/web-apps/keycloak.nix index b878cb74b52e..26bed24eed27 100644 --- a/nixos/modules/services/web-apps/keycloak.nix +++ b/nixos/modules/services/web-apps/keycloak.nix @@ -20,7 +20,7 @@ let mkDefault literalExpression isAttrs - literalDocBook + literalMD maintainers catAttrs collect @@ -165,7 +165,7 @@ in mkOption { type = port; default = dbPorts.${cfg.database.type}; - defaultText = literalDocBook "default port of selected database"; + defaultText = literalMD "default port of selected database"; description = lib.mdDoc '' Port of the database to connect to. ''; diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index efd4d0af7605..84c6b077d03f 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -527,7 +527,7 @@ in { occ = mkOption { type = types.package; default = occ; - defaultText = literalDocBook "generated script"; + defaultText = literalMD "generated script"; internal = true; description = '' The nextcloud-occ program preconfigured to target this Nextcloud instance. diff --git a/nixos/modules/services/web-servers/lighttpd/collectd.nix b/nixos/modules/services/web-servers/lighttpd/collectd.nix index 270517a4e2a5..78d507f1d7d4 100644 --- a/nixos/modules/services/web-servers/lighttpd/collectd.nix +++ b/nixos/modules/services/web-servers/lighttpd/collectd.nix @@ -30,8 +30,8 @@ in collectionCgi = mkOption { type = types.path; default = defaultCollectionCgi; - defaultText = literalDocBook '' - config.${options.services.collectd.package} configured for lighttpd + defaultText = literalMD '' + `config.${options.services.collectd.package}` configured for lighttpd ''; description = lib.mdDoc '' Path to collection.cgi script from (collectd sources)/contrib/collection.cgi diff --git a/nixos/modules/services/web-servers/trafficserver/default.nix b/nixos/modules/services/web-servers/trafficserver/default.nix index beb5e437c5b1..51d6b9050f59 100644 --- a/nixos/modules/services/web-servers/trafficserver/default.nix +++ b/nixos/modules/services/web-servers/trafficserver/default.nix @@ -62,7 +62,7 @@ in ipAllow = mkOption { type = types.nullOr yaml.type; default = lib.importJSON ./ip_allow.json; - defaultText = literalDocBook "upstream defaults"; + defaultText = literalMD "upstream defaults"; example = literalExpression '' { ip_allow = [{ @@ -85,7 +85,7 @@ in logging = mkOption { type = types.nullOr yaml.type; default = lib.importJSON ./logging.json; - defaultText = literalDocBook "upstream defaults"; + defaultText = literalMD "upstream defaults"; example = { }; description = lib.mdDoc '' Configure logs. diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index 03bf5d1cd2da..01d38c3db1f1 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -285,7 +285,7 @@ in defaultSessionFromLegacyOptions else null; - defaultText = literalDocBook '' + defaultText = literalMD '' Taken from display manager settings or window manager settings, if either is set. ''; example = "gnome"; diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix index 3a57642a53ee..5a61d5463d21 100644 --- a/nixos/modules/system/activation/activation-script.nix +++ b/nixos/modules/system/activation/activation-script.nix @@ -143,7 +143,7 @@ in readOnly = true; internal = true; default = systemActivationScript (removeAttrs config.system.activationScripts [ "script" ]) true; - defaultText = literalDocBook "generated activation script"; + defaultText = literalMD "generated activation script"; }; system.userActivationScripts = mkOption { diff --git a/nixos/modules/system/boot/plymouth.nix b/nixos/modules/system/boot/plymouth.nix index 02d8fcf4799c..6e20d7dc5e0f 100644 --- a/nixos/modules/system/boot/plymouth.nix +++ b/nixos/modules/system/boot/plymouth.nix @@ -75,10 +75,10 @@ in themePackages = mkOption { default = lib.optional (cfg.theme == "breeze") nixosBreezePlymouth; - defaultText = literalDocBook '' + defaultText = literalMD '' A NixOS branded variant of the breeze theme when - config.${opt.theme} == "breeze", otherwise - [ ]. + `config.${opt.theme} == "breeze"`, otherwise + `[ ]`. ''; type = types.listOf types.package; description = lib.mdDoc '' diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 37adcc531d3d..66b51cd72606 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -611,7 +611,7 @@ in then "zstd" else "gzip" ); - defaultText = literalDocBook "zstd if the kernel supports it (5.9+), gzip if not"; + defaultText = literalMD "`zstd` if the kernel supports it (5.9+), `gzip` if not"; type = types.either types.str (types.functionTo types.str); description = '' The compressor to use on the initrd image. May be any of: diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 0975ed0aab9b..098f9031628d 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -209,7 +209,7 @@ in readOnly = true; type = types.bool; default = inInitrd || inSystem; - defaultText = literalDocBook "true 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"; }; diff --git a/nixos/modules/virtualisation/digital-ocean-init.nix b/nixos/modules/virtualisation/digital-ocean-init.nix index e29e34c4775f..1a5d4e898e96 100644 --- a/nixos/modules/virtualisation/digital-ocean-init.nix +++ b/nixos/modules/virtualisation/digital-ocean-init.nix @@ -20,7 +20,7 @@ in { options.virtualisation.digitalOcean.defaultConfigFile = mkOption { type = types.path; default = defaultConfigFile; - defaultText = literalDocBook '' + defaultText = literalMD '' The default configuration imports user-data if applicable and `(modulesPath + "/virtualisation/digital-ocean-config.nix")`. '';