summaryrefslogtreecommitdiffstats
path: root/nixos/modules/misc
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2022-08-05 19:39:00 +0200
committerpennae <github@quasiparticle.net>2022-08-06 20:39:12 +0200
commit087472b1e5230ffc8ba642b1e4f9218adf4634a2 (patch)
treeba5c8e457072dce9aa13a92f26bb7e6a47d45776 /nixos/modules/misc
parent423545fe4865d126e86721ba30da116e29c65004 (diff)
nixos/*: automatically convert option docs
Diffstat (limited to 'nixos/modules/misc')
-rw-r--r--nixos/modules/misc/documentation.nix28
-rw-r--r--nixos/modules/misc/locate.nix8
-rw-r--r--nixos/modules/misc/nixpkgs.nix50
3 files changed, 43 insertions, 43 deletions
diff --git a/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix
index fbde1dea037a..b67089a3d59e 100644
--- a/nixos/modules/misc/documentation.nix
+++ b/nixos/modules/misc/documentation.nix
@@ -157,9 +157,9 @@ in
enable = mkOption {
type = types.bool;
default = true;
- description = ''
+ description = lib.mdDoc ''
Whether to install documentation of packages from
- <option>environment.systemPackages</option> into the generated system path.
+ {option}`environment.systemPackages` into the generated system path.
See "Multiple-output packages" chapter in the nixpkgs manual for more info.
'';
@@ -169,9 +169,9 @@ in
man.enable = mkOption {
type = types.bool;
default = true;
- description = ''
+ description = lib.mdDoc ''
Whether to install manual pages.
- This also includes <literal>man</literal> outputs.
+ This also includes `man` outputs.
'';
};
@@ -190,8 +190,8 @@ in
info.enable = mkOption {
type = types.bool;
default = true;
- description = ''
- Whether to install info pages and the <command>info</command> command.
+ description = lib.mdDoc ''
+ Whether to install info pages and the {command}`info` command.
This also includes "info" outputs.
'';
};
@@ -199,8 +199,8 @@ in
doc.enable = mkOption {
type = types.bool;
default = true;
- description = ''
- Whether to install documentation distributed in packages' <literal>/share/doc</literal>.
+ description = lib.mdDoc ''
+ Whether to install documentation distributed in packages' `/share/doc`.
Usually plain text and/or HTML.
This also includes "doc" outputs.
'';
@@ -238,7 +238,7 @@ in
nixos.options.splitBuild = mkOption {
type = types.bool;
default = true;
- description = ''
+ description = lib.mdDoc ''
Whether to split the option docs build into a cacheable and an uncacheable part.
Splitting the build can substantially decrease the amount of time needed to build
the manual, but some user modules may be incompatible with this splitting.
@@ -248,7 +248,7 @@ in
nixos.options.warningsAreErrors = mkOption {
type = types.bool;
default = true;
- description = ''
+ description = lib.mdDoc ''
Treat warning emitted during the option documentation build (eg for missing option
descriptions) as errors.
'';
@@ -257,18 +257,18 @@ in
nixos.includeAllModules = mkOption {
type = types.bool;
default = false;
- description = ''
+ description = lib.mdDoc ''
Whether the generated NixOS's documentation should include documentation for all
the options from all the NixOS modules included in the current
- <literal>configuration.nix</literal>. Disabling this will make the manual
- generator to ignore options defined outside of <literal>baseModules</literal>.
+ `configuration.nix`. Disabling this will make the manual
+ generator to ignore options defined outside of `baseModules`.
'';
};
nixos.extraModuleSources = mkOption {
type = types.listOf (types.either types.path types.str);
default = [ ];
- description = ''
+ description = lib.mdDoc ''
Which extra NixOS module paths the generated NixOS's documentation should strip
from options.
'';
diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix
index cb7b5a308c54..b83e280b2846 100644
--- a/nixos/modules/misc/locate.nix
+++ b/nixos/modules/misc/locate.nix
@@ -39,15 +39,15 @@ in
type = str;
default = "02:15";
example = "hourly";
- description = ''
+ description = lib.mdDoc ''
Update the locate database at this interval. Updates by
default at 2:15 AM every day.
The format is described in
- <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ {manpage}`systemd.time(7)`.
- To disable automatic updates, set to <literal>"never"</literal>
- and run <command>updatedb</command> manually.
+ To disable automatic updates, set to `"never"`
+ and run {command}`updatedb` manually.
'';
};
diff --git a/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix
index bb21e31ec979..721a041a5830 100644
--- a/nixos/modules/misc/nixpkgs.nix
+++ b/nixos/modules/misc/nixpkgs.nix
@@ -157,12 +157,12 @@ in
{ allowBroken = true; allowUnfree = true; }
'';
type = configType;
- description = ''
+ description = lib.mdDoc ''
The configuration of the Nix Packages collection. (For
details, see the Nixpkgs documentation.) It allows you to set
package configuration options.
- Ignored when <literal>nixpkgs.pkgs</literal> is set.
+ Ignored when `nixpkgs.pkgs` is set.
'';
};
@@ -180,17 +180,17 @@ in
]
'';
type = types.listOf overlayType;
- description = ''
+ description = lib.mdDoc ''
List of overlays to use with the Nix Packages collection.
(For details, see the Nixpkgs documentation.) It allows
you to override packages globally. Each function in the list
- takes as an argument the <emphasis>original</emphasis> Nixpkgs.
+ takes as an argument the *original* Nixpkgs.
The first argument should be used for finding dependencies, and
the second should be used for overriding recipes.
- If <literal>nixpkgs.pkgs</literal> is set, overlays specified here
+ If `nixpkgs.pkgs` is set, overlays specified here
will be applied after the overlays that were already present
- in <literal>nixpkgs.pkgs</literal>.
+ in `nixpkgs.pkgs`.
'';
};
@@ -202,12 +202,12 @@ in
apply = lib.systems.elaborate;
defaultText = literalExpression
''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
- description = ''
+ description = lib.mdDoc ''
Specifies the platform where the NixOS configuration will run.
- To cross-compile, set also <literal>nixpkgs.buildPlatform</literal>.
+ To cross-compile, set also `nixpkgs.buildPlatform`.
- Ignored when <literal>nixpkgs.pkgs</literal> is set.
+ Ignored when `nixpkgs.pkgs` is set.
'';
};
@@ -220,7 +220,7 @@ in
apply = lib.systems.elaborate;
defaultText = literalExpression
''config.nixpkgs.hostPlatform'';
- description = ''
+ description = lib.mdDoc ''
Specifies the platform on which NixOS should be built.
By default, NixOS is built on the system where it runs, but you can
change where it's built. Setting this option will cause NixOS to be
@@ -230,7 +230,7 @@ in
or if you're building machines, you can set this to match your
development system and/or build farm.
- Ignored when <literal>nixpkgs.pkgs</literal> is set.
+ Ignored when `nixpkgs.pkgs` is set.
'';
};
@@ -243,25 +243,25 @@ in
apply = lib.systems.elaborate;
defaultText = literalExpression
''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
- description = ''
- Systems with a recently generated <literal>hardware-configuration.nix</literal>
+ description = lib.mdDoc ''
+ Systems with a recently generated `hardware-configuration.nix`
do not need to specify this option, unless cross-compiling, in which case
- you should set <emphasis>only</emphasis> <option>nixpkgs.buildPlatform</option>.
+ you should set *only* {option}`nixpkgs.buildPlatform`.
If this is somehow not feasible, you may fall back to removing the
- <option>nixpkgs.hostPlatform</option> line from the generated config and
+ {option}`nixpkgs.hostPlatform` line from the generated config and
use the old options.
Specifies the platform on which NixOS should be built. When
- <literal>nixpkgs.crossSystem</literal> is unset, it also specifies
- the platform <emphasis>for</emphasis> which NixOS should be
+ `nixpkgs.crossSystem` is unset, it also specifies
+ the platform *for* which NixOS should be
built. If this option is unset, it defaults to the platform
type of the machine where evaluation happens. Specifying this
option is useful when doing distributed multi-platform
deployment, or when building virtual machines. See its
description in the Nixpkgs manual for more details.
- Ignored when <literal>nixpkgs.pkgs</literal> or <literal>hostPlatform</literal> is set.
+ Ignored when `nixpkgs.pkgs` or `hostPlatform` is set.
'';
};
@@ -272,20 +272,20 @@ in
type = types.nullOr types.attrs; # TODO utilize lib.systems.parsedPlatform
default = null;
example = { system = "aarch64-linux"; config = "aarch64-unknown-linux-gnu"; };
- description = ''
- Systems with a recently generated <literal>hardware-configuration.nix</literal>
- may instead specify <emphasis>only</emphasis> <option>nixpkgs.buildPlatform</option>,
- or fall back to removing the <option>nixpkgs.hostPlatform</option> line from the generated config.
+ description = lib.mdDoc ''
+ Systems with a recently generated `hardware-configuration.nix`
+ may instead specify *only* {option}`nixpkgs.buildPlatform`,
+ or fall back to removing the {option}`nixpkgs.hostPlatform` line from the generated config.
Specifies the platform for which NixOS should be
built. Specify this only if it is different from
- <literal>nixpkgs.localSystem</literal>, the platform
- <emphasis>on</emphasis> which NixOS should be built. In other
+ `nixpkgs.localSystem`, the platform
+ *on* which NixOS should be built. In other
words, specify this to cross-compile NixOS. Otherwise it
should be set as null, the default. See its description in the
Nixpkgs manual for more details.
- Ignored when <literal>nixpkgs.pkgs</literal> or <literal>hostPlatform</literal> is set.
+ Ignored when `nixpkgs.pkgs` or `hostPlatform` is set.
'';
};