Merge pull request #182098 from pennae/option-doc-md

convert some varlists in option docs to MD

authored by pennae and committed by GitHub ff56c775 28e2fa05

+72 -165
+19 -56
nixos/modules/config/qt5.nix
··· 45 45 ["lxqt" "lxqt-qtplugin"] 46 46 ["libsForQt5" "plasma-integration"] 47 47 ]; 48 - description = '' 49 - Selects the platform theme to use for Qt5 applications.</para> 50 - <para>The options are 51 - <variablelist> 52 - <varlistentry> 53 - <term><literal>gtk</literal></term> 54 - <listitem><para>Use GTK theme with 55 - <link xlink:href="https://github.com/qt/qtstyleplugins">qtstyleplugins</link> 56 - </para></listitem> 57 - </varlistentry> 58 - <varlistentry> 59 - <term><literal>gnome</literal></term> 60 - <listitem><para>Use GNOME theme with 61 - <link xlink:href="https://github.com/FedoraQt/QGnomePlatform">qgnomeplatform</link> 62 - </para></listitem> 63 - </varlistentry> 64 - <varlistentry> 65 - <term><literal>lxqt</literal></term> 66 - <listitem><para>Use LXQt style set using the 67 - <link xlink:href="https://github.com/lxqt/lxqt-config">lxqt-config-appearance</link> 68 - application. 69 - </para></listitem> 70 - </varlistentry> 71 - <varlistentry> 72 - <term><literal>qt5ct</literal></term> 73 - <listitem><para>Use Qt style set using the 74 - <link xlink:href="https://sourceforge.net/projects/qt5ct/">qt5ct</link> 75 - application. 76 - </para></listitem> 77 - </varlistentry> 78 - <varlistentry> 79 - <term><literal>kde</literal></term> 80 - <listitem><para>Use Qt settings from Plasma.</para></listitem> 81 - </varlistentry> 82 - </variablelist> 48 + description = lib.mdDoc '' 49 + Selects the platform theme to use for Qt5 applications. 50 + 51 + The options are 52 + - `gtk`: Use GTK theme with [qtstyleplugins](https://github.com/qt/qtstyleplugins) 53 + - `gnome`: Use GNOME theme with [qgnomeplatform](https://github.com/FedoraQt/QGnomePlatform) 54 + - `lxqt`: Use LXQt style set using the [lxqt-config-appearance](https://github.com/lxqt/lxqt-config) 55 + application. 56 + - `qt5ct`: Use Qt style set using the [qt5ct](https://sourceforge.net/projects/qt5ct/) 57 + application. 58 + - `kde`: Use Qt settings from Plasma. 83 59 ''; 84 60 }; 85 61 ··· 97 73 "adwaita-qt" 98 74 ["libsForQt5" "qtstyleplugins"] 99 75 ]; 100 - description = '' 101 - Selects the style to use for Qt5 applications.</para> 102 - <para>The options are 103 - <variablelist> 104 - <varlistentry> 105 - <term><literal>adwaita</literal></term> 106 - <term><literal>adwaita-dark</literal></term> 107 - <listitem><para>Use Adwaita Qt style with 108 - <link xlink:href="https://github.com/FedoraQt/adwaita-qt">adwaita</link> 109 - </para></listitem> 110 - </varlistentry> 111 - <varlistentry> 112 - <term><literal>cleanlooks</literal></term> 113 - <term><literal>gtk2</literal></term> 114 - <term><literal>motif</literal></term> 115 - <term><literal>plastique</literal></term> 116 - <listitem><para>Use styles from 117 - <link xlink:href="https://github.com/qt/qtstyleplugins">qtstyleplugins</link> 118 - </para></listitem> 119 - </varlistentry> 120 - </variablelist> 76 + description = lib.mdDoc '' 77 + Selects the style to use for Qt5 applications. 78 + 79 + The options are 80 + - `adwaita`, `adwaita-dark`: Use Adwaita Qt style with 81 + [adwaita](https://github.com/FedoraQt/adwaita-qt) 82 + - `cleanlooks`, `gtk2`, `motif`, `plastique`: Use styles from 83 + [qtstyleplugins](https://github.com/qt/qtstyleplugins) 121 84 ''; 122 85 }; 123 86 };
+13 -46
nixos/modules/system/boot/resolved.nix
··· 15 15 services.resolved.enable = mkOption { 16 16 default = false; 17 17 type = types.bool; 18 - description = '' 18 + description = lib.mdDoc '' 19 19 Whether to enable the systemd DNS resolver daemon. 20 20 ''; 21 21 }; ··· 24 24 default = [ ]; 25 25 example = [ "8.8.8.8" "2001:4860:4860::8844" ]; 26 26 type = types.listOf types.str; 27 - description = '' 27 + description = lib.mdDoc '' 28 28 A list of IPv4 and IPv6 addresses to use as the fallback DNS servers. 29 29 If this option is empty, a compiled-in list of DNS servers is used instead. 30 30 ''; ··· 35 35 defaultText = literalExpression "config.networking.search"; 36 36 example = [ "example.com" ]; 37 37 type = types.listOf types.str; 38 - description = '' 38 + description = lib.mdDoc '' 39 39 A list of domains. These domains are used as search suffixes 40 40 when resolving single-label host names (domain names which 41 41 contain no dot), in order to qualify them into fully-qualified ··· 43 43 44 44 For compatibility reasons, if this setting is not specified, 45 45 the search domains listed in 46 - <filename>/etc/resolv.conf</filename> are used instead, if 46 + {file}`/etc/resolv.conf` are used instead, if 47 47 that file exists and any domains are configured in it. 48 48 ''; 49 49 }; ··· 52 52 default = "true"; 53 53 example = "false"; 54 54 type = types.enum [ "true" "resolve" "false" ]; 55 - description = '' 55 + description = lib.mdDoc '' 56 56 Controls Link-Local Multicast Name Resolution support 57 57 (RFC 4795) on the local host. 58 58 59 59 If set to 60 - 61 - <variablelist> 62 - <varlistentry> 63 - <term><literal>"true"</literal></term> 64 - <listitem><para> 65 - Enables full LLMNR responder and resolver support. 66 - </para></listitem> 67 - </varlistentry> 68 - <varlistentry> 69 - <term><literal>"false"</literal></term> 70 - <listitem><para> 71 - Disables both. 72 - </para></listitem> 73 - </varlistentry> 74 - <varlistentry> 75 - <term><literal>"resolve"</literal></term> 76 - <listitem><para> 77 - Only resolution support is enabled, but responding is disabled. 78 - </para></listitem> 79 - </varlistentry> 80 - </variablelist> 60 + - `"true"`: Enables full LLMNR responder and resolver support. 61 + - `"false"`: Disables both. 62 + - `"resolve"`: Only resolution support is enabled, but responding is disabled. 81 63 ''; 82 64 }; 83 65 ··· 85 67 default = "allow-downgrade"; 86 68 example = "true"; 87 69 type = types.enum [ "true" "allow-downgrade" "false" ]; 88 - description = '' 70 + description = lib.mdDoc '' 89 71 If set to 90 - <variablelist> 91 - <varlistentry> 92 - <term><literal>"true"</literal></term> 93 - <listitem><para> 72 + - `"true"`: 94 73 all DNS lookups are DNSSEC-validated locally (excluding 95 74 LLMNR and Multicast DNS). Note that this mode requires a 96 75 DNS server that supports DNSSEC. If the DNS server does 97 76 not properly support DNSSEC all validations will fail. 98 - </para></listitem> 99 - </varlistentry> 100 - <varlistentry> 101 - <term><literal>"allow-downgrade"</literal></term> 102 - <listitem><para> 77 + - `"allow-downgrade"`: 103 78 DNSSEC validation is attempted, but if the server does not 104 79 support DNSSEC properly, DNSSEC mode is automatically 105 80 disabled. Note that this mode makes DNSSEC validation ··· 107 82 be able to trigger a downgrade to non-DNSSEC mode by 108 83 synthesizing a DNS response that suggests DNSSEC was not 109 84 supported. 110 - </para></listitem> 111 - </varlistentry> 112 - <varlistentry> 113 - <term><literal>"false"</literal></term> 114 - <listitem><para> 115 - DNS lookups are not DNSSEC validated. 116 - </para></listitem> 117 - </varlistentry> 118 - </variablelist> 85 + - `"false"`: DNS lookups are not DNSSEC validated. 119 86 ''; 120 87 }; 121 88 122 89 services.resolved.extraConfig = mkOption { 123 90 default = ""; 124 91 type = types.lines; 125 - description = '' 92 + description = lib.mdDoc '' 126 93 Extra config to append to resolved.conf. 127 94 ''; 128 95 };
+40 -63
nixos/modules/virtualisation/oci-containers.nix
··· 14 14 15 15 image = mkOption { 16 16 type = with types; str; 17 - description = "OCI image to run."; 17 + description = lib.mdDoc "OCI image to run."; 18 18 example = "library/hello-world"; 19 19 }; 20 20 21 21 imageFile = mkOption { 22 22 type = with types; nullOr package; 23 23 default = null; 24 - description = '' 24 + description = lib.mdDoc '' 25 25 Path to an image file to load before running the image. This can 26 26 be used to bypass pulling the image from the registry. 27 27 28 - The <literal>image</literal> attribute must match the name and 28 + The `image` attribute must match the name and 29 29 tag of the image contained in this file, as they will be used to 30 30 run the container with that image. If they do not match, the 31 31 image will be pulled from the registry as usual. ··· 38 38 username = mkOption { 39 39 type = with types; nullOr str; 40 40 default = null; 41 - description = "Username for login."; 41 + description = lib.mdDoc "Username for login."; 42 42 }; 43 43 44 44 passwordFile = mkOption { 45 45 type = with types; nullOr str; 46 46 default = null; 47 - description = "Path to file containing password."; 47 + description = lib.mdDoc "Path to file containing password."; 48 48 example = "/etc/nixos/dockerhub-password.txt"; 49 49 }; 50 50 51 51 registry = mkOption { 52 52 type = with types; nullOr str; 53 53 default = null; 54 - description = "Registry where to login to."; 54 + description = lib.mdDoc "Registry where to login to."; 55 55 example = "https://docker.pkg.github.com"; 56 56 }; 57 57 ··· 60 60 cmd = mkOption { 61 61 type = with types; listOf str; 62 62 default = []; 63 - description = "Commandline arguments to pass to the image's entrypoint."; 63 + description = lib.mdDoc "Commandline arguments to pass to the image's entrypoint."; 64 64 example = literalExpression '' 65 65 ["--port=9000"] 66 66 ''; ··· 68 68 69 69 entrypoint = mkOption { 70 70 type = with types; nullOr str; 71 - description = "Override the default entrypoint of the image."; 71 + description = lib.mdDoc "Override the default entrypoint of the image."; 72 72 default = null; 73 73 example = "/bin/my-app"; 74 74 }; ··· 76 76 environment = mkOption { 77 77 type = with types; attrsOf str; 78 78 default = {}; 79 - description = "Environment variables to set for this container."; 79 + description = lib.mdDoc "Environment variables to set for this container."; 80 80 example = literalExpression '' 81 81 { 82 82 DATABASE_HOST = "db.example.com"; ··· 88 88 environmentFiles = mkOption { 89 89 type = with types; listOf path; 90 90 default = []; 91 - description = "Environment files for this container."; 91 + description = lib.mdDoc "Environment files for this container."; 92 92 example = literalExpression '' 93 93 [ 94 94 /path/to/.env ··· 100 100 log-driver = mkOption { 101 101 type = types.str; 102 102 default = "journald"; 103 - description = '' 103 + description = lib.mdDoc '' 104 104 Logging driver for the container. The default of 105 - <literal>"journald"</literal> means that the container's logs will be 105 + `"journald"` means that the container's logs will be 106 106 handled as part of the systemd unit. 107 107 108 108 For more details and a full list of logging drivers, refer to respective backends documentation. 109 109 110 110 For Docker: 111 - <link xlink:href="https://docs.docker.com/engine/reference/run/#logging-drivers---log-driver">Docker engine documentation</link> 111 + [Docker engine documentation](https://docs.docker.com/engine/reference/run/#logging-drivers---log-driver) 112 112 113 113 For Podman: 114 114 Refer to the docker-run(1) man page. ··· 118 118 ports = mkOption { 119 119 type = with types; listOf str; 120 120 default = []; 121 - description = '' 121 + description = lib.mdDoc '' 122 122 Network ports to publish from the container to the outer host. 123 123 124 124 Valid formats: 125 + - `<ip>:<hostPort>:<containerPort>` 126 + - `<ip>::<containerPort>` 127 + - `<hostPort>:<containerPort>` 128 + - `<containerPort>` 125 129 126 - <itemizedlist> 127 - <listitem> 128 - <para> 129 - <literal>&lt;ip&gt;:&lt;hostPort&gt;:&lt;containerPort&gt;</literal> 130 - </para> 131 - </listitem> 132 - <listitem> 133 - <para> 134 - <literal>&lt;ip&gt;::&lt;containerPort&gt;</literal> 135 - </para> 136 - </listitem> 137 - <listitem> 138 - <para> 139 - <literal>&lt;hostPort&gt;:&lt;containerPort&gt;</literal> 140 - </para> 141 - </listitem> 142 - <listitem> 143 - <para> 144 - <literal>&lt;containerPort&gt;</literal> 145 - </para> 146 - </listitem> 147 - </itemizedlist> 148 - 149 - Both <literal>hostPort</literal> and 150 - <literal>containerPort</literal> can be specified as a range of 130 + Both `hostPort` and `containerPort` can be specified as a range of 151 131 ports. When specifying ranges for both, the number of container 152 132 ports in the range must match the number of host ports in the 153 - range. Example: <literal>1234-1236:1234-1236/tcp</literal> 133 + range. Example: `1234-1236:1234-1236/tcp` 154 134 155 - When specifying a range for <literal>hostPort</literal> only, the 156 - <literal>containerPort</literal> must <emphasis>not</emphasis> be a 157 - range. In this case, the container port is published somewhere 158 - within the specified <literal>hostPort</literal> range. Example: 159 - <literal>1234-1236:1234/tcp</literal> 135 + When specifying a range for `hostPort` only, the `containerPort` 136 + must *not* be a range. In this case, the container port is published 137 + somewhere within the specified `hostPort` range. 138 + Example: `1234-1236:1234/tcp` 160 139 161 140 Refer to the 162 - <link xlink:href="https://docs.docker.com/engine/reference/run/#expose-incoming-ports"> 163 - Docker engine documentation</link> for full details. 141 + [Docker engine documentation](https://docs.docker.com/engine/reference/run/#expose-incoming-ports) for full details. 164 142 ''; 165 143 example = literalExpression '' 166 144 [ ··· 172 150 user = mkOption { 173 151 type = with types; nullOr str; 174 152 default = null; 175 - description = '' 153 + description = lib.mdDoc '' 176 154 Override the username or UID (and optionally groupname or GID) used 177 155 in the container. 178 156 ''; ··· 182 160 volumes = mkOption { 183 161 type = with types; listOf str; 184 162 default = []; 185 - description = '' 163 + description = lib.mdDoc '' 186 164 List of volumes to attach to this container. 187 165 188 - Note that this is a list of <literal>"src:dst"</literal> strings to 189 - allow for <literal>src</literal> to refer to 190 - <literal>/nix/store</literal> paths, which would be difficult with an 191 - attribute set. There are also a variety of mount options available 192 - as a third field; please refer to the 193 - <link xlink:href="https://docs.docker.com/engine/reference/run/#volume-shared-filesystems"> 194 - docker engine documentation</link> for details. 166 + Note that this is a list of `"src:dst"` strings to 167 + allow for `src` to refer to `/nix/store` paths, which 168 + would be difficult with an attribute set. There are 169 + also a variety of mount options available as a third 170 + field; please refer to the 171 + [docker engine documentation](https://docs.docker.com/engine/reference/run/#volume-shared-filesystems) for details. 195 172 ''; 196 173 example = literalExpression '' 197 174 [ ··· 204 181 workdir = mkOption { 205 182 type = with types; nullOr str; 206 183 default = null; 207 - description = "Override the default working directory for the container."; 184 + description = lib.mdDoc "Override the default working directory for the container."; 208 185 example = "/var/lib/hello_world"; 209 186 }; 210 187 211 188 dependsOn = mkOption { 212 189 type = with types; listOf str; 213 190 default = []; 214 - description = '' 191 + description = lib.mdDoc '' 215 192 Define which other containers this one depends on. They will be added to both After and Requires for the unit. 216 193 217 - Use the same name as the attribute under <literal>virtualisation.oci-containers.containers</literal>. 194 + Use the same name as the attribute under `virtualisation.oci-containers.containers`. 218 195 ''; 219 196 example = literalExpression '' 220 197 virtualisation.oci-containers.containers = { ··· 229 206 extraOptions = mkOption { 230 207 type = with types; listOf str; 231 208 default = []; 232 - description = "Extra options for <command>${defaultBackend} run</command>."; 209 + description = lib.mdDoc "Extra options for {command}`${defaultBackend} run`."; 233 210 example = literalExpression '' 234 211 ["--network=host"] 235 212 ''; ··· 238 215 autoStart = mkOption { 239 216 type = types.bool; 240 217 default = true; 241 - description = '' 218 + description = lib.mdDoc '' 242 219 When enabled, the container is automatically started on boot. 243 220 If this option is set to false, the container has to be started on-demand via its service. 244 221 ''; ··· 339 316 backend = mkOption { 340 317 type = types.enum [ "podman" "docker" ]; 341 318 default = if versionAtLeast config.system.stateVersion "22.05" then "podman" else "docker"; 342 - description = "The underlying Docker implementation to use."; 319 + description = lib.mdDoc "The underlying Docker implementation to use."; 343 320 }; 344 321 345 322 containers = mkOption { 346 323 default = {}; 347 324 type = types.attrsOf (types.submodule containerOptions); 348 - description = "OCI (Docker) containers to run as systemd services."; 325 + description = lib.mdDoc "OCI (Docker) containers to run as systemd services."; 349 326 }; 350 327 351 328 };