0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

Merge pull request #182685 from pennae/invariant-option-conversions

treewide: invariant option conversions to MD
This commit is contained in:
pennae 2022-07-27 15:39:47 +02:00 committed by GitHub
commit a16b25432e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 334 additions and 335 deletions

View file

@ -6,9 +6,9 @@ with lib;
appstream.enable = mkOption { appstream.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = lib.mdDoc ''
Whether to install files to support the Whether to install files to support the
<link xlink:href="https://www.freedesktop.org/software/appstream/docs/index.html">AppStream metadata specification</link>. [AppStream metadata specification](https://www.freedesktop.org/software/appstream/docs/index.html).
''; '';
}; };
}; };

View file

@ -30,9 +30,9 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Whether to create a directory with links to all fonts in Whether to create a directory with links to all fonts in
<filename>/run/current-system/sw/share/X11/fonts</filename>. {file}`/run/current-system/sw/share/X11/fonts`.
''; '';
}; };
@ -40,9 +40,9 @@ in
type = types.bool; type = types.bool;
default = config.programs.xwayland.enable; default = config.programs.xwayland.enable;
defaultText = literalExpression "config.programs.xwayland.enable"; defaultText = literalExpression "config.programs.xwayland.enable";
description = '' description = lib.mdDoc ''
Whether to decompress fonts in Whether to decompress fonts in
<filename>/run/current-system/sw/share/X11/fonts</filename>. {file}`/run/current-system/sw/share/X11/fonts`.
''; '';
}; };

View file

@ -22,9 +22,8 @@ in
default = null; default = null;
type = timezone; type = timezone;
example = "America/New_York"; example = "America/New_York";
description = '' description = lib.mdDoc ''
The time zone used when displaying times and dates. See <link The time zone used when displaying times and dates. See <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>
xlink:href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"/>
for a comprehensive list of possible values for this setting. for a comprehensive list of possible values for this setting.
If null, the timezone will default to UTC and can be set imperatively If null, the timezone will default to UTC and can be set imperatively
@ -35,7 +34,7 @@ in
hardwareClockInLocalTime = mkOption { hardwareClockInLocalTime = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = "If set, keep the hardware clock in local time instead of UTC."; description = lib.mdDoc "If set, keep the hardware clock in local time instead of UTC.";
}; };
}; };
@ -44,18 +43,18 @@ in
latitude = mkOption { latitude = mkOption {
type = types.float; type = types.float;
description = '' description = lib.mdDoc ''
Your current latitude, between Your current latitude, between
<literal>-90.0</literal> and <literal>90.0</literal>. Must be provided `-90.0` and `90.0`. Must be provided
along with longitude. along with longitude.
''; '';
}; };
longitude = mkOption { longitude = mkOption {
type = types.float; type = types.float;
description = '' description = lib.mdDoc ''
Your current longitude, between Your current longitude, between
between <literal>-180.0</literal> and <literal>180.0</literal>. Must be between `-180.0` and `180.0`. Must be
provided along with latitude. provided along with latitude.
''; '';
}; };
@ -63,9 +62,9 @@ in
provider = mkOption { provider = mkOption {
type = types.enum [ "manual" "geoclue2" ]; type = types.enum [ "manual" "geoclue2" ];
default = "manual"; default = "manual";
description = '' description = lib.mdDoc ''
The location provider to use for determining your location. If set to The location provider to use for determining your location. If set to
<literal>manual</literal> you must also provide latitude/longitude. `manual` you must also provide latitude/longitude.
''; '';
}; };

View file

@ -13,10 +13,10 @@ with lib;
type = types.listOf types.path; type = types.listOf types.path;
internal = true; internal = true;
default = []; default = [];
description = '' description = lib.mdDoc ''
Search path for NSS (Name Service Switch) modules. This allows Search path for NSS (Name Service Switch) modules. This allows
several DNS resolution methods to be specified via several DNS resolution methods to be specified via
<filename>/etc/nsswitch.conf</filename>. {file}`/etc/nsswitch.conf`.
''; '';
apply = list: apply = list:
{ {
@ -28,8 +28,8 @@ with lib;
system.nssDatabases = { system.nssDatabases = {
passwd = mkOption { passwd = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
description = '' description = lib.mdDoc ''
List of passwd entries to configure in <filename>/etc/nsswitch.conf</filename>. List of passwd entries to configure in {file}`/etc/nsswitch.conf`.
Note that "files" is always prepended while "systemd" is appended if nscd is enabled. Note that "files" is always prepended while "systemd" is appended if nscd is enabled.
@ -40,8 +40,8 @@ with lib;
group = mkOption { group = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
description = '' description = lib.mdDoc ''
List of group entries to configure in <filename>/etc/nsswitch.conf</filename>. List of group entries to configure in {file}`/etc/nsswitch.conf`.
Note that "files" is always prepended while "systemd" is appended if nscd is enabled. Note that "files" is always prepended while "systemd" is appended if nscd is enabled.
@ -52,8 +52,8 @@ with lib;
shadow = mkOption { shadow = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
description = '' description = lib.mdDoc ''
List of shadow entries to configure in <filename>/etc/nsswitch.conf</filename>. List of shadow entries to configure in {file}`/etc/nsswitch.conf`.
Note that "files" is always prepended. Note that "files" is always prepended.
@ -64,8 +64,8 @@ with lib;
hosts = mkOption { hosts = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
description = '' description = lib.mdDoc ''
List of hosts entries to configure in <filename>/etc/nsswitch.conf</filename>. List of hosts entries to configure in {file}`/etc/nsswitch.conf`.
Note that "files" is always prepended, and "dns" and "myhostname" are always appended. Note that "files" is always prepended, and "dns" and "myhostname" are always appended.
@ -76,8 +76,8 @@ with lib;
services = mkOption { services = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
description = '' description = lib.mdDoc ''
List of services entries to configure in <filename>/etc/nsswitch.conf</filename>. List of services entries to configure in {file}`/etc/nsswitch.conf`.
Note that "files" is always prepended. Note that "files" is always prepended.

View file

@ -89,7 +89,7 @@ in {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Whether to enable the PulseAudio sound server. Whether to enable the PulseAudio sound server.
''; '';
}; };
@ -97,7 +97,7 @@ in {
systemWide = mkOption { systemWide = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
If false, a PulseAudio server is launched automatically for If false, a PulseAudio server is launched automatically for
each user that tries to use the sound system. The server runs each user that tries to use the sound system. The server runs
with user privileges. If true, one system-wide PulseAudio with user privileges. If true, one system-wide PulseAudio
@ -112,7 +112,7 @@ in {
support32Bit = mkOption { support32Bit = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Whether to include the 32-bit pulseaudio libraries in the system or not. Whether to include the 32-bit pulseaudio libraries in the system or not.
This is only useful on 64-bit systems and currently limited to x86_64-linux. This is only useful on 64-bit systems and currently limited to x86_64-linux.
''; '';
@ -120,7 +120,7 @@ in {
configFile = mkOption { configFile = mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;
description = '' description = lib.mdDoc ''
The path to the default configuration options the PulseAudio server The path to the default configuration options the PulseAudio server
should use. By default, the "default.pa" configuration should use. By default, the "default.pa" configuration
from the PulseAudio distribution is used. from the PulseAudio distribution is used.
@ -130,8 +130,8 @@ in {
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
description = '' description = lib.mdDoc ''
Literal string to append to <literal>configFile</literal> Literal string to append to `configFile`
and the config file generated by the pulseaudio module. and the config file generated by the pulseaudio module.
''; '';
}; };
@ -139,7 +139,7 @@ in {
extraClientConf = mkOption { extraClientConf = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
description = '' description = lib.mdDoc ''
Extra configuration appended to pulse/client.conf file. Extra configuration appended to pulse/client.conf file.
''; '';
}; };
@ -151,10 +151,10 @@ in {
else pkgs.pulseaudio; else pkgs.pulseaudio;
defaultText = literalExpression "pkgs.pulseaudio"; defaultText = literalExpression "pkgs.pulseaudio";
example = literalExpression "pkgs.pulseaudioFull"; example = literalExpression "pkgs.pulseaudioFull";
description = '' description = lib.mdDoc ''
The PulseAudio derivation to use. This can be used to enable The PulseAudio derivation to use. This can be used to enable
features (such as JACK support, Bluetooth) via the features (such as JACK support, Bluetooth) via the
<literal>pulseaudioFull</literal> package. `pulseaudioFull` package.
''; '';
}; };
@ -162,7 +162,7 @@ in {
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = [];
example = literalExpression "[ pkgs.pulseaudio-modules-bt ]"; example = literalExpression "[ pkgs.pulseaudio-modules-bt ]";
description = '' description = lib.mdDoc ''
Extra pulseaudio modules to use. This is intended for out-of-tree Extra pulseaudio modules to use. This is intended for out-of-tree
pulseaudio modules like extra bluetooth codecs. pulseaudio modules like extra bluetooth codecs.
@ -174,7 +174,7 @@ in {
logLevel = mkOption { logLevel = mkOption {
type = types.str; type = types.str;
default = "notice"; default = "notice";
description = '' description = lib.mdDoc ''
The log level that the system-wide pulseaudio daemon should use, The log level that the system-wide pulseaudio daemon should use,
if activated. if activated.
''; '';
@ -183,7 +183,7 @@ in {
config = mkOption { config = mkOption {
type = types.attrsOf types.unspecified; type = types.attrsOf types.unspecified;
default = {}; default = {};
description = "Config of the pulse daemon. See <literal>man pulse-daemon.conf</literal>."; description = lib.mdDoc "Config of the pulse daemon. See `man pulse-daemon.conf`.";
example = literalExpression ''{ realtime-scheduling = "yes"; }''; example = literalExpression ''{ realtime-scheduling = "yes"; }'';
}; };
}; };
@ -205,7 +205,7 @@ in {
type = types.listOf types.str; type = types.listOf types.str;
default = []; default = [];
example = literalExpression ''[ "127.0.0.1" "192.168.1.0/24" ]''; example = literalExpression ''[ "127.0.0.1" "192.168.1.0/24" ]'';
description = '' description = lib.mdDoc ''
A list of IP subnets that are allowed to stream to the server. A list of IP subnets that are allowed to stream to the server.
''; '';
}; };

View file

@ -20,10 +20,10 @@ in {
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = [];
example = literalExpression "with pkgs.unixODBCDrivers; [ sqlite psql ]"; example = literalExpression "with pkgs.unixODBCDrivers; [ sqlite psql ]";
description = '' description = lib.mdDoc ''
Specifies Unix ODBC drivers to be registered in Specifies Unix ODBC drivers to be registered in
<filename>/etc/odbcinst.ini</filename>. You may also want to {file}`/etc/odbcinst.ini`. You may also want to
add <literal>pkgs.unixODBC</literal> to the system path to get add `pkgs.unixODBC` to the system path to get
a command line client to connect to ODBC databases. a command line client to connect to ODBC databases.
''; '';
}; };

View file

@ -10,9 +10,9 @@ with lib;
xdg.autostart.enable = mkOption { xdg.autostart.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = lib.mdDoc ''
Whether to install files to support the Whether to install files to support the
<link xlink:href="https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html">XDG Autostart specification</link>. [XDG Autostart specification](https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html).
''; '';
}; };
}; };

View file

@ -10,9 +10,9 @@ with lib;
xdg.icons.enable = mkOption { xdg.icons.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = lib.mdDoc ''
Whether to install files to support the Whether to install files to support the
<link xlink:href="https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html">XDG Icon Theme specification</link>. [XDG Icon Theme specification](https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html).
''; '';
}; };
}; };

View file

@ -10,9 +10,9 @@ with lib;
xdg.menus.enable = mkOption { xdg.menus.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = lib.mdDoc ''
Whether to install files to support the Whether to install files to support the
<link xlink:href="https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html">XDG Desktop Menu specification</link>. [XDG Desktop Menu specification](https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html).
''; '';
}; };
}; };

View file

@ -10,9 +10,9 @@ with lib;
xdg.sounds.enable = mkOption { xdg.sounds.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = lib.mdDoc ''
Whether to install files to support the Whether to install files to support the
<link xlink:href="https://www.freedesktop.org/wiki/Specifications/sound-theme-spec/">XDG Sound Theme specification</link>. [XDG Sound Theme specification](https://www.freedesktop.org/wiki/Specifications/sound-theme-spec/).
''; '';
}; };
}; };

View file

@ -6,13 +6,13 @@ let
in in
{ {
options.hardware.cpu.intel.sgx.enableDcapCompat = mkOption { options.hardware.cpu.intel.sgx.enableDcapCompat = mkOption {
description = '' description = lib.mdDoc ''
Whether to enable backward compatibility for SGX software build for the Whether to enable backward compatibility for SGX software build for the
out-of-tree Intel SGX DCAP driver. out-of-tree Intel SGX DCAP driver.
Creates symbolic links for the SGX devices <literal>/dev/sgx_enclave</literal> Creates symbolic links for the SGX devices `/dev/sgx_enclave`
and <literal>/dev/sgx_provision</literal> to make them available as and `/dev/sgx_provision` to make them available as
<literal>/dev/sgx/enclave</literal> and <literal>/dev/sgx/provision</literal>, `/dev/sgx/enclave` and `/dev/sgx/provision`,
respectively. respectively.
''; '';
type = types.bool; type = types.bool;
@ -22,17 +22,17 @@ in
options.hardware.cpu.intel.sgx.provision = { options.hardware.cpu.intel.sgx.provision = {
enable = mkEnableOption "access to the Intel SGX provisioning device"; enable = mkEnableOption "access to the Intel SGX provisioning device";
user = mkOption { user = mkOption {
description = "Owner to assign to the SGX provisioning device."; description = lib.mdDoc "Owner to assign to the SGX provisioning device.";
type = types.str; type = types.str;
default = "root"; default = "root";
}; };
group = mkOption { group = mkOption {
description = "Group to assign to the SGX provisioning device."; description = lib.mdDoc "Group to assign to the SGX provisioning device.";
type = types.str; type = types.str;
default = defaultPrvGroup; default = defaultPrvGroup;
}; };
mode = mkOption { mode = mkOption {
description = "Mode to set for the SGX provisioning device."; description = lib.mdDoc "Mode to set for the SGX provisioning device.";
type = types.str; type = types.str;
default = "0660"; default = "0660";
}; };

View file

@ -15,9 +15,9 @@ in {
sleep = mkOption { sleep = mkOption {
type = types.nullOr types.int; type = types.nullOr types.int;
default = null; default = null;
description = '' description = lib.mdDoc ''
How many milliseconds ksmd should sleep between scans. How many milliseconds ksmd should sleep between scans.
Setting it to <literal>null</literal> uses the kernel's default time. Setting it to `null` uses the kernel's default time.
''; '';
}; };
}; };

View file

@ -22,9 +22,9 @@ in
let let
enginesDrv = filterAttrs (const isDerivation) pkgs.fcitx-engines; enginesDrv = filterAttrs (const isDerivation) pkgs.fcitx-engines;
engines = concatStringsSep ", " engines = concatStringsSep ", "
(map (name: "<literal>${name}</literal>") (attrNames enginesDrv)); (map (name: "`${name}`") (attrNames enginesDrv));
in in
"Enabled Fcitx engines. Available engines are: ${engines}."; lib.mdDoc "Enabled Fcitx engines. Available engines are: ${engines}.";
}; };
}; };

View file

@ -43,15 +43,15 @@ in
let let
enginesDrv = filterAttrs (const isDerivation) pkgs.ibus-engines; enginesDrv = filterAttrs (const isDerivation) pkgs.ibus-engines;
engines = concatStringsSep ", " engines = concatStringsSep ", "
(map (name: "<literal>${name}</literal>") (attrNames enginesDrv)); (map (name: "`${name}`") (attrNames enginesDrv));
in in
"Enabled IBus engines. Available engines are: ${engines}."; lib.mdDoc "Enabled IBus engines. Available engines are: ${engines}.";
}; };
panel = mkOption { panel = mkOption {
type = with types; nullOr path; type = with types; nullOr path;
default = null; default = null;
example = literalExpression ''"''${pkgs.plasma5Packages.plasma-desktop}/lib/libexec/kimpanel-ibus-panel"''; example = literalExpression ''"''${pkgs.plasma5Packages.plasma-desktop}/lib/libexec/kimpanel-ibus-panel"'';
description = "Replace the IBus panel with another panel."; description = lib.mdDoc "Replace the IBus panel with another panel.";
}; };
}; };
}; };

View file

@ -75,15 +75,15 @@ in
configuration = mkOption { configuration = mkOption {
internal = true; internal = true;
type = types.str; type = types.str;
description = '' description = lib.mdDoc ''
The NixOS module that <literal>nixos-generate-config</literal> The NixOS module that `nixos-generate-config`
saves to <literal>/etc/nixos/configuration.nix</literal>. saves to `/etc/nixos/configuration.nix`.
This is an internal option. No backward compatibility is guaranteed. This is an internal option. No backward compatibility is guaranteed.
Use at your own risk! Use at your own risk!
Note that this string gets spliced into a Perl script. The perl Note that this string gets spliced into a Perl script. The perl
variable <literal>$bootLoaderConfig</literal> can be used to variable `$bootLoaderConfig` can be used to
splice in the boot loader configuration. splice in the boot loader configuration.
''; '';
}; };
@ -92,15 +92,15 @@ in
internal = true; internal = true;
type = types.listOf types.lines; type = types.listOf types.lines;
default = []; default = [];
description = '' description = lib.mdDoc ''
Text to preseed the desktop configuration that <literal>nixos-generate-config</literal> Text to preseed the desktop configuration that `nixos-generate-config`
saves to <literal>/etc/nixos/configuration.nix</literal>. saves to `/etc/nixos/configuration.nix`.
This is an internal option. No backward compatibility is guaranteed. This is an internal option. No backward compatibility is guaranteed.
Use at your own risk! Use at your own risk!
Note that this string gets spliced into a Perl script. The perl Note that this string gets spliced into a Perl script. The perl
variable <literal>$bootLoaderConfig</literal> can be used to variable `$bootLoaderConfig` can be used to
splice in the boot loader configuration. splice in the boot loader configuration.
''; '';
}; };
@ -110,7 +110,7 @@ in
internal = true; internal = true;
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Disable nixos-rebuild, nixos-generate-config, nixos-installer Disable nixos-rebuild, nixos-generate-config, nixos-installer
and other NixOS tools. This is useful to shrink embedded, and other NixOS tools. This is useful to shrink embedded,
read-only systems which are not expected to be rebuild or read-only systems which are not expected to be rebuild or

View file

@ -36,8 +36,8 @@ in
type = lib.types.package; type = lib.types.package;
default = pkgs.man-db; default = pkgs.man-db;
defaultText = lib.literalExpression "pkgs.man-db"; defaultText = lib.literalExpression "pkgs.man-db";
description = '' description = lib.mdDoc ''
The <literal>man-db</literal> derivation to use. Useful to override The `man-db` derivation to use. Useful to override
configuration options used for the package. configuration options used for the package.
''; '';
}; };

View file

@ -16,9 +16,9 @@ in {
type = with lib.types; listOf str; type = with lib.types; listOf str;
default = [ "share/man" ]; default = [ "share/man" ];
example = lib.literalExpression "[ \"share/man\" \"share/man/fr\" ]"; example = lib.literalExpression "[ \"share/man\" \"share/man/fr\" ]";
description = '' description = lib.mdDoc ''
Change the manpath, i. e. the directories where Change the manpath, i. e. the directories where
<citerefentry><refentrytitle>man</refentrytitle><manvolnum>1</manvolnum></citerefentry> {manpage}`man(1)`
looks for section-specific directories of man pages. looks for section-specific directories of man pages.
You only need to change this setting if you want extra man pages You only need to change this setting if you want extra man pages
(e. g. in non-english languages). All values must be strings that (e. g. in non-english languages). All values must be strings that
@ -31,8 +31,8 @@ in {
type = lib.types.package; type = lib.types.package;
default = pkgs.mandoc; default = pkgs.mandoc;
defaultText = lib.literalExpression "pkgs.mandoc"; defaultText = lib.literalExpression "pkgs.mandoc";
description = '' description = lib.mdDoc ''
The <literal>mandoc</literal> derivation to use. Useful to override The `mandoc` derivation to use. Useful to override
configuration options used for the package. configuration options used for the package.
''; '';
}; };

View file

@ -49,42 +49,42 @@ in
nixos.version = mkOption { nixos.version = mkOption {
internal = true; internal = true;
type = types.str; type = types.str;
description = "The full NixOS version (e.g. <literal>16.03.1160.f2d4ee1</literal>)."; description = lib.mdDoc "The full NixOS version (e.g. `16.03.1160.f2d4ee1`).";
}; };
nixos.release = mkOption { nixos.release = mkOption {
readOnly = true; readOnly = true;
type = types.str; type = types.str;
default = trivial.release; default = trivial.release;
description = "The NixOS release (e.g. <literal>16.03</literal>)."; description = lib.mdDoc "The NixOS release (e.g. `16.03`).";
}; };
nixos.versionSuffix = mkOption { nixos.versionSuffix = mkOption {
internal = true; internal = true;
type = types.str; type = types.str;
default = trivial.versionSuffix; default = trivial.versionSuffix;
description = "The NixOS version suffix (e.g. <literal>1160.f2d4ee1</literal>)."; description = lib.mdDoc "The NixOS version suffix (e.g. `1160.f2d4ee1`).";
}; };
nixos.revision = mkOption { nixos.revision = mkOption {
internal = true; internal = true;
type = types.nullOr types.str; type = types.nullOr types.str;
default = trivial.revisionWithDefault null; default = trivial.revisionWithDefault null;
description = "The Git revision from which this NixOS configuration was built."; description = lib.mdDoc "The Git revision from which this NixOS configuration was built.";
}; };
nixos.codeName = mkOption { nixos.codeName = mkOption {
readOnly = true; readOnly = true;
type = types.str; type = types.str;
default = trivial.codeName; default = trivial.codeName;
description = "The NixOS release code name (e.g. <literal>Emu</literal>)."; description = lib.mdDoc "The NixOS release code name (e.g. `Emu`).";
}; };
stateVersion = mkOption { stateVersion = mkOption {
type = types.str; type = types.str;
default = cfg.release; default = cfg.release;
defaultText = literalExpression "config.${opt.release}"; defaultText = literalExpression "config.${opt.release}";
description = '' description = lib.mdDoc ''
Every once in a while, a new NixOS release may change Every once in a while, a new NixOS release may change
configuration defaults in a way incompatible with stateful configuration defaults in a way incompatible with stateful
data. For instance, if the default version of PostgreSQL data. For instance, if the default version of PostgreSQL
@ -108,13 +108,13 @@ in
internal = true; internal = true;
type = types.str; type = types.str;
default = "https://nixos.org/channels/nixos-unstable"; default = "https://nixos.org/channels/nixos-unstable";
description = "Default NixOS channel to which the root user is subscribed."; description = lib.mdDoc "Default NixOS channel to which the root user is subscribed.";
}; };
configurationRevision = mkOption { configurationRevision = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
description = "The Git revision of the top-level flake from which this configuration was built."; description = lib.mdDoc "The Git revision of the top-level flake from which this configuration was built.";
}; };
}; };

View file

@ -20,7 +20,7 @@ in
type = types.package; type = types.package;
default = pkgs.atop; default = pkgs.atop;
defaultText = literalExpression "pkgs.atop"; defaultText = literalExpression "pkgs.atop";
description = '' description = lib.mdDoc ''
Which package to use for Atop. Which package to use for Atop.
''; '';
}; };
@ -29,7 +29,7 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Whether to install and enable the netatop kernel module. Whether to install and enable the netatop kernel module.
Note: this sets the kernel taint flag "O" for loading out-of-tree modules. Note: this sets the kernel taint flag "O" for loading out-of-tree modules.
''; '';
@ -38,7 +38,7 @@ in
type = types.package; type = types.package;
default = config.boot.kernelPackages.netatop; default = config.boot.kernelPackages.netatop;
defaultText = literalExpression "config.boot.kernelPackages.netatop"; defaultText = literalExpression "config.boot.kernelPackages.netatop";
description = '' description = lib.mdDoc ''
Which package to use for netatop. Which package to use for netatop.
''; '';
}; };
@ -47,7 +47,7 @@ in
atopgpu.enable = mkOption { atopgpu.enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Whether to install and enable the atopgpud daemon to get information about Whether to install and enable the atopgpud daemon to get information about
NVIDIA gpus. NVIDIA gpus.
''; '';
@ -56,7 +56,7 @@ in
setuidWrapper.enable = mkOption { setuidWrapper.enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Whether to install a setuid wrapper for Atop. This is required to use some of Whether to install a setuid wrapper for Atop. This is required to use some of
the features as non-root user (e.g.: ipc information, netatop, atopgpu). the features as non-root user (e.g.: ipc information, netatop, atopgpu).
Atop tries to drop the root privileges shortly after starting. Atop tries to drop the root privileges shortly after starting.
@ -66,7 +66,7 @@ in
atopService.enable = mkOption { atopService.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = lib.mdDoc ''
Whether to enable the atop service responsible for storing statistics for Whether to enable the atop service responsible for storing statistics for
long-term analysis. long-term analysis.
''; '';
@ -74,7 +74,7 @@ in
atopRotateTimer.enable = mkOption { atopRotateTimer.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = lib.mdDoc ''
Whether to enable the atop-rotate timer, which restarts the atop service Whether to enable the atop-rotate timer, which restarts the atop service
daily to make sure the data files are rotate. daily to make sure the data files are rotate.
''; '';
@ -82,7 +82,7 @@ in
atopacctService.enable = mkOption { atopacctService.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = lib.mdDoc ''
Whether to enable the atopacct service which manages process accounting. Whether to enable the atopacct service which manages process accounting.
This allows Atop to gather data about processes that disappeared in between This allows Atop to gather data about processes that disappeared in between
two refresh intervals. two refresh intervals.
@ -95,8 +95,8 @@ in
flags = "a1f"; flags = "a1f";
interval = 5; interval = 5;
}; };
description = '' description = lib.mdDoc ''
Parameters to be written to <filename>/etc/atoprc</filename>. Parameters to be written to {file}`/etc/atoprc`.
''; '';
}; };
}; };

View file

@ -30,10 +30,10 @@ in
/* /*
enable = mkOption { enable = mkOption {
default = true; default = true;
description = '' description = lib.mdDoc ''
Whenever to configure Bash as an interactive shell. Whenever to configure Bash as an interactive shell.
Note that this tries to make Bash the default Note that this tries to make Bash the default
<option>users.defaultUserShell</option>, {option}`users.defaultUserShell`,
which in turn means that you might need to explicitly which in turn means that you might need to explicitly
set this variable if you have another shell configured set this variable if you have another shell configured
with NixOS. with NixOS.
@ -44,16 +44,16 @@ in
shellAliases = mkOption { shellAliases = mkOption {
default = {}; default = {};
description = '' description = lib.mdDoc ''
Set of aliases for bash shell, which overrides <option>environment.shellAliases</option>. Set of aliases for bash shell, which overrides {option}`environment.shellAliases`.
See <option>environment.shellAliases</option> for an option format description. See {option}`environment.shellAliases` for an option format description.
''; '';
type = with types; attrsOf (nullOr (either str path)); type = with types; attrsOf (nullOr (either str path));
}; };
shellInit = mkOption { shellInit = mkOption {
default = ""; default = "";
description = '' description = lib.mdDoc ''
Shell script code called during bash shell initialisation. Shell script code called during bash shell initialisation.
''; '';
type = types.lines; type = types.lines;
@ -61,7 +61,7 @@ in
loginShellInit = mkOption { loginShellInit = mkOption {
default = ""; default = "";
description = '' description = lib.mdDoc ''
Shell script code called during login bash shell initialisation. Shell script code called during login bash shell initialisation.
''; '';
type = types.lines; type = types.lines;
@ -69,7 +69,7 @@ in
interactiveShellInit = mkOption { interactiveShellInit = mkOption {
default = ""; default = "";
description = '' description = lib.mdDoc ''
Shell script code called during interactive bash shell initialisation. Shell script code called during interactive bash shell initialisation.
''; '';
type = types.lines; type = types.lines;
@ -92,7 +92,7 @@ in
fi fi
fi fi
''; '';
description = '' description = lib.mdDoc ''
Shell script code used to initialise the bash prompt. Shell script code used to initialise the bash prompt.
''; '';
type = types.lines; type = types.lines;
@ -100,7 +100,7 @@ in
promptPluginInit = mkOption { promptPluginInit = mkOption {
default = ""; default = "";
description = '' description = lib.mdDoc ''
Shell script code used to initialise bash prompt plugins. Shell script code used to initialise bash prompt plugins.
''; '';
type = types.lines; type = types.lines;

View file

@ -33,14 +33,14 @@ in
profiles = mkOption { profiles = mkOption {
type = types.attrsOf types.path; type = types.attrsOf types.path;
default = {}; default = {};
description = "Set of dconf profile files, installed at <filename>/etc/dconf/profiles/<replaceable>name</replaceable></filename>."; description = lib.mdDoc "Set of dconf profile files, installed at {file}`/etc/dconf/profiles/«name»`.";
internal = true; internal = true;
}; };
packages = mkOption { packages = mkOption {
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = [];
description = "A list of packages which provide dconf profiles and databases in <filename>/etc/dconf</filename>."; description = lib.mdDoc "A list of packages which provide dconf profiles and databases in {file}`/etc/dconf`.";
}; };
}; };
}; };

View file

@ -49,7 +49,7 @@ in
enable = mkOption { enable = mkOption {
default = false; default = false;
description = '' description = lib.mdDoc ''
Whether to configure fish as an interactive shell. Whether to configure fish as an interactive shell.
''; '';
type = types.bool; type = types.bool;
@ -58,16 +58,16 @@ in
useBabelfish = mkOption { useBabelfish = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
If enabled, the configured environment will be translated to native fish using <link xlink:href="https://github.com/bouk/babelfish">babelfish</link>. If enabled, the configured environment will be translated to native fish using [babelfish](https://github.com/bouk/babelfish).
Otherwise, <link xlink:href="https://github.com/oh-my-fish/plugin-foreign-env">foreign-env</link> will be used. Otherwise, [foreign-env](https://github.com/oh-my-fish/plugin-foreign-env) will be used.
''; '';
}; };
vendor.config.enable = mkOption { vendor.config.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = lib.mdDoc ''
Whether fish should source configuration snippets provided by other packages. Whether fish should source configuration snippets provided by other packages.
''; '';
}; };
@ -75,7 +75,7 @@ in
vendor.completions.enable = mkOption { vendor.completions.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = lib.mdDoc ''
Whether fish should use completion files provided by other packages. Whether fish should use completion files provided by other packages.
''; '';
}; };
@ -83,7 +83,7 @@ in
vendor.functions.enable = mkOption { vendor.functions.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = lib.mdDoc ''
Whether fish should autoload fish functions provided by other packages. Whether fish should autoload fish functions provided by other packages.
''; '';
}; };
@ -94,7 +94,7 @@ in
gco = "git checkout"; gco = "git checkout";
npu = "nix-prefetch-url"; npu = "nix-prefetch-url";
}; };
description = '' description = lib.mdDoc ''
Set of fish abbreviations. Set of fish abbreviations.
''; '';
type = with types; attrsOf str; type = with types; attrsOf str;
@ -102,16 +102,16 @@ in
shellAliases = mkOption { shellAliases = mkOption {
default = {}; default = {};
description = '' description = lib.mdDoc ''
Set of aliases for fish shell, which overrides <option>environment.shellAliases</option>. Set of aliases for fish shell, which overrides {option}`environment.shellAliases`.
See <option>environment.shellAliases</option> for an option format description. See {option}`environment.shellAliases` for an option format description.
''; '';
type = with types; attrsOf (nullOr (either str path)); type = with types; attrsOf (nullOr (either str path));
}; };
shellInit = mkOption { shellInit = mkOption {
default = ""; default = "";
description = '' description = lib.mdDoc ''
Shell script code called during fish shell initialisation. Shell script code called during fish shell initialisation.
''; '';
type = types.lines; type = types.lines;
@ -119,7 +119,7 @@ in
loginShellInit = mkOption { loginShellInit = mkOption {
default = ""; default = "";
description = '' description = lib.mdDoc ''
Shell script code called during fish login shell initialisation. Shell script code called during fish login shell initialisation.
''; '';
type = types.lines; type = types.lines;
@ -127,7 +127,7 @@ in
interactiveShellInit = mkOption { interactiveShellInit = mkOption {
default = ""; default = "";
description = '' description = lib.mdDoc ''
Shell script code called during interactive fish shell initialisation. Shell script code called during interactive fish shell initialisation.
''; '';
type = types.lines; type = types.lines;
@ -135,7 +135,7 @@ in
promptInit = mkOption { promptInit = mkOption {
default = ""; default = "";
description = '' description = lib.mdDoc ''
Shell script code used to initialise fish prompt. Shell script code used to initialise fish prompt.
''; '';
type = types.lines; type = types.lines;

View file

@ -41,12 +41,12 @@ in
type = types.nullOr types.path; type = types.nullOr types.path;
default = null; default = null;
example = literalExpression ''"''${pkgs.my-configs}/lesskey"''; example = literalExpression ''"''${pkgs.my-configs}/lesskey"'';
description = '' description = lib.mdDoc ''
Path to lesskey configuration file. Path to lesskey configuration file.
<option>configFile</option> takes precedence over <option>commands</option>, {option}`configFile` takes precedence over {option}`commands`,
<option>clearDefaultCommands</option>, <option>lineEditingKeys</option>, and {option}`clearDefaultCommands`, {option}`lineEditingKeys`, and
<option>envVariables</option>. {option}`envVariables`.
''; '';
}; };
@ -57,13 +57,13 @@ in
h = "noaction 5\\e("; h = "noaction 5\\e(";
l = "noaction 5\\e)"; l = "noaction 5\\e)";
}; };
description = "Defines new command keys."; description = lib.mdDoc "Defines new command keys.";
}; };
clearDefaultCommands = mkOption { clearDefaultCommands = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Clear all default commands. Clear all default commands.
You should remember to set the quit key. You should remember to set the quit key.
Otherwise you will not be able to leave less without killing it. Otherwise you will not be able to leave less without killing it.
@ -76,7 +76,7 @@ in
example = { example = {
e = "abort"; e = "abort";
}; };
description = "Defines new line-editing keys."; description = lib.mdDoc "Defines new line-editing keys.";
}; };
envVariables = mkOption { envVariables = mkOption {
@ -87,14 +87,14 @@ in
example = { example = {
LESS = "--quit-if-one-screen"; LESS = "--quit-if-one-screen";
}; };
description = "Defines environment variables."; description = lib.mdDoc "Defines environment variables.";
}; };
lessopen = mkOption { lessopen = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = "|${pkgs.lesspipe}/bin/lesspipe.sh %s"; default = "|${pkgs.lesspipe}/bin/lesspipe.sh %s";
defaultText = literalExpression ''"|''${pkgs.lesspipe}/bin/lesspipe.sh %s"''; defaultText = literalExpression ''"|''${pkgs.lesspipe}/bin/lesspipe.sh %s"'';
description = '' description = lib.mdDoc ''
Before less opens a file, it first gives your input preprocessor a chance to modify the way the contents of the file are displayed. Before less opens a file, it first gives your input preprocessor a chance to modify the way the contents of the file are displayed.
''; '';
}; };
@ -102,7 +102,7 @@ in
lessclose = mkOption { lessclose = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
description = '' description = lib.mdDoc ''
When less closes a file opened in such a way, it will call another program, called the input postprocessor, which may perform any desired clean-up action (such as deleting the replacement file created by LESSOPEN). When less closes a file opened in such a way, it will call another program, called the input postprocessor, which may perform any desired clean-up action (such as deleting the replacement file created by LESSOPEN).
''; '';
}; };

View file

@ -14,9 +14,9 @@ in
nanorc = lib.mkOption { nanorc = lib.mkOption {
type = lib.types.lines; type = lib.types.lines;
default = ""; default = "";
description = '' description = lib.mdDoc ''
The system-wide nano configuration. The system-wide nano configuration.
See <citerefentry><refentrytitle>nanorc</refentrytitle><manvolnum>5</manvolnum></citerefentry>. See {manpage}`nanorc(5)`.
''; '';
example = '' example = ''
set nowrap set nowrap
@ -27,7 +27,7 @@ in
syntaxHighlight = lib.mkOption { syntaxHighlight = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = true; default = true;
description = "Whether to enable syntax highlight for various languages."; description = lib.mdDoc "Whether to enable syntax highlight for various languages.";
}; };
}; };
}; };

View file

@ -26,17 +26,17 @@ let
type = mkOption { type = mkOption {
type = types.enum [ "http" "socks4" "socks5" ]; type = types.enum [ "http" "socks4" "socks5" ];
description = "Proxy type."; description = lib.mdDoc "Proxy type.";
}; };
host = mkOption { host = mkOption {
type = types.str; type = types.str;
description = "Proxy host or IP address."; description = lib.mdDoc "Proxy host or IP address.";
}; };
port = mkOption { port = mkOption {
type = types.port; type = types.port;
description = "Proxy port"; description = lib.mdDoc "Proxy port";
}; };
}; };
}; };
@ -55,26 +55,26 @@ in {
type = mkOption { type = mkOption {
type = types.enum [ "dynamic" "strict" "random" ]; type = types.enum [ "dynamic" "strict" "random" ];
default = "strict"; default = "strict";
description = '' description = lib.mdDoc ''
<literal>dynamic</literal> - Each connection will be done via chained proxies `dynamic` - Each connection will be done via chained proxies
all proxies chained in the order as they appear in the list all proxies chained in the order as they appear in the list
at least one proxy must be online to play in chain at least one proxy must be online to play in chain
(dead proxies are skipped) (dead proxies are skipped)
otherwise <literal>EINTR</literal> is returned to the app. otherwise `EINTR` is returned to the app.
<literal>strict</literal> - Each connection will be done via chained proxies `strict` - Each connection will be done via chained proxies
all proxies chained in the order as they appear in the list all proxies chained in the order as they appear in the list
all proxies must be online to play in chain all proxies must be online to play in chain
otherwise <literal>EINTR</literal> is returned to the app. otherwise `EINTR` is returned to the app.
<literal>random</literal> - Each connection will be done via random proxy `random` - Each connection will be done via random proxy
(or proxy chain, see <option>programs.proxychains.chain.length</option>) from the list. (or proxy chain, see {option}`programs.proxychains.chain.length`) from the list.
''; '';
}; };
length = mkOption { length = mkOption {
type = types.nullOr types.int; type = types.nullOr types.int;
default = null; default = null;
description = '' description = lib.mdDoc ''
Chain length for random chain. Chain length for random chain.
''; '';
}; };
@ -83,7 +83,7 @@ in {
proxyDNS = mkOption { proxyDNS = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = "Proxy DNS requests - no leak for DNS data."; description = lib.mdDoc "Proxy DNS requests - no leak for DNS data.";
}; };
quietMode = mkEnableOption "Quiet mode (no output from the library)."; quietMode = mkEnableOption "Quiet mode (no output from the library).";
@ -91,7 +91,7 @@ in {
remoteDNSSubnet = mkOption { remoteDNSSubnet = mkOption {
type = types.enum [ 10 127 224 ]; type = types.enum [ 10 127 224 ];
default = 224; default = 224;
description = '' description = lib.mdDoc ''
Set the class A subnet number to use for the internal remote DNS mapping, uses the reserved 224.x.x.x range by default. Set the class A subnet number to use for the internal remote DNS mapping, uses the reserved 224.x.x.x range by default.
''; '';
}; };
@ -99,24 +99,24 @@ in {
tcpReadTimeOut = mkOption { tcpReadTimeOut = mkOption {
type = types.int; type = types.int;
default = 15000; default = 15000;
description = "Connection read time-out in milliseconds."; description = lib.mdDoc "Connection read time-out in milliseconds.";
}; };
tcpConnectTimeOut = mkOption { tcpConnectTimeOut = mkOption {
type = types.int; type = types.int;
default = 8000; default = 8000;
description = "Connection time-out in milliseconds."; description = lib.mdDoc "Connection time-out in milliseconds.";
}; };
localnet = mkOption { localnet = mkOption {
type = types.str; type = types.str;
default = "127.0.0.0/255.0.0.0"; default = "127.0.0.0/255.0.0.0";
description = "By default enable localnet for loopback address ranges."; description = lib.mdDoc "By default enable localnet for loopback address ranges.";
}; };
proxies = mkOption { proxies = mkOption {
type = types.attrsOf (types.submodule proxyOptions); type = types.attrsOf (types.submodule proxyOptions);
description = '' description = lib.mdDoc ''
Proxies to be used by proxychains. Proxies to be used by proxychains.
''; '';

View file

@ -17,8 +17,8 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Whether to install SpaceFM and create <filename>/etc/spacefm/spacefm.conf</filename>. Whether to install SpaceFM and create {file}`/etc/spacefm/spacefm.conf`.
''; '';
}; };
@ -34,10 +34,10 @@ in
terminal_su = "''${pkgs.sudo}/bin/sudo"; terminal_su = "''${pkgs.sudo}/bin/sudo";
} }
''; '';
description = '' description = lib.mdDoc ''
The system-wide spacefm configuration. The system-wide spacefm configuration.
Parameters to be written to <filename>/etc/spacefm/spacefm.conf</filename>. Parameters to be written to {file}`/etc/spacefm/spacefm.conf`.
Refer to the <link xlink:href="https://ignorantguru.github.io/spacefm/spacefm-manual-en.html#programfiles-etc">relevant entry</link> in the SpaceFM manual. Refer to the [relevant entry](https://ignorantguru.github.io/spacefm/spacefm-manual-en.html#programfiles-etc) in the SpaceFM manual.
''; '';
}; };

View file

@ -16,8 +16,8 @@ in {
settings = mkOption { settings = mkOption {
inherit (settingsFormat) type; inherit (settingsFormat) type;
default = { }; default = { };
description = '' description = lib.mdDoc ''
Configuration included in <literal>starship.toml</literal>. Configuration included in `starship.toml`.
See https://starship.rs/config/#prompt for documentation. See https://starship.rs/config/#prompt for documentation.
''; '';

View file

@ -11,11 +11,11 @@ with lib;
security.lockKernelModules = mkOption { security.lockKernelModules = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Disable kernel module loading once the system is fully initialised. Disable kernel module loading once the system is fully initialised.
Module loading is disabled until the next reboot. Problems caused Module loading is disabled until the next reboot. Problems caused
by delayed module loading can be fixed by adding the module(s) in by delayed module loading can be fixed by adding the module(s) in
question to <option>boot.kernelModules</option>. question to {option}`boot.kernelModules`.
''; '';
}; };
}; };

View file

@ -29,7 +29,7 @@ in
if (subject.local) return "yes"; if (subject.local) return "yes";
}); });
''; '';
description = description = lib.mdDoc
'' ''
Any polkit rules to be added to config (in JavaScript ;-). See: Any polkit rules to be added to config (in JavaScript ;-). See:
http://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html#polkit-rules http://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html#polkit-rules
@ -40,12 +40,12 @@ in
type = types.listOf types.str; type = types.listOf types.str;
default = [ "unix-group:wheel" ]; default = [ "unix-group:wheel" ];
example = [ "unix-user:alice" "unix-group:admin" ]; example = [ "unix-user:alice" "unix-group:admin" ];
description = description = lib.mdDoc
'' ''
Specifies which users are considered administrators, for those Specifies which users are considered administrators, for those
actions that require the user to authenticate as an actions that require the user to authenticate as an
administrator (i.e. have an <literal>auth_admin</literal> administrator (i.e. have an `auth_admin`
value). By default, this is all users in the <literal>wheel</literal> group. value). By default, this is all users in the `wheel` group.
''; '';
}; };

View file

@ -22,11 +22,11 @@ in
enable = mkOption { enable = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = '' description = lib.mdDoc ''
Whether to create symlinks to the system generations under Whether to create symlinks to the system generations under
<literal>/boot</literal>. When enabled, `/boot`. When enabled,
<literal>/boot/default/kernel</literal>, `/boot/default/kernel`,
<literal>/boot/default/initrd</literal>, etc., are updated to `/boot/default/initrd`, etc., are updated to
point to the current generation's kernel image, initial RAM point to the current generation's kernel image, initial RAM
disk, and other bootstrap files. disk, and other bootstrap files.
@ -41,7 +41,7 @@ in
copyKernels = mkOption { copyKernels = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = '' description = lib.mdDoc ''
Whether copy the necessary boot files into /boot, so Whether copy the necessary boot files into /boot, so
/nix/store is not needed by the boot loader. /nix/store is not needed by the boot loader.
''; '';

View file

@ -177,11 +177,11 @@ in
default = pkgs.systemd; default = pkgs.systemd;
defaultText = literalExpression "pkgs.systemd"; defaultText = literalExpression "pkgs.systemd";
type = types.package; type = types.package;
description = "The systemd package."; description = lib.mdDoc "The systemd package.";
}; };
systemd.units = mkOption { systemd.units = mkOption {
description = "Definition of systemd units."; description = lib.mdDoc "Definition of systemd units.";
default = {}; default = {};
type = systemdUtils.types.units; type = systemdUtils.types.units;
}; };
@ -190,43 +190,43 @@ in
default = []; default = [];
type = types.listOf types.package; type = types.listOf types.package;
example = literalExpression "[ pkgs.systemd-cryptsetup-generator ]"; 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 { systemd.targets = mkOption {
default = {}; default = {};
type = systemdUtils.types.targets; type = systemdUtils.types.targets;
description = "Definition of systemd target units."; description = lib.mdDoc "Definition of systemd target units.";
}; };
systemd.services = mkOption { systemd.services = mkOption {
default = {}; default = {};
type = systemdUtils.types.services; type = systemdUtils.types.services;
description = "Definition of systemd service units."; description = lib.mdDoc "Definition of systemd service units.";
}; };
systemd.sockets = mkOption { systemd.sockets = mkOption {
default = {}; default = {};
type = systemdUtils.types.sockets; type = systemdUtils.types.sockets;
description = "Definition of systemd socket units."; description = lib.mdDoc "Definition of systemd socket units.";
}; };
systemd.timers = mkOption { systemd.timers = mkOption {
default = {}; default = {};
type = systemdUtils.types.timers; type = systemdUtils.types.timers;
description = "Definition of systemd timer units."; description = lib.mdDoc "Definition of systemd timer units.";
}; };
systemd.paths = mkOption { systemd.paths = mkOption {
default = {}; default = {};
type = systemdUtils.types.paths; type = systemdUtils.types.paths;
description = "Definition of systemd path units."; description = lib.mdDoc "Definition of systemd path units.";
}; };
systemd.mounts = mkOption { systemd.mounts = mkOption {
default = []; default = [];
type = systemdUtils.types.mounts; type = systemdUtils.types.mounts;
description = '' description = lib.mdDoc ''
Definition of systemd mount units. Definition of systemd mount units.
This is a list instead of an attrSet, because systemd mandates the names to be derived from This is a list instead of an attrSet, because systemd mandates the names to be derived from
the 'where' attribute. the 'where' attribute.
@ -236,7 +236,7 @@ in
systemd.automounts = mkOption { systemd.automounts = mkOption {
default = []; default = [];
type = systemdUtils.types.automounts; type = systemdUtils.types.automounts;
description = '' description = lib.mdDoc ''
Definition of systemd automount units. Definition of systemd automount units.
This is a list instead of an attrSet, because systemd mandates the names to be derived from This is a list instead of an attrSet, because systemd mandates the names to be derived from
the 'where' attribute. the 'where' attribute.
@ -246,41 +246,41 @@ in
systemd.slices = mkOption { systemd.slices = mkOption {
default = {}; default = {};
type = systemdUtils.types.slices; type = systemdUtils.types.slices;
description = "Definition of slice configurations."; description = lib.mdDoc "Definition of slice configurations.";
}; };
systemd.generators = mkOption { systemd.generators = mkOption {
type = types.attrsOf types.path; type = types.attrsOf types.path;
default = {}; default = {};
example = { systemd-gpt-auto-generator = "/dev/null"; }; example = { systemd-gpt-auto-generator = "/dev/null"; };
description = '' description = lib.mdDoc ''
Definition of systemd generators. Definition of systemd generators.
For each <literal>NAME = VALUE</literal> pair of the attrSet, a link is generated from For each `NAME = VALUE` pair of the attrSet, a link is generated from
<literal>/etc/systemd/system-generators/NAME</literal> to <literal>VALUE</literal>. `/etc/systemd/system-generators/NAME` to `VALUE`.
''; '';
}; };
systemd.shutdown = mkOption { systemd.shutdown = mkOption {
type = types.attrsOf types.path; type = types.attrsOf types.path;
default = {}; default = {};
description = '' description = lib.mdDoc ''
Definition of systemd shutdown executables. Definition of systemd shutdown executables.
For each <literal>NAME = VALUE</literal> pair of the attrSet, a link is generated from For each `NAME = VALUE` pair of the attrSet, a link is generated from
<literal>/etc/systemd/system-shutdown/NAME</literal> to <literal>VALUE</literal>. `/etc/systemd/system-shutdown/NAME` to `VALUE`.
''; '';
}; };
systemd.defaultUnit = mkOption { systemd.defaultUnit = mkOption {
default = "multi-user.target"; default = "multi-user.target";
type = types.str; type = types.str;
description = "Default unit started when the system boots."; description = lib.mdDoc "Default unit started when the system boots.";
}; };
systemd.ctrlAltDelUnit = mkOption { systemd.ctrlAltDelUnit = mkOption {
default = "reboot.target"; default = "reboot.target";
type = types.str; type = types.str;
example = "poweroff.target"; example = "poweroff.target";
description = '' description = lib.mdDoc ''
Target that should be started when Ctrl-Alt-Delete is pressed. 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 ])); type = with types; attrsOf (nullOr (oneOf [ str path package ]));
default = {}; default = {};
example = { TZ = "CET"; }; example = { TZ = "CET"; };
description = '' description = lib.mdDoc ''
Environment variables passed to <emphasis>all</emphasis> systemd units. Environment variables passed to *all* systemd units.
''; '';
}; };
@ -298,16 +298,16 @@ in
type = with types; attrsOf (nullOr (oneOf [ str path package ])); type = with types; attrsOf (nullOr (oneOf [ str path package ]));
default = {}; default = {};
example = { SYSTEMD_LOG_LEVEL = "debug"; }; example = { SYSTEMD_LOG_LEVEL = "debug"; };
description = '' description = lib.mdDoc ''
Environment variables of PID 1. These variables are Environment variables of PID 1. These variables are
<emphasis>not</emphasis> passed to started units. *not* passed to started units.
''; '';
}; };
systemd.enableCgroupAccounting = mkOption { systemd.enableCgroupAccounting = mkOption {
default = true; default = true;
type = types.bool; type = types.bool;
description = '' description = lib.mdDoc ''
Whether to enable cgroup accounting. Whether to enable cgroup accounting.
''; '';
}; };
@ -315,7 +315,7 @@ in
systemd.enableUnifiedCgroupHierarchy = mkOption { systemd.enableUnifiedCgroupHierarchy = mkOption {
default = true; default = true;
type = types.bool; type = types.bool;
description = '' description = lib.mdDoc ''
Whether to enable the unified cgroup hierarchy (cgroupsv2). Whether to enable the unified cgroup hierarchy (cgroupsv2).
''; '';
}; };
@ -324,7 +324,7 @@ in
default = ""; default = "";
type = types.lines; type = types.lines;
example = "DefaultLimitCORE=infinity"; example = "DefaultLimitCORE=infinity";
description = '' description = lib.mdDoc ''
Extra config options for systemd. See man systemd-system.conf for Extra config options for systemd. See man systemd-system.conf for
available options. available options.
''; '';
@ -334,7 +334,7 @@ in
default = ""; default = "";
type = types.lines; type = types.lines;
example = "HibernateDelaySec=1h"; example = "HibernateDelaySec=1h";
description = '' description = lib.mdDoc ''
Extra config options for systemd sleep state logic. Extra config options for systemd sleep state logic.
See sleep.conf.d(5) man page for available options. See sleep.conf.d(5) man page for available options.
''; '';
@ -344,7 +344,7 @@ in
default = [ ]; default = [ ];
type = types.listOf types.str; type = types.listOf types.str;
example = [ "debug-shell.service" "systemd-quotacheck.service" ]; example = [ "debug-shell.service" "systemd-quotacheck.service" ];
description = '' description = lib.mdDoc ''
Additional units shipped with systemd that shall be enabled. Additional units shipped with systemd that shall be enabled.
''; '';
}; };
@ -353,10 +353,10 @@ in
default = [ ]; default = [ ];
type = types.listOf types.str; type = types.listOf types.str;
example = [ "systemd-backlight@.service" ]; example = [ "systemd-backlight@.service" ];
description = '' description = lib.mdDoc ''
A list of units to skip when generating system systemd configuration directory. This has A list of units to skip when generating system systemd configuration directory. This has
priority over upstream units, <option>systemd.units</option>, and priority over upstream units, {option}`systemd.units`, and
<option>systemd.additionalUpstreamSystemUnits</option>. The main purpose of this is to {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 prevent a upstream systemd unit from being added to the initrd with any modifications made to it
by other NixOS modules. by other NixOS modules.
''; '';
@ -366,7 +366,7 @@ in
type = types.nullOr types.path; type = types.nullOr types.path;
default = null; default = null;
example = "/dev/watchdog"; example = "/dev/watchdog";
description = '' description = lib.mdDoc ''
The path to a hardware watchdog device which will be managed by systemd. The path to a hardware watchdog device which will be managed by systemd.
If not specified, systemd will default to /dev/watchdog. If not specified, systemd will default to /dev/watchdog.
''; '';
@ -376,7 +376,7 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "30s"; example = "30s";
description = '' description = lib.mdDoc ''
The amount of time which can elapse before a watchdog hardware device The amount of time which can elapse before a watchdog hardware device
will automatically reboot the system. Valid time units include "ms", will automatically reboot the system. Valid time units include "ms",
"s", "min", "h", "d", and "w". "s", "min", "h", "d", and "w".
@ -387,7 +387,7 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "10m"; example = "10m";
description = '' description = lib.mdDoc ''
The amount of time which can elapse after a reboot has been triggered The amount of time which can elapse after a reboot has been triggered
before a watchdog hardware device will automatically reboot the system. before a watchdog hardware device will automatically reboot the system.
Valid time units include "ms", "s", "min", "h", "d", and "w". Valid time units include "ms", "s", "min", "h", "d", and "w".
@ -398,7 +398,7 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "10m"; example = "10m";
description = '' description = lib.mdDoc ''
The amount of time which can elapse when kexec is being executed before The amount of time which can elapse when kexec is being executed before
a watchdog hardware device will automatically reboot the system. This a watchdog hardware device will automatically reboot the system. This
option should only be enabled if reloadTime is also enabled. Valid option should only be enabled if reloadTime is also enabled. Valid

View file

@ -150,7 +150,7 @@ in {
}; };
contents = mkOption { 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 '' example = literalExpression ''
{ {
"/etc/hostname".text = "mymachine"; "/etc/hostname".text = "mymachine";
@ -162,7 +162,7 @@ in {
}; };
storePaths = mkOption { storePaths = mkOption {
description = '' description = lib.mdDoc ''
Store paths to copy into the initrd as well. Store paths to copy into the initrd as well.
''; '';
type = with types; listOf (oneOf [ singleLineStr package ]); type = with types; listOf (oneOf [ singleLineStr package ]);
@ -170,7 +170,7 @@ in {
}; };
extraBin = mkOption { extraBin = mkOption {
description = '' description = lib.mdDoc ''
Tools to add to /bin Tools to add to /bin
''; '';
example = literalExpression '' example = literalExpression ''
@ -183,7 +183,7 @@ in {
}; };
suppressedStorePaths = mkOption { suppressedStorePaths = mkOption {
description = '' description = lib.mdDoc ''
Store paths specified in the storePaths option that Store paths specified in the storePaths option that
should not be copied. should not be copied.
''; '';
@ -194,7 +194,7 @@ in {
emergencyAccess = mkOption { emergencyAccess = mkOption {
type = with types; oneOf [ bool (nullOr (passwdEntry str)) ]; type = with types; oneOf [ bool (nullOr (passwdEntry str)) ];
visible = false; visible = false;
description = '' description = lib.mdDoc ''
Set to true for unauthenticated emergency access, and false for Set to true for unauthenticated emergency access, and false for
no emergency access. no emergency access.
@ -208,7 +208,7 @@ in {
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = [];
visible = false; visible = false;
description = '' description = lib.mdDoc ''
Packages to include in /bin for the stage 1 emergency shell. Packages to include in /bin for the stage 1 emergency shell.
''; '';
}; };
@ -218,7 +218,7 @@ in {
type = types.listOf types.str; type = types.listOf types.str;
visible = false; visible = false;
example = [ "debug-shell.service" "systemd-quotacheck.service" ]; example = [ "debug-shell.service" "systemd-quotacheck.service" ];
description = '' description = lib.mdDoc ''
Additional units shipped with systemd that shall be enabled. Additional units shipped with systemd that shall be enabled.
''; '';
}; };
@ -228,17 +228,17 @@ in {
type = types.listOf types.str; type = types.listOf types.str;
example = [ "systemd-backlight@.service" ]; example = [ "systemd-backlight@.service" ];
visible = false; visible = false;
description = '' description = lib.mdDoc ''
A list of units to skip when generating system systemd configuration directory. This has A list of units to skip when generating system systemd configuration directory. This has
priority over upstream units, <option>boot.initrd.systemd.units</option>, and priority over upstream units, {option}`boot.initrd.systemd.units`, and
<option>boot.initrd.systemd.additionalUpstreamUnits</option>. The main purpose of this is to {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 prevent a upstream systemd unit from being added to the initrd with any modifications made to it
by other NixOS modules. by other NixOS modules.
''; '';
}; };
units = mkOption { units = mkOption {
description = "Definition of systemd units."; description = lib.mdDoc "Definition of systemd units.";
default = {}; default = {};
visible = false; visible = false;
type = systemdUtils.types.units; type = systemdUtils.types.units;
@ -249,49 +249,49 @@ in {
visible = false; visible = false;
type = types.listOf types.package; type = types.listOf types.package;
example = literalExpression "[ pkgs.systemd-cryptsetup-generator ]"; example = literalExpression "[ pkgs.systemd-cryptsetup-generator ]";
description = "Packages providing systemd units and hooks."; description = lib.mdDoc "Packages providing systemd units and hooks.";
}; };
targets = mkOption { targets = mkOption {
default = {}; default = {};
visible = false; visible = false;
type = systemdUtils.types.initrdTargets; type = systemdUtils.types.initrdTargets;
description = "Definition of systemd target units."; description = lib.mdDoc "Definition of systemd target units.";
}; };
services = mkOption { services = mkOption {
default = {}; default = {};
type = systemdUtils.types.initrdServices; type = systemdUtils.types.initrdServices;
visible = false; visible = false;
description = "Definition of systemd service units."; description = lib.mdDoc "Definition of systemd service units.";
}; };
sockets = mkOption { sockets = mkOption {
default = {}; default = {};
type = systemdUtils.types.initrdSockets; type = systemdUtils.types.initrdSockets;
visible = false; visible = false;
description = "Definition of systemd socket units."; description = lib.mdDoc "Definition of systemd socket units.";
}; };
timers = mkOption { timers = mkOption {
default = {}; default = {};
type = systemdUtils.types.initrdTimers; type = systemdUtils.types.initrdTimers;
visible = false; visible = false;
description = "Definition of systemd timer units."; description = lib.mdDoc "Definition of systemd timer units.";
}; };
paths = mkOption { paths = mkOption {
default = {}; default = {};
type = systemdUtils.types.initrdPaths; type = systemdUtils.types.initrdPaths;
visible = false; visible = false;
description = "Definition of systemd path units."; description = lib.mdDoc "Definition of systemd path units.";
}; };
mounts = mkOption { mounts = mkOption {
default = []; default = [];
type = systemdUtils.types.initrdMounts; type = systemdUtils.types.initrdMounts;
visible = false; visible = false;
description = '' description = lib.mdDoc ''
Definition of systemd mount units. Definition of systemd mount units.
This is a list instead of an attrSet, because systemd mandates the names to be derived from This is a list instead of an attrSet, because systemd mandates the names to be derived from
the 'where' attribute. the 'where' attribute.
@ -302,7 +302,7 @@ in {
default = []; default = [];
type = systemdUtils.types.automounts; type = systemdUtils.types.automounts;
visible = false; visible = false;
description = '' description = lib.mdDoc ''
Definition of systemd automount units. Definition of systemd automount units.
This is a list instead of an attrSet, because systemd mandates the names to be derived from This is a list instead of an attrSet, because systemd mandates the names to be derived from
the 'where' attribute. the 'where' attribute.
@ -313,7 +313,7 @@ in {
default = {}; default = {};
type = systemdUtils.types.slices; type = systemdUtils.types.slices;
visible = false; visible = false;
description = "Definition of slice configurations."; description = lib.mdDoc "Definition of slice configurations.";
}; };
}; };

View file

@ -14,23 +14,23 @@ in
boot.cleanTmpDir = mkOption { boot.cleanTmpDir = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Whether to delete all files in <filename>/tmp</filename> during boot. Whether to delete all files in {file}`/tmp` during boot.
''; '';
}; };
boot.tmpOnTmpfs = mkOption { boot.tmpOnTmpfs = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Whether to mount a tmpfs on <filename>/tmp</filename> during boot. Whether to mount a tmpfs on {file}`/tmp` during boot.
''; '';
}; };
boot.tmpOnTmpfsSize = mkOption { boot.tmpOnTmpfsSize = mkOption {
type = types.oneOf [ types.str types.types.ints.positive ]; type = types.oneOf [ types.str types.types.ints.positive ];
default = "50%"; default = "50%";
description = '' description = lib.mdDoc ''
Size of tmpfs in percentage. Size of tmpfs in percentage.
Percentage is defined by systemd. Percentage is defined by systemd.
''; '';

View file

@ -82,8 +82,8 @@ in
"default/useradd".text = "GROUP=100 ..."; "default/useradd".text = "GROUP=100 ...";
} }
''; '';
description = '' description = lib.mdDoc ''
Set of files that have to be linked in <filename>/etc</filename>. Set of files that have to be linked in {file}`/etc`.
''; '';
type = with types; attrsOf (submodule ( type = with types; attrsOf (submodule (
@ -93,7 +93,7 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = lib.mdDoc ''
Whether this /etc file should be generated. This Whether this /etc file should be generated. This
option allows specific /etc files to be disabled. option allows specific /etc files to be disabled.
''; '';
@ -101,9 +101,9 @@ in
target = mkOption { target = mkOption {
type = types.str; type = types.str;
description = '' description = lib.mdDoc ''
Name of symlink (relative to Name of symlink (relative to
<filename>/etc</filename>). Defaults to the attribute {file}`/etc`). Defaults to the attribute
name. name.
''; '';
}; };
@ -111,20 +111,20 @@ in
text = mkOption { text = mkOption {
default = null; default = null;
type = types.nullOr types.lines; type = types.nullOr types.lines;
description = "Text of the file."; description = lib.mdDoc "Text of the file.";
}; };
source = mkOption { source = mkOption {
type = types.path; type = types.path;
description = "Path of the source file."; description = lib.mdDoc "Path of the source file.";
}; };
mode = mkOption { mode = mkOption {
type = types.str; type = types.str;
default = "symlink"; default = "symlink";
example = "0600"; example = "0600";
description = '' description = lib.mdDoc ''
If set to something else than <literal>symlink</literal>, If set to something else than `symlink`,
the file is copied instead of symlinked, with the given the file is copied instead of symlinked, with the given
file mode. file mode.
''; '';
@ -133,7 +133,7 @@ in
uid = mkOption { uid = mkOption {
default = 0; default = 0;
type = types.int; type = types.int;
description = '' description = lib.mdDoc ''
UID of created file. Only takes effect when the file is UID of created file. Only takes effect when the file is
copied (that is, the mode is not 'symlink'). copied (that is, the mode is not 'symlink').
''; '';
@ -142,7 +142,7 @@ in
gid = mkOption { gid = mkOption {
default = 0; default = 0;
type = types.int; type = types.int;
description = '' description = lib.mdDoc ''
GID of created file. Only takes effect when the file is GID of created file. Only takes effect when the file is
copied (that is, the mode is not 'symlink'). copied (that is, the mode is not 'symlink').
''; '';
@ -151,20 +151,20 @@ in
user = mkOption { user = mkOption {
default = "+${toString config.uid}"; default = "+${toString config.uid}";
type = types.str; type = types.str;
description = '' description = lib.mdDoc ''
User name of created file. User name of created file.
Only takes effect when the file is copied (that is, the mode is not 'symlink'). Only takes effect when the file is copied (that is, the mode is not 'symlink').
Changing this option takes precedence over <literal>uid</literal>. Changing this option takes precedence over `uid`.
''; '';
}; };
group = mkOption { group = mkOption {
default = "+${toString config.gid}"; default = "+${toString config.gid}";
type = types.str; type = types.str;
description = '' description = lib.mdDoc ''
Group name of created file. Group name of created file.
Only takes effect when the file is copied (that is, the mode is not 'symlink'). Only takes effect when the file is copied (that is, the mode is not 'symlink').
Changing this option takes precedence over <literal>gid</literal>. Changing this option takes precedence over `gid`.
''; '';
}; };

View file

@ -16,33 +16,33 @@ let
enable = mkOption { enable = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = "The block device is backed by an encrypted one, adds this device as a initrd luks entry."; description = lib.mdDoc "The block device is backed by an encrypted one, adds this device as a initrd luks entry.";
}; };
blkDev = mkOption { blkDev = mkOption {
default = null; default = null;
example = "/dev/sda1"; example = "/dev/sda1";
type = types.nullOr types.str; type = types.nullOr types.str;
description = "Location of the backing encrypted device."; description = lib.mdDoc "Location of the backing encrypted device.";
}; };
label = mkOption { label = mkOption {
default = null; default = null;
example = "rootfs"; example = "rootfs";
type = types.nullOr types.str; type = types.nullOr types.str;
description = "Label of the unlocked encrypted device. Set <literal>fileSystems.&lt;name?&gt;.device</literal> to <literal>/dev/mapper/&lt;label&gt;</literal> to mount the unlocked device."; description = lib.mdDoc "Label of the unlocked encrypted device. Set `fileSystems.<name?>.device` to `/dev/mapper/<label>` to mount the unlocked device.";
}; };
keyFile = mkOption { keyFile = mkOption {
default = null; default = null;
example = "/mnt-root/root/.swapkey"; example = "/mnt-root/root/.swapkey";
type = types.nullOr types.str; type = types.nullOr types.str;
description = '' description = lib.mdDoc ''
Path to a keyfile used to unlock the backing encrypted Path to a keyfile used to unlock the backing encrypted
device. At the time this keyfile is accessed, the device. At the time this keyfile is accessed, the
<literal>neededForBoot</literal> filesystems (see `neededForBoot` filesystems (see
<literal>fileSystems.&lt;name?&gt;.neededForBoot</literal>) `fileSystems.<name?>.neededForBoot`)
will have been mounted under <literal>/mnt-root</literal>, will have been mounted under `/mnt-root`,
so the keyfile path should usually start with "/mnt-root/". so the keyfile path should usually start with "/mnt-root/".
''; '';
}; };

View file

@ -14,7 +14,7 @@ in
d2 = "/mnt/disk2/"; d2 = "/mnt/disk2/";
d3 = "/mnt/disk3/"; d3 = "/mnt/disk3/";
}; };
description = "SnapRAID data disks."; description = lib.mdDoc "SnapRAID data disks.";
type = attrsOf str; type = attrsOf str;
}; };
parityFiles = mkOption { parityFiles = mkOption {
@ -27,7 +27,7 @@ in
"/mnt/diskt/snapraid.5-parity" "/mnt/diskt/snapraid.5-parity"
"/mnt/disku/snapraid.6-parity" "/mnt/disku/snapraid.6-parity"
]; ];
description = "SnapRAID parity files."; description = lib.mdDoc "SnapRAID parity files.";
type = listOf str; type = listOf str;
}; };
contentFiles = mkOption { contentFiles = mkOption {
@ -37,46 +37,46 @@ in
"/mnt/disk1/snapraid.content" "/mnt/disk1/snapraid.content"
"/mnt/disk2/snapraid.content" "/mnt/disk2/snapraid.content"
]; ];
description = "SnapRAID content list files."; description = lib.mdDoc "SnapRAID content list files.";
type = listOf str; type = listOf str;
}; };
exclude = mkOption { exclude = mkOption {
default = [ ]; default = [ ];
example = [ "*.unrecoverable" "/tmp/" "/lost+found/" ]; example = [ "*.unrecoverable" "/tmp/" "/lost+found/" ];
description = "SnapRAID exclude directives."; description = lib.mdDoc "SnapRAID exclude directives.";
type = listOf str; type = listOf str;
}; };
touchBeforeSync = mkOption { touchBeforeSync = mkOption {
default = true; default = true;
example = false; example = false;
description = description = lib.mdDoc
"Whether <command>snapraid touch</command> should be run before <command>snapraid sync</command>."; "Whether {command}`snapraid touch` should be run before {command}`snapraid sync`.";
type = bool; type = bool;
}; };
sync.interval = mkOption { sync.interval = mkOption {
default = "01:00"; default = "01:00";
example = "daily"; example = "daily";
description = "How often to run <command>snapraid sync</command>."; description = lib.mdDoc "How often to run {command}`snapraid sync`.";
type = str; type = str;
}; };
scrub = { scrub = {
interval = mkOption { interval = mkOption {
default = "Mon *-*-* 02:00:00"; default = "Mon *-*-* 02:00:00";
example = "weekly"; example = "weekly";
description = "How often to run <command>snapraid scrub</command>."; description = lib.mdDoc "How often to run {command}`snapraid scrub`.";
type = str; type = str;
}; };
plan = mkOption { plan = mkOption {
default = 8; default = 8;
example = 5; example = 5;
description = description = lib.mdDoc
"Percent of the array that should be checked by <command>snapraid scrub</command>."; "Percent of the array that should be checked by {command}`snapraid scrub`.";
type = int; type = int;
}; };
olderThan = mkOption { olderThan = mkOption {
default = 10; default = 10;
example = 20; example = 20;
description = description = lib.mdDoc
"Number of days since data was last scrubbed before it can be scrubbed again."; "Number of days since data was last scrubbed before it can be scrubbed again.";
type = int; type = int;
}; };
@ -90,7 +90,7 @@ in
autosave 500 autosave 500
pool /pool pool /pool
''; '';
description = "Extra config options for SnapRAID."; description = lib.mdDoc "Extra config options for SnapRAID.";
type = lines; type = lines;
}; };
}; };

View file

@ -10,7 +10,7 @@ in {
}; };
mdadmConf = lib.mkOption { mdadmConf = lib.mkOption {
description = "Contents of <filename>/etc/mdadm.conf</filename> in initrd."; description = lib.mdDoc "Contents of {file}`/etc/mdadm.conf` in initrd.";
type = lib.types.lines; type = lib.types.lines;
default = ""; default = "";
}; };

View file

@ -10,7 +10,7 @@ let
address = mkOption { address = mkOption {
default = addr; default = addr;
type = types.str; type = types.str;
description = '' description = lib.mdDoc ''
IPv${toString v} ${name} address. IPv${toString v} ${name} address.
''; '';
}; };
@ -18,9 +18,9 @@ let
prefixLength = mkOption { prefixLength = mkOption {
default = pref; default = pref;
type = types.addCheck types.int (n: n >= 0 && n <= (if v == 4 then 32 else 128)); type = types.addCheck types.int (n: n >= 0 && n <= (if v == 4 then 32 else 128));
description = '' description = lib.mdDoc ''
Subnet mask of the ${name} address, specified as the number of Subnet mask of the ${name} address, specified as the number of
bits in the prefix (<literal>${if v == 4 then "24" else "64"}</literal>). bits in the prefix (`${if v == 4 then "24" else "64"}`).
''; '';
}; };
}; };
@ -37,7 +37,7 @@ in
default = pkgs.anbox.image; default = pkgs.anbox.image;
defaultText = literalExpression "pkgs.anbox.image"; defaultText = literalExpression "pkgs.anbox.image";
type = types.package; type = types.package;
description = '' description = lib.mdDoc ''
Base android image for Anbox. Base android image for Anbox.
''; '';
}; };
@ -45,7 +45,7 @@ in
extraInit = mkOption { extraInit = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
description = '' description = lib.mdDoc ''
Extra shell commands to be run inside the container image during init. Extra shell commands to be run inside the container image during init.
''; '';
}; };
@ -57,7 +57,7 @@ in
dns = mkOption { dns = mkOption {
default = "1.1.1.1"; default = "1.1.1.1";
type = types.str; type = types.str;
description = '' description = lib.mdDoc ''
Container DNS server. Container DNS server.
''; '';
}; };

View file

@ -25,8 +25,8 @@ in
options = { options = {
virtualisation.vmVariant = mkOption { virtualisation.vmVariant = mkOption {
description = '' description = lib.mdDoc ''
Machine configuration to be added for the vm script produced by <literal>nixos-rebuild build-vm</literal>. Machine configuration to be added for the vm script produced by `nixos-rebuild build-vm`.
''; '';
inherit (vmVariant) type; inherit (vmVariant) type;
default = {}; default = {};
@ -34,8 +34,8 @@ in
}; };
virtualisation.vmVariantWithBootLoader = mkOption { virtualisation.vmVariantWithBootLoader = mkOption {
description = '' description = lib.mdDoc ''
Machine configuration to be added for the vm script produced by <literal>nixos-rebuild build-vm-with-bootloader</literal>. Machine configuration to be added for the vm script produced by `nixos-rebuild build-vm-with-bootloader`.
''; '';
inherit (vmVariantWithBootLoader) type; inherit (vmVariantWithBootLoader) type;
default = {}; default = {};

View file

@ -31,7 +31,7 @@ in
mkOption { mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
This option enables the common /etc/containers configuration module. This option enables the common /etc/containers configuration module.
''; '';
}; };
@ -39,13 +39,13 @@ in
ociSeccompBpfHook.enable = mkOption { ociSeccompBpfHook.enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = "Enable the OCI seccomp BPF hook"; description = lib.mdDoc "Enable the OCI seccomp BPF hook";
}; };
containersConf.settings = mkOption { containersConf.settings = mkOption {
type = toml.type; type = toml.type;
default = { }; default = { };
description = "containers.conf configuration"; description = lib.mdDoc "containers.conf configuration";
}; };
containersConf.cniPlugins = mkOption { containersConf.cniPlugins = mkOption {
@ -60,7 +60,7 @@ in
pkgs.cniPlugins.dnsname pkgs.cniPlugins.dnsname
] ]
''; '';
description = '' description = lib.mdDoc ''
CNI plugins to install on the system. CNI plugins to install on the system.
''; '';
}; };
@ -74,14 +74,14 @@ in
runroot = "/run/containers/storage"; runroot = "/run/containers/storage";
}; };
}; };
description = "storage.conf configuration"; description = lib.mdDoc "storage.conf configuration";
}; };
registries = { registries = {
search = mkOption { search = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = [ "docker.io" "quay.io" ]; default = [ "docker.io" "quay.io" ];
description = '' description = lib.mdDoc ''
List of repositories to search. List of repositories to search.
''; '';
}; };
@ -89,7 +89,7 @@ in
insecure = mkOption { insecure = mkOption {
default = []; default = [];
type = types.listOf types.str; type = types.listOf types.str;
description = '' description = lib.mdDoc ''
List of insecure repositories. List of insecure repositories.
''; '';
}; };
@ -97,7 +97,7 @@ in
block = mkOption { block = mkOption {
default = []; default = [];
type = types.listOf types.str; type = types.listOf types.str;
description = '' description = lib.mdDoc ''
List of blocked repositories. List of blocked repositories.
''; '';
}; };
@ -116,10 +116,10 @@ in
}; };
} }
''; '';
description = '' description = lib.mdDoc ''
Signature verification policy file. Signature verification policy file.
If this option is empty the default policy file from If this option is empty the default policy file from
<literal>skopeo</literal> will be used. `skopeo` will be used.
''; '';
}; };

View file

@ -13,7 +13,7 @@ in
type = with types; either (enum [ "auto" ]) int; type = with types; either (enum [ "auto" ]) int;
default = "auto"; default = "auto";
example = 4096; example = 4096;
description = '' description = lib.mdDoc ''
Size of disk image. Unit is MB. Size of disk image. Unit is MB.
''; '';
}; };
@ -21,12 +21,12 @@ in
virtualisation.digitalOceanImage.configFile = mkOption { virtualisation.digitalOceanImage.configFile = mkOption {
type = with types; nullOr path; type = with types; nullOr path;
default = null; default = null;
description = '' description = lib.mdDoc ''
A path to a configuration file which will be placed at A path to a configuration file which will be placed at
<literal>/etc/nixos/configuration.nix</literal> and be used when switching `/etc/nixos/configuration.nix` and be used when switching
to a new configuration. If set to <literal>null</literal>, a default to a new configuration. If set to `null`, a default
configuration is used that imports configuration is used that imports
<literal>(modulesPath + "/virtualisation/digital-ocean-config.nix")</literal>. `(modulesPath + "/virtualisation/digital-ocean-config.nix")`.
''; '';
}; };
@ -34,7 +34,7 @@ in
type = types.enum [ "gzip" "bzip2" ]; type = types.enum [ "gzip" "bzip2" ];
default = "gzip"; default = "gzip";
example = "bzip2"; example = "bzip2";
description = '' description = lib.mdDoc ''
Disk image compression method. Choose bzip2 to generate smaller images that Disk image compression method. Choose bzip2 to generate smaller images that
take longer to generate but will consume less metered storage space on your take longer to generate but will consume less metered storage space on your
Digital Ocean account. Digital Ocean account.

View file

@ -15,18 +15,18 @@ in {
type = types.bool; type = types.bool;
default = true; default = true;
example = true; example = true;
description = "Whether to reconfigure the system from Digital Ocean user data"; description = lib.mdDoc "Whether to reconfigure the system from Digital Ocean user data";
}; };
options.virtualisation.digitalOcean.defaultConfigFile = mkOption { options.virtualisation.digitalOcean.defaultConfigFile = mkOption {
type = types.path; type = types.path;
default = defaultConfigFile; default = defaultConfigFile;
defaultText = literalDocBook '' defaultText = literalDocBook ''
The default configuration imports user-data if applicable and The default configuration imports user-data if applicable and
<literal>(modulesPath + "/virtualisation/digital-ocean-config.nix")</literal>. `(modulesPath + "/virtualisation/digital-ocean-config.nix")`.
''; '';
description = '' description = lib.mdDoc ''
A path to a configuration file which will be placed at A path to a configuration file which will be placed at
<literal>/etc/nixos/configuration.nix</literal> and be used when switching to `/etc/nixos/configuration.nix` and be used when switching to
a new configuration. a new configuration.
''; '';
}; };

View file

@ -18,18 +18,18 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
This option enables docker in a rootless mode, a daemon that manages This option enables docker in a rootless mode, a daemon that manages
linux containers. To interact with the daemon, one needs to set linux containers. To interact with the daemon, one needs to set
<command>DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock</command>. {command}`DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock`.
''; '';
}; };
setSocketVariable = mkOption { setSocketVariable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Point <command>DOCKER_HOST</command> to rootless Docker instance for Point {command}`DOCKER_HOST` to rootless Docker instance for
normal users by default. normal users by default.
''; '';
}; };
@ -41,7 +41,7 @@ in
ipv6 = true; ipv6 = true;
"fixed-cidr-v6" = "fd00::/80"; "fixed-cidr-v6" = "fd00::/80";
}; };
description = '' description = lib.mdDoc ''
Configuration for docker daemon. The attributes are serialized to JSON used as daemon.conf. Configuration for docker daemon. The attributes are serialized to JSON used as daemon.conf.
See https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file See https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
''; '';
@ -51,7 +51,7 @@ in
default = pkgs.docker; default = pkgs.docker;
defaultText = literalExpression "pkgs.docker"; defaultText = literalExpression "pkgs.docker";
type = types.package; type = types.package;
description = '' description = lib.mdDoc ''
Docker package to be used in the module. Docker package to be used in the module.
''; '';
}; };

View file

@ -13,7 +13,7 @@ in {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Whether to enable Open vSwitch. A configuration daemon (ovs-server) Whether to enable Open vSwitch. A configuration daemon (ovs-server)
will be started. will be started.
''; '';
@ -22,9 +22,9 @@ in {
resetOnStart = mkOption { resetOnStart = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
Whether to reset the Open vSwitch configuration database to a default Whether to reset the Open vSwitch configuration database to a default
configuration on every start of the systemd <literal>ovsdb.service</literal>. configuration on every start of the systemd `ovsdb.service`.
''; '';
}; };
@ -32,7 +32,7 @@ in {
type = types.package; type = types.package;
default = pkgs.openvswitch; default = pkgs.openvswitch;
defaultText = literalExpression "pkgs.openvswitch"; defaultText = literalExpression "pkgs.openvswitch";
description = '' description = lib.mdDoc ''
Open vSwitch package to use. Open vSwitch package to use.
''; '';
}; };

View file

@ -14,42 +14,42 @@ in {
type = with types; either (enum [ "auto" ]) int; type = with types; either (enum [ "auto" ]) int;
default = "auto"; default = "auto";
example = 50 * 1024; example = 50 * 1024;
description = '' description = lib.mdDoc ''
The size of the VirtualBox base image in MiB. The size of the VirtualBox base image in MiB.
''; '';
}; };
baseImageFreeSpace = mkOption { baseImageFreeSpace = mkOption {
type = with types; int; type = with types; int;
default = 30 * 1024; default = 30 * 1024;
description = '' description = lib.mdDoc ''
Free space in the VirtualBox base image in MiB. Free space in the VirtualBox base image in MiB.
''; '';
}; };
memorySize = mkOption { memorySize = mkOption {
type = types.int; type = types.int;
default = 1536; default = 1536;
description = '' description = lib.mdDoc ''
The amount of RAM the VirtualBox appliance can use in MiB. The amount of RAM the VirtualBox appliance can use in MiB.
''; '';
}; };
vmDerivationName = mkOption { vmDerivationName = mkOption {
type = types.str; type = types.str;
default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}"; default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
description = '' description = lib.mdDoc ''
The name of the derivation for the VirtualBox appliance. The name of the derivation for the VirtualBox appliance.
''; '';
}; };
vmName = mkOption { vmName = mkOption {
type = types.str; type = types.str;
default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.hostPlatform.system})"; default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.hostPlatform.system})";
description = '' description = lib.mdDoc ''
The name of the VirtualBox appliance. The name of the VirtualBox appliance.
''; '';
}; };
vmFileName = mkOption { vmFileName = mkOption {
type = types.str; type = types.str;
default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.ova"; default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.ova";
description = '' description = lib.mdDoc ''
The file name of the VirtualBox appliance. The file name of the VirtualBox appliance.
''; '';
}; };
@ -60,10 +60,10 @@ in {
rtcuseutc = "on"; rtcuseutc = "on";
usb = "off"; usb = "off";
}; };
description = '' description = lib.mdDoc ''
Parameters passed to the Virtualbox appliance. Parameters passed to the Virtualbox appliance.
Run <literal>VBoxManage modifyvm --help</literal> to see more options. Run `VBoxManage modifyvm --help` to see more options.
''; '';
}; };
exportParams = mkOption { exportParams = mkOption {
@ -72,14 +72,14 @@ in {
"--vsys" "0" "--vendor" "ACME Inc." "--vsys" "0" "--vendor" "ACME Inc."
]; ];
default = []; default = [];
description = '' description = lib.mdDoc ''
Parameters passed to the Virtualbox export command. Parameters passed to the Virtualbox export command.
Run <literal>VBoxManage export --help</literal> to see more options. Run `VBoxManage export --help` to see more options.
''; '';
}; };
extraDisk = mkOption { extraDisk = mkOption {
description = '' description = lib.mdDoc ''
Optional extra disk/hdd configuration. Optional extra disk/hdd configuration.
The disk will be an 'ext4' partition on a separate VMDK file. The disk will be an 'ext4' partition on a separate VMDK file.
''; '';
@ -93,16 +93,16 @@ in {
options = { options = {
size = mkOption { size = mkOption {
type = types.int; type = types.int;
description = "Size in MiB"; description = lib.mdDoc "Size in MiB";
}; };
label = mkOption { label = mkOption {
type = types.str; type = types.str;
default = "vm-extra-storage"; default = "vm-extra-storage";
description = "Label for the disk partition"; description = lib.mdDoc "Label for the disk partition";
}; };
mountPoint = mkOption { mountPoint = mkOption {
type = types.str; type = types.str;
description = "Path where to mount this disk."; description = lib.mdDoc "Path where to mount this disk.";
}; };
}; };
}); });

View file

@ -37,7 +37,7 @@ in
type = types.package; type = types.package;
defaultText = literalExpression "pkgs.xen"; defaultText = literalExpression "pkgs.xen";
example = literalExpression "pkgs.xen-light"; example = literalExpression "pkgs.xen-light";
description = '' description = lib.mdDoc ''
The package used for Xen binary. The package used for Xen binary.
''; '';
relatedPackages = [ "xen" "xen-light" ]; relatedPackages = [ "xen" "xen-light" ];
@ -47,7 +47,7 @@ in
type = types.package; type = types.package;
defaultText = literalExpression "pkgs.xen"; defaultText = literalExpression "pkgs.xen";
example = literalExpression "pkgs.qemu_xen-light"; example = literalExpression "pkgs.qemu_xen-light";
description = '' description = lib.mdDoc ''
The package with qemu binaries for dom0 qemu and xendomains. The package with qemu binaries for dom0 qemu and xendomains.
''; '';
relatedPackages = [ "xen" relatedPackages = [ "xen"
@ -59,7 +59,7 @@ in
mkOption { mkOption {
default = []; default = [];
type = types.listOf types.str; type = types.listOf types.str;
description = description = lib.mdDoc
'' ''
Parameters passed to the Xen hypervisor at boot time. Parameters passed to the Xen hypervisor at boot time.
''; '';
@ -70,7 +70,7 @@ in
default = 0; default = 0;
example = 512; example = 512;
type = types.addCheck types.int (n: n >= 0); type = types.addCheck types.int (n: n >= 0);
description = description = lib.mdDoc
'' ''
Amount of memory (in MiB) allocated to Domain 0 on boot. Amount of memory (in MiB) allocated to Domain 0 on boot.
If set to 0, all memory is assigned to Domain 0. If set to 0, all memory is assigned to Domain 0.
@ -81,7 +81,7 @@ in
name = mkOption { name = mkOption {
default = "xenbr0"; default = "xenbr0";
type = types.str; type = types.str;
description = '' description = lib.mdDoc ''
Name of bridge the Xen domUs connect to. Name of bridge the Xen domUs connect to.
''; '';
}; };
@ -89,7 +89,7 @@ in
address = mkOption { address = mkOption {
type = types.str; type = types.str;
default = "172.16.0.1"; default = "172.16.0.1";
description = '' description = lib.mdDoc ''
IPv4 address of the bridge. IPv4 address of the bridge.
''; '';
}; };
@ -97,9 +97,9 @@ in
prefixLength = mkOption { prefixLength = mkOption {
type = types.addCheck types.int (n: n >= 0 && n <= 32); type = types.addCheck types.int (n: n >= 0 && n <= 32);
default = 16; default = 16;
description = '' description = lib.mdDoc ''
Subnet mask of the bridge interface, specified as the number of Subnet mask of the bridge interface, specified as the number of
bits in the prefix (<literal>24</literal>). bits in the prefix (`24`).
A DHCP server will provide IP addresses for the whole, remaining A DHCP server will provide IP addresses for the whole, remaining
subnet. subnet.
''; '';
@ -108,8 +108,8 @@ in
forwardDns = mkOption { forwardDns = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
If set to <literal>true</literal>, the DNS queries from the If set to `true`, the DNS queries from the
hosts connected to the bridge will be forwarded to the DNS hosts connected to the bridge will be forwarded to the DNS
servers specified in /etc/resolv.conf . servers specified in /etc/resolv.conf .
''; '';
@ -120,7 +120,7 @@ in
virtualisation.xen.stored = virtualisation.xen.stored =
mkOption { mkOption {
type = types.path; type = types.path;
description = description = lib.mdDoc
'' ''
Xen Store daemon to use. Defaults to oxenstored of the xen package. Xen Store daemon to use. Defaults to oxenstored of the xen package.
''; '';
@ -130,7 +130,7 @@ in
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
description = description = lib.mdDoc
'' ''
Options defined here will override the defaults for xendomains. Options defined here will override the defaults for xendomains.
The default options can be seen in the file included from The default options can be seen in the file included from