diff --git a/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix
index 1437ab387700..5ace5dd06fd4 100644
--- a/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix
+++ b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix
@@ -22,11 +22,11 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = ''
+ description = lib.mdDoc ''
Whether to create symlinks to the system generations under
- /boot. When enabled,
- /boot/default/kernel,
- /boot/default/initrd, etc., are updated to
+ `/boot`. When enabled,
+ `/boot/default/kernel`,
+ `/boot/default/initrd`, etc., are updated to
point to the current generation's kernel image, initial RAM
disk, and other bootstrap files.
@@ -41,7 +41,7 @@ in
copyKernels = mkOption {
default = false;
type = types.bool;
- description = ''
+ description = lib.mdDoc ''
Whether copy the necessary boot files into /boot, so
/nix/store is not needed by the boot loader.
'';
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 645fbc2b713a..c7b62871eb4e 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -177,11 +177,11 @@ in
default = pkgs.systemd;
defaultText = literalExpression "pkgs.systemd";
type = types.package;
- description = "The systemd package.";
+ description = lib.mdDoc "The systemd package.";
};
systemd.units = mkOption {
- description = "Definition of systemd units.";
+ description = lib.mdDoc "Definition of systemd units.";
default = {};
type = systemdUtils.types.units;
};
@@ -190,43 +190,43 @@ in
default = [];
type = types.listOf types.package;
example = literalExpression "[ pkgs.systemd-cryptsetup-generator ]";
- description = "Packages providing systemd units and hooks.";
+ description = lib.mdDoc "Packages providing systemd units and hooks.";
};
systemd.targets = mkOption {
default = {};
type = systemdUtils.types.targets;
- description = "Definition of systemd target units.";
+ description = lib.mdDoc "Definition of systemd target units.";
};
systemd.services = mkOption {
default = {};
type = systemdUtils.types.services;
- description = "Definition of systemd service units.";
+ description = lib.mdDoc "Definition of systemd service units.";
};
systemd.sockets = mkOption {
default = {};
type = systemdUtils.types.sockets;
- description = "Definition of systemd socket units.";
+ description = lib.mdDoc "Definition of systemd socket units.";
};
systemd.timers = mkOption {
default = {};
type = systemdUtils.types.timers;
- description = "Definition of systemd timer units.";
+ description = lib.mdDoc "Definition of systemd timer units.";
};
systemd.paths = mkOption {
default = {};
type = systemdUtils.types.paths;
- description = "Definition of systemd path units.";
+ description = lib.mdDoc "Definition of systemd path units.";
};
systemd.mounts = mkOption {
default = [];
type = systemdUtils.types.mounts;
- description = ''
+ description = lib.mdDoc ''
Definition of systemd mount units.
This is a list instead of an attrSet, because systemd mandates the names to be derived from
the 'where' attribute.
@@ -236,7 +236,7 @@ in
systemd.automounts = mkOption {
default = [];
type = systemdUtils.types.automounts;
- description = ''
+ description = lib.mdDoc ''
Definition of systemd automount units.
This is a list instead of an attrSet, because systemd mandates the names to be derived from
the 'where' attribute.
@@ -246,41 +246,41 @@ in
systemd.slices = mkOption {
default = {};
type = systemdUtils.types.slices;
- description = "Definition of slice configurations.";
+ description = lib.mdDoc "Definition of slice configurations.";
};
systemd.generators = mkOption {
type = types.attrsOf types.path;
default = {};
example = { systemd-gpt-auto-generator = "/dev/null"; };
- description = ''
+ description = lib.mdDoc ''
Definition of systemd generators.
- For each NAME = VALUE pair of the attrSet, a link is generated from
- /etc/systemd/system-generators/NAME to VALUE.
+ For each `NAME = VALUE` pair of the attrSet, a link is generated from
+ `/etc/systemd/system-generators/NAME` to `VALUE`.
'';
};
systemd.shutdown = mkOption {
type = types.attrsOf types.path;
default = {};
- description = ''
+ description = lib.mdDoc ''
Definition of systemd shutdown executables.
- For each NAME = VALUE pair of the attrSet, a link is generated from
- /etc/systemd/system-shutdown/NAME to VALUE.
+ For each `NAME = VALUE` pair of the attrSet, a link is generated from
+ `/etc/systemd/system-shutdown/NAME` to `VALUE`.
'';
};
systemd.defaultUnit = mkOption {
default = "multi-user.target";
type = types.str;
- description = "Default unit started when the system boots.";
+ description = lib.mdDoc "Default unit started when the system boots.";
};
systemd.ctrlAltDelUnit = mkOption {
default = "reboot.target";
type = types.str;
example = "poweroff.target";
- description = ''
+ description = lib.mdDoc ''
Target that should be started when Ctrl-Alt-Delete is pressed.
'';
};
@@ -289,8 +289,8 @@ in
type = with types; attrsOf (nullOr (oneOf [ str path package ]));
default = {};
example = { TZ = "CET"; };
- description = ''
- Environment variables passed to all systemd units.
+ description = lib.mdDoc ''
+ Environment variables passed to *all* systemd units.
'';
};
@@ -298,16 +298,16 @@ in
type = with types; attrsOf (nullOr (oneOf [ str path package ]));
default = {};
example = { SYSTEMD_LOG_LEVEL = "debug"; };
- description = ''
+ description = lib.mdDoc ''
Environment variables of PID 1. These variables are
- not passed to started units.
+ *not* passed to started units.
'';
};
systemd.enableCgroupAccounting = mkOption {
default = true;
type = types.bool;
- description = ''
+ description = lib.mdDoc ''
Whether to enable cgroup accounting.
'';
};
@@ -315,7 +315,7 @@ in
systemd.enableUnifiedCgroupHierarchy = mkOption {
default = true;
type = types.bool;
- description = ''
+ description = lib.mdDoc ''
Whether to enable the unified cgroup hierarchy (cgroupsv2).
'';
};
@@ -324,7 +324,7 @@ in
default = "";
type = types.lines;
example = "DefaultLimitCORE=infinity";
- description = ''
+ description = lib.mdDoc ''
Extra config options for systemd. See man systemd-system.conf for
available options.
'';
@@ -334,7 +334,7 @@ in
default = "";
type = types.lines;
example = "HibernateDelaySec=1h";
- description = ''
+ description = lib.mdDoc ''
Extra config options for systemd sleep state logic.
See sleep.conf.d(5) man page for available options.
'';
@@ -344,7 +344,7 @@ in
default = [ ];
type = types.listOf types.str;
example = [ "debug-shell.service" "systemd-quotacheck.service" ];
- description = ''
+ description = lib.mdDoc ''
Additional units shipped with systemd that shall be enabled.
'';
};
@@ -353,10 +353,10 @@ in
default = [ ];
type = types.listOf types.str;
example = [ "systemd-backlight@.service" ];
- description = ''
+ description = lib.mdDoc ''
A list of units to skip when generating system systemd configuration directory. This has
- priority over upstream units, , and
- . The main purpose of this is to
+ priority over upstream units, {option}`systemd.units`, and
+ {option}`systemd.additionalUpstreamSystemUnits`. The main purpose of this is to
prevent a upstream systemd unit from being added to the initrd with any modifications made to it
by other NixOS modules.
'';
@@ -366,7 +366,7 @@ in
type = types.nullOr types.path;
default = null;
example = "/dev/watchdog";
- description = ''
+ description = lib.mdDoc ''
The path to a hardware watchdog device which will be managed by systemd.
If not specified, systemd will default to /dev/watchdog.
'';
@@ -376,7 +376,7 @@ in
type = types.nullOr types.str;
default = null;
example = "30s";
- description = ''
+ description = lib.mdDoc ''
The amount of time which can elapse before a watchdog hardware device
will automatically reboot the system. Valid time units include "ms",
"s", "min", "h", "d", and "w".
@@ -387,7 +387,7 @@ in
type = types.nullOr types.str;
default = null;
example = "10m";
- description = ''
+ description = lib.mdDoc ''
The amount of time which can elapse after a reboot has been triggered
before a watchdog hardware device will automatically reboot the system.
Valid time units include "ms", "s", "min", "h", "d", and "w".
@@ -398,7 +398,7 @@ in
type = types.nullOr types.str;
default = null;
example = "10m";
- description = ''
+ description = lib.mdDoc ''
The amount of time which can elapse when kexec is being executed before
a watchdog hardware device will automatically reboot the system. This
option should only be enabled if reloadTime is also enabled. Valid
diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix
index cdec7f532917..9ba07c8d204e 100644
--- a/nixos/modules/system/boot/systemd/initrd.nix
+++ b/nixos/modules/system/boot/systemd/initrd.nix
@@ -150,7 +150,7 @@ in {
};
contents = mkOption {
- description = "Set of files that have to be linked into the initrd";
+ description = lib.mdDoc "Set of files that have to be linked into the initrd";
example = literalExpression ''
{
"/etc/hostname".text = "mymachine";
@@ -162,7 +162,7 @@ in {
};
storePaths = mkOption {
- description = ''
+ description = lib.mdDoc ''
Store paths to copy into the initrd as well.
'';
type = with types; listOf (oneOf [ singleLineStr package ]);
@@ -170,7 +170,7 @@ in {
};
extraBin = mkOption {
- description = ''
+ description = lib.mdDoc ''
Tools to add to /bin
'';
example = literalExpression ''
@@ -183,7 +183,7 @@ in {
};
suppressedStorePaths = mkOption {
- description = ''
+ description = lib.mdDoc ''
Store paths specified in the storePaths option that
should not be copied.
'';
@@ -194,7 +194,7 @@ in {
emergencyAccess = mkOption {
type = with types; oneOf [ bool singleLineStr ];
visible = false;
- description = ''
+ description = lib.mdDoc ''
Set to true for unauthenticated emergency access, and false for
no emergency access.
@@ -208,7 +208,7 @@ in {
type = types.listOf types.package;
default = [];
visible = false;
- description = ''
+ description = lib.mdDoc ''
Packages to include in /bin for the stage 1 emergency shell.
'';
};
@@ -218,7 +218,7 @@ in {
type = types.listOf types.str;
visible = false;
example = [ "debug-shell.service" "systemd-quotacheck.service" ];
- description = ''
+ description = lib.mdDoc ''
Additional units shipped with systemd that shall be enabled.
'';
};
@@ -228,17 +228,17 @@ in {
type = types.listOf types.str;
example = [ "systemd-backlight@.service" ];
visible = false;
- description = ''
+ description = lib.mdDoc ''
A list of units to skip when generating system systemd configuration directory. This has
- priority over upstream units, , and
- . The main purpose of this is to
+ priority over upstream units, {option}`boot.initrd.systemd.units`, and
+ {option}`boot.initrd.systemd.additionalUpstreamUnits`. The main purpose of this is to
prevent a upstream systemd unit from being added to the initrd with any modifications made to it
by other NixOS modules.
'';
};
units = mkOption {
- description = "Definition of systemd units.";
+ description = lib.mdDoc "Definition of systemd units.";
default = {};
visible = false;
type = systemdUtils.types.units;
@@ -249,49 +249,49 @@ in {
visible = false;
type = types.listOf types.package;
example = literalExpression "[ pkgs.systemd-cryptsetup-generator ]";
- description = "Packages providing systemd units and hooks.";
+ description = lib.mdDoc "Packages providing systemd units and hooks.";
};
targets = mkOption {
default = {};
visible = false;
type = systemdUtils.types.initrdTargets;
- description = "Definition of systemd target units.";
+ description = lib.mdDoc "Definition of systemd target units.";
};
services = mkOption {
default = {};
type = systemdUtils.types.initrdServices;
visible = false;
- description = "Definition of systemd service units.";
+ description = lib.mdDoc "Definition of systemd service units.";
};
sockets = mkOption {
default = {};
type = systemdUtils.types.initrdSockets;
visible = false;
- description = "Definition of systemd socket units.";
+ description = lib.mdDoc "Definition of systemd socket units.";
};
timers = mkOption {
default = {};
type = systemdUtils.types.initrdTimers;
visible = false;
- description = "Definition of systemd timer units.";
+ description = lib.mdDoc "Definition of systemd timer units.";
};
paths = mkOption {
default = {};
type = systemdUtils.types.initrdPaths;
visible = false;
- description = "Definition of systemd path units.";
+ description = lib.mdDoc "Definition of systemd path units.";
};
mounts = mkOption {
default = [];
type = systemdUtils.types.initrdMounts;
visible = false;
- description = ''
+ description = lib.mdDoc ''
Definition of systemd mount units.
This is a list instead of an attrSet, because systemd mandates the names to be derived from
the 'where' attribute.
@@ -302,7 +302,7 @@ in {
default = [];
type = systemdUtils.types.automounts;
visible = false;
- description = ''
+ description = lib.mdDoc ''
Definition of systemd automount units.
This is a list instead of an attrSet, because systemd mandates the names to be derived from
the 'where' attribute.
@@ -313,7 +313,7 @@ in {
default = {};
type = systemdUtils.types.slices;
visible = false;
- description = "Definition of slice configurations.";
+ description = lib.mdDoc "Definition of slice configurations.";
};
};
diff --git a/nixos/modules/system/boot/tmp.nix b/nixos/modules/system/boot/tmp.nix
index cf6d19eb5f0e..1f9431710aec 100644
--- a/nixos/modules/system/boot/tmp.nix
+++ b/nixos/modules/system/boot/tmp.nix
@@ -14,23 +14,23 @@ in
boot.cleanTmpDir = mkOption {
type = types.bool;
default = false;
- description = ''
- Whether to delete all files in /tmp during boot.
+ description = lib.mdDoc ''
+ Whether to delete all files in {file}`/tmp` during boot.
'';
};
boot.tmpOnTmpfs = mkOption {
type = types.bool;
default = false;
- description = ''
- Whether to mount a tmpfs on /tmp during boot.
+ description = lib.mdDoc ''
+ Whether to mount a tmpfs on {file}`/tmp` during boot.
'';
};
boot.tmpOnTmpfsSize = mkOption {
type = types.oneOf [ types.str types.types.ints.positive ];
default = "50%";
- description = ''
+ description = lib.mdDoc ''
Size of tmpfs in percentage.
Percentage is defined by systemd.
'';
diff --git a/nixos/modules/system/etc/etc.nix b/nixos/modules/system/etc/etc.nix
index ed552fecec53..cfb9c39458ea 100644
--- a/nixos/modules/system/etc/etc.nix
+++ b/nixos/modules/system/etc/etc.nix
@@ -82,8 +82,8 @@ in
"default/useradd".text = "GROUP=100 ...";
}
'';
- description = ''
- Set of files that have to be linked in /etc.
+ description = lib.mdDoc ''
+ Set of files that have to be linked in {file}`/etc`.
'';
type = with types; attrsOf (submodule (
@@ -93,7 +93,7 @@ in
enable = mkOption {
type = types.bool;
default = true;
- description = ''
+ description = lib.mdDoc ''
Whether this /etc file should be generated. This
option allows specific /etc files to be disabled.
'';
@@ -101,9 +101,9 @@ in
target = mkOption {
type = types.str;
- description = ''
+ description = lib.mdDoc ''
Name of symlink (relative to
- /etc). Defaults to the attribute
+ {file}`/etc`). Defaults to the attribute
name.
'';
};
@@ -111,20 +111,20 @@ in
text = mkOption {
default = null;
type = types.nullOr types.lines;
- description = "Text of the file.";
+ description = lib.mdDoc "Text of the file.";
};
source = mkOption {
type = types.path;
- description = "Path of the source file.";
+ description = lib.mdDoc "Path of the source file.";
};
mode = mkOption {
type = types.str;
default = "symlink";
example = "0600";
- description = ''
- If set to something else than symlink,
+ description = lib.mdDoc ''
+ If set to something else than `symlink`,
the file is copied instead of symlinked, with the given
file mode.
'';
@@ -133,7 +133,7 @@ in
uid = mkOption {
default = 0;
type = types.int;
- description = ''
+ description = lib.mdDoc ''
UID of created file. Only takes effect when the file is
copied (that is, the mode is not 'symlink').
'';
@@ -142,7 +142,7 @@ in
gid = mkOption {
default = 0;
type = types.int;
- description = ''
+ description = lib.mdDoc ''
GID of created file. Only takes effect when the file is
copied (that is, the mode is not 'symlink').
'';
@@ -151,20 +151,20 @@ in
user = mkOption {
default = "+${toString config.uid}";
type = types.str;
- description = ''
+ description = lib.mdDoc ''
User name of created file.
Only takes effect when the file is copied (that is, the mode is not 'symlink').
- Changing this option takes precedence over uid.
+ Changing this option takes precedence over `uid`.
'';
};
group = mkOption {
default = "+${toString config.gid}";
type = types.str;
- description = ''
+ description = lib.mdDoc ''
Group name of created file.
Only takes effect when the file is copied (that is, the mode is not 'symlink').
- Changing this option takes precedence over gid.
+ Changing this option takes precedence over `gid`.
'';
};