nixos/programs: invariant option docs MD conversions

pennae da37ca67 4f918385

+10 -10
nixos/modules/programs/atop.nix
···
type = types.package;
default = pkgs.atop;
defaultText = literalExpression "pkgs.atop";
-
description = ''
Which package to use for Atop.
'';
};
···
enable = mkOption {
type = types.bool;
default = false;
-
description = ''
Whether to install and enable the netatop kernel module.
Note: this sets the kernel taint flag "O" for loading out-of-tree modules.
'';
···
type = types.package;
default = config.boot.kernelPackages.netatop;
defaultText = literalExpression "config.boot.kernelPackages.netatop";
-
description = ''
Which package to use for netatop.
'';
};
···
atopgpu.enable = mkOption {
type = types.bool;
default = false;
-
description = ''
Whether to install and enable the atopgpud daemon to get information about
NVIDIA gpus.
'';
···
setuidWrapper.enable = mkOption {
type = types.bool;
default = false;
-
description = ''
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).
Atop tries to drop the root privileges shortly after starting.
···
atopService.enable = mkOption {
type = types.bool;
default = true;
-
description = ''
Whether to enable the atop service responsible for storing statistics for
long-term analysis.
'';
···
atopRotateTimer.enable = mkOption {
type = types.bool;
default = true;
-
description = ''
Whether to enable the atop-rotate timer, which restarts the atop service
daily to make sure the data files are rotate.
'';
···
atopacctService.enable = mkOption {
type = types.bool;
default = true;
-
description = ''
Whether to enable the atopacct service which manages process accounting.
This allows Atop to gather data about processes that disappeared in between
two refresh intervals.
···
flags = "a1f";
interval = 5;
};
-
description = ''
-
Parameters to be written to <filename>/etc/atoprc</filename>.
'';
};
};
···
type = types.package;
default = pkgs.atop;
defaultText = literalExpression "pkgs.atop";
+
description = lib.mdDoc ''
Which package to use for Atop.
'';
};
···
enable = mkOption {
type = types.bool;
default = false;
+
description = lib.mdDoc ''
Whether to install and enable the netatop kernel module.
Note: this sets the kernel taint flag "O" for loading out-of-tree modules.
'';
···
type = types.package;
default = config.boot.kernelPackages.netatop;
defaultText = literalExpression "config.boot.kernelPackages.netatop";
+
description = lib.mdDoc ''
Which package to use for netatop.
'';
};
···
atopgpu.enable = mkOption {
type = types.bool;
default = false;
+
description = lib.mdDoc ''
Whether to install and enable the atopgpud daemon to get information about
NVIDIA gpus.
'';
···
setuidWrapper.enable = mkOption {
type = types.bool;
default = false;
+
description = lib.mdDoc ''
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).
Atop tries to drop the root privileges shortly after starting.
···
atopService.enable = mkOption {
type = types.bool;
default = true;
+
description = lib.mdDoc ''
Whether to enable the atop service responsible for storing statistics for
long-term analysis.
'';
···
atopRotateTimer.enable = mkOption {
type = types.bool;
default = true;
+
description = lib.mdDoc ''
Whether to enable the atop-rotate timer, which restarts the atop service
daily to make sure the data files are rotate.
'';
···
atopacctService.enable = mkOption {
type = types.bool;
default = true;
+
description = lib.mdDoc ''
Whether to enable the atopacct service which manages process accounting.
This allows Atop to gather data about processes that disappeared in between
two refresh intervals.
···
flags = "a1f";
interval = 5;
};
+
description = lib.mdDoc ''
+
Parameters to be written to {file}`/etc/atoprc`.
'';
};
};
+10 -10
nixos/modules/programs/bash/bash.nix
···
/*
enable = mkOption {
default = true;
-
description = ''
Whenever to configure Bash as an interactive shell.
Note that this tries to make Bash the default
-
<option>users.defaultUserShell</option>,
which in turn means that you might need to explicitly
set this variable if you have another shell configured
with NixOS.
···
shellAliases = mkOption {
default = {};
-
description = ''
-
Set of aliases for bash shell, which overrides <option>environment.shellAliases</option>.
-
See <option>environment.shellAliases</option> for an option format description.
'';
type = with types; attrsOf (nullOr (either str path));
};
shellInit = mkOption {
default = "";
-
description = ''
Shell script code called during bash shell initialisation.
'';
type = types.lines;
···
loginShellInit = mkOption {
default = "";
-
description = ''
Shell script code called during login bash shell initialisation.
'';
type = types.lines;
···
interactiveShellInit = mkOption {
default = "";
-
description = ''
Shell script code called during interactive bash shell initialisation.
'';
type = types.lines;
···
fi
fi
'';
-
description = ''
Shell script code used to initialise the bash prompt.
'';
type = types.lines;
···
promptPluginInit = mkOption {
default = "";
-
description = ''
Shell script code used to initialise bash prompt plugins.
'';
type = types.lines;
···
/*
enable = mkOption {
default = true;
+
description = lib.mdDoc ''
Whenever to configure Bash as an interactive shell.
Note that this tries to make Bash the default
+
{option}`users.defaultUserShell`,
which in turn means that you might need to explicitly
set this variable if you have another shell configured
with NixOS.
···
shellAliases = mkOption {
default = {};
+
description = lib.mdDoc ''
+
Set of aliases for bash shell, which overrides {option}`environment.shellAliases`.
+
See {option}`environment.shellAliases` for an option format description.
'';
type = with types; attrsOf (nullOr (either str path));
};
shellInit = mkOption {
default = "";
+
description = lib.mdDoc ''
Shell script code called during bash shell initialisation.
'';
type = types.lines;
···
loginShellInit = mkOption {
default = "";
+
description = lib.mdDoc ''
Shell script code called during login bash shell initialisation.
'';
type = types.lines;
···
interactiveShellInit = mkOption {
default = "";
+
description = lib.mdDoc ''
Shell script code called during interactive bash shell initialisation.
'';
type = types.lines;
···
fi
fi
'';
+
description = lib.mdDoc ''
Shell script code used to initialise the bash prompt.
'';
type = types.lines;
···
promptPluginInit = mkOption {
default = "";
+
description = lib.mdDoc ''
Shell script code used to initialise bash prompt plugins.
'';
type = types.lines;
+2 -2
nixos/modules/programs/dconf.nix
···
profiles = mkOption {
type = types.attrsOf types.path;
default = {};
-
description = "Set of dconf profile files, installed at <filename>/etc/dconf/profiles/<replaceable>name</replaceable></filename>.";
internal = true;
};
packages = mkOption {
type = types.listOf types.package;
default = [];
-
description = "A list of packages which provide dconf profiles and databases in <filename>/etc/dconf</filename>.";
};
};
};
···
profiles = mkOption {
type = types.attrsOf types.path;
default = {};
+
description = lib.mdDoc "Set of dconf profile files, installed at {file}`/etc/dconf/profiles/«name»`.";
internal = true;
};
packages = mkOption {
type = types.listOf types.package;
default = [];
+
description = lib.mdDoc "A list of packages which provide dconf profiles and databases in {file}`/etc/dconf`.";
};
};
};
+15 -15
nixos/modules/programs/fish.nix
···
enable = mkOption {
default = false;
-
description = ''
Whether to configure fish as an interactive shell.
'';
type = types.bool;
···
useBabelfish = mkOption {
type = types.bool;
default = false;
-
description = ''
-
If enabled, the configured environment will be translated to native fish using <link xlink:href="https://github.com/bouk/babelfish">babelfish</link>.
-
Otherwise, <link xlink:href="https://github.com/oh-my-fish/plugin-foreign-env">foreign-env</link> will be used.
'';
};
vendor.config.enable = mkOption {
type = types.bool;
default = true;
-
description = ''
Whether fish should source configuration snippets provided by other packages.
'';
};
···
vendor.completions.enable = mkOption {
type = types.bool;
default = true;
-
description = ''
Whether fish should use completion files provided by other packages.
'';
};
···
vendor.functions.enable = mkOption {
type = types.bool;
default = true;
-
description = ''
Whether fish should autoload fish functions provided by other packages.
'';
};
···
gco = "git checkout";
npu = "nix-prefetch-url";
};
-
description = ''
Set of fish abbreviations.
'';
type = with types; attrsOf str;
···
shellAliases = mkOption {
default = {};
-
description = ''
-
Set of aliases for fish shell, which overrides <option>environment.shellAliases</option>.
-
See <option>environment.shellAliases</option> for an option format description.
'';
type = with types; attrsOf (nullOr (either str path));
};
shellInit = mkOption {
default = "";
-
description = ''
Shell script code called during fish shell initialisation.
'';
type = types.lines;
···
loginShellInit = mkOption {
default = "";
-
description = ''
Shell script code called during fish login shell initialisation.
'';
type = types.lines;
···
interactiveShellInit = mkOption {
default = "";
-
description = ''
Shell script code called during interactive fish shell initialisation.
'';
type = types.lines;
···
promptInit = mkOption {
default = "";
-
description = ''
Shell script code used to initialise fish prompt.
'';
type = types.lines;
···
enable = mkOption {
default = false;
+
description = lib.mdDoc ''
Whether to configure fish as an interactive shell.
'';
type = types.bool;
···
useBabelfish = mkOption {
type = types.bool;
default = false;
+
description = lib.mdDoc ''
+
If enabled, the configured environment will be translated to native fish using [babelfish](https://github.com/bouk/babelfish).
+
Otherwise, [foreign-env](https://github.com/oh-my-fish/plugin-foreign-env) will be used.
'';
};
vendor.config.enable = mkOption {
type = types.bool;
default = true;
+
description = lib.mdDoc ''
Whether fish should source configuration snippets provided by other packages.
'';
};
···
vendor.completions.enable = mkOption {
type = types.bool;
default = true;
+
description = lib.mdDoc ''
Whether fish should use completion files provided by other packages.
'';
};
···
vendor.functions.enable = mkOption {
type = types.bool;
default = true;
+
description = lib.mdDoc ''
Whether fish should autoload fish functions provided by other packages.
'';
};
···
gco = "git checkout";
npu = "nix-prefetch-url";
};
+
description = lib.mdDoc ''
Set of fish abbreviations.
'';
type = with types; attrsOf str;
···
shellAliases = mkOption {
default = {};
+
description = lib.mdDoc ''
+
Set of aliases for fish shell, which overrides {option}`environment.shellAliases`.
+
See {option}`environment.shellAliases` for an option format description.
'';
type = with types; attrsOf (nullOr (either str path));
};
shellInit = mkOption {
default = "";
+
description = lib.mdDoc ''
Shell script code called during fish shell initialisation.
'';
type = types.lines;
···
loginShellInit = mkOption {
default = "";
+
description = lib.mdDoc ''
Shell script code called during fish login shell initialisation.
'';
type = types.lines;
···
interactiveShellInit = mkOption {
default = "";
+
description = lib.mdDoc ''
Shell script code called during interactive fish shell initialisation.
'';
type = types.lines;
···
promptInit = mkOption {
default = "";
+
description = lib.mdDoc ''
Shell script code used to initialise fish prompt.
'';
type = types.lines;
+10 -10
nixos/modules/programs/less.nix
···
type = types.nullOr types.path;
default = null;
example = literalExpression ''"''${pkgs.my-configs}/lesskey"'';
-
description = ''
Path to lesskey configuration file.
-
<option>configFile</option> takes precedence over <option>commands</option>,
-
<option>clearDefaultCommands</option>, <option>lineEditingKeys</option>, and
-
<option>envVariables</option>.
'';
};
···
h = "noaction 5\\e(";
l = "noaction 5\\e)";
};
-
description = "Defines new command keys.";
};
clearDefaultCommands = mkOption {
type = types.bool;
default = false;
-
description = ''
Clear all default commands.
You should remember to set the quit key.
Otherwise you will not be able to leave less without killing it.
···
example = {
e = "abort";
};
-
description = "Defines new line-editing keys.";
};
envVariables = mkOption {
···
example = {
LESS = "--quit-if-one-screen";
};
-
description = "Defines environment variables.";
};
lessopen = mkOption {
type = types.nullOr types.str;
default = "|${pkgs.lesspipe}/bin/lesspipe.sh %s";
defaultText = literalExpression ''"|''${pkgs.lesspipe}/bin/lesspipe.sh %s"'';
-
description = ''
Before less opens a file, it first gives your input preprocessor a chance to modify the way the contents of the file are displayed.
'';
};
···
lessclose = mkOption {
type = types.nullOr types.str;
default = null;
-
description = ''
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).
'';
};
···
type = types.nullOr types.path;
default = null;
example = literalExpression ''"''${pkgs.my-configs}/lesskey"'';
+
description = lib.mdDoc ''
Path to lesskey configuration file.
+
{option}`configFile` takes precedence over {option}`commands`,
+
{option}`clearDefaultCommands`, {option}`lineEditingKeys`, and
+
{option}`envVariables`.
'';
};
···
h = "noaction 5\\e(";
l = "noaction 5\\e)";
};
+
description = lib.mdDoc "Defines new command keys.";
};
clearDefaultCommands = mkOption {
type = types.bool;
default = false;
+
description = lib.mdDoc ''
Clear all default commands.
You should remember to set the quit key.
Otherwise you will not be able to leave less without killing it.
···
example = {
e = "abort";
};
+
description = lib.mdDoc "Defines new line-editing keys.";
};
envVariables = mkOption {
···
example = {
LESS = "--quit-if-one-screen";
};
+
description = lib.mdDoc "Defines environment variables.";
};
lessopen = mkOption {
type = types.nullOr types.str;
default = "|${pkgs.lesspipe}/bin/lesspipe.sh %s";
defaultText = literalExpression ''"|''${pkgs.lesspipe}/bin/lesspipe.sh %s"'';
+
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.
'';
};
···
lessclose = mkOption {
type = types.nullOr types.str;
default = null;
+
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).
'';
};
+3 -3
nixos/modules/programs/nano.nix
···
nanorc = lib.mkOption {
type = lib.types.lines;
default = "";
-
description = ''
The system-wide nano configuration.
-
See <citerefentry><refentrytitle>nanorc</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
'';
example = ''
set nowrap
···
syntaxHighlight = lib.mkOption {
type = lib.types.bool;
default = true;
-
description = "Whether to enable syntax highlight for various languages.";
};
};
};
···
nanorc = lib.mkOption {
type = lib.types.lines;
default = "";
+
description = lib.mdDoc ''
The system-wide nano configuration.
+
See {manpage}`nanorc(5)`.
'';
example = ''
set nowrap
···
syntaxHighlight = lib.mkOption {
type = lib.types.bool;
default = true;
+
description = lib.mdDoc "Whether to enable syntax highlight for various languages.";
};
};
};
+17 -17
nixos/modules/programs/proxychains.nix
···
type = mkOption {
type = types.enum [ "http" "socks4" "socks5" ];
-
description = "Proxy type.";
};
host = mkOption {
type = types.str;
-
description = "Proxy host or IP address.";
};
port = mkOption {
type = types.port;
-
description = "Proxy port";
};
};
};
···
type = mkOption {
type = types.enum [ "dynamic" "strict" "random" ];
default = "strict";
-
description = ''
-
<literal>dynamic</literal> - Each connection will be done via chained proxies
all proxies chained in the order as they appear in the list
at least one proxy must be online to play in chain
(dead proxies are skipped)
-
otherwise <literal>EINTR</literal> is returned to the app.
-
<literal>strict</literal> - Each connection will be done via chained proxies
all proxies chained in the order as they appear in the list
all proxies must be online to play in chain
-
otherwise <literal>EINTR</literal> is returned to the app.
-
<literal>random</literal> - Each connection will be done via random proxy
-
(or proxy chain, see <option>programs.proxychains.chain.length</option>) from the list.
'';
};
length = mkOption {
type = types.nullOr types.int;
default = null;
-
description = ''
Chain length for random chain.
'';
};
···
proxyDNS = mkOption {
type = types.bool;
default = true;
-
description = "Proxy DNS requests - no leak for DNS data.";
};
quietMode = mkEnableOption "Quiet mode (no output from the library).";
···
remoteDNSSubnet = mkOption {
type = types.enum [ 10 127 224 ];
default = 224;
-
description = ''
Set the class A subnet number to use for the internal remote DNS mapping, uses the reserved 224.x.x.x range by default.
'';
};
···
tcpReadTimeOut = mkOption {
type = types.int;
default = 15000;
-
description = "Connection read time-out in milliseconds.";
};
tcpConnectTimeOut = mkOption {
type = types.int;
default = 8000;
-
description = "Connection time-out in milliseconds.";
};
localnet = mkOption {
type = types.str;
default = "127.0.0.0/255.0.0.0";
-
description = "By default enable localnet for loopback address ranges.";
};
proxies = mkOption {
type = types.attrsOf (types.submodule proxyOptions);
-
description = ''
Proxies to be used by proxychains.
'';
···
type = mkOption {
type = types.enum [ "http" "socks4" "socks5" ];
+
description = lib.mdDoc "Proxy type.";
};
host = mkOption {
type = types.str;
+
description = lib.mdDoc "Proxy host or IP address.";
};
port = mkOption {
type = types.port;
+
description = lib.mdDoc "Proxy port";
};
};
};
···
type = mkOption {
type = types.enum [ "dynamic" "strict" "random" ];
default = "strict";
+
description = lib.mdDoc ''
+
`dynamic` - Each connection will be done via chained proxies
all proxies chained in the order as they appear in the list
at least one proxy must be online to play in chain
(dead proxies are skipped)
+
otherwise `EINTR` is returned to the app.
+
`strict` - Each connection will be done via chained proxies
all proxies chained in the order as they appear in the list
all proxies must be online to play in chain
+
otherwise `EINTR` is returned to the app.
+
`random` - Each connection will be done via random proxy
+
(or proxy chain, see {option}`programs.proxychains.chain.length`) from the list.
'';
};
length = mkOption {
type = types.nullOr types.int;
default = null;
+
description = lib.mdDoc ''
Chain length for random chain.
'';
};
···
proxyDNS = mkOption {
type = types.bool;
default = true;
+
description = lib.mdDoc "Proxy DNS requests - no leak for DNS data.";
};
quietMode = mkEnableOption "Quiet mode (no output from the library).";
···
remoteDNSSubnet = mkOption {
type = types.enum [ 10 127 224 ];
default = 224;
+
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.
'';
};
···
tcpReadTimeOut = mkOption {
type = types.int;
default = 15000;
+
description = lib.mdDoc "Connection read time-out in milliseconds.";
};
tcpConnectTimeOut = mkOption {
type = types.int;
default = 8000;
+
description = lib.mdDoc "Connection time-out in milliseconds.";
};
localnet = mkOption {
type = types.str;
default = "127.0.0.0/255.0.0.0";
+
description = lib.mdDoc "By default enable localnet for loopback address ranges.";
};
proxies = mkOption {
type = types.attrsOf (types.submodule proxyOptions);
+
description = lib.mdDoc ''
Proxies to be used by proxychains.
'';
+5 -5
nixos/modules/programs/spacefm.nix
···
enable = mkOption {
type = types.bool;
default = false;
-
description = ''
-
Whether to install SpaceFM and create <filename>/etc/spacefm/spacefm.conf</filename>.
'';
};
···
terminal_su = "''${pkgs.sudo}/bin/sudo";
}
'';
-
description = ''
The system-wide spacefm configuration.
-
Parameters to be written to <filename>/etc/spacefm/spacefm.conf</filename>.
-
Refer to the <link xlink:href="https://ignorantguru.github.io/spacefm/spacefm-manual-en.html#programfiles-etc">relevant entry</link> in the SpaceFM manual.
'';
};
···
enable = mkOption {
type = types.bool;
default = false;
+
description = lib.mdDoc ''
+
Whether to install SpaceFM and create {file}`/etc/spacefm/spacefm.conf`.
'';
};
···
terminal_su = "''${pkgs.sudo}/bin/sudo";
}
'';
+
description = lib.mdDoc ''
The system-wide spacefm configuration.
+
Parameters to be written to {file}`/etc/spacefm/spacefm.conf`.
+
Refer to the [relevant entry](https://ignorantguru.github.io/spacefm/spacefm-manual-en.html#programfiles-etc) in the SpaceFM manual.
'';
};
+2 -2
nixos/modules/programs/starship.nix
···
settings = mkOption {
inherit (settingsFormat) type;
default = { };
-
description = ''
-
Configuration included in <literal>starship.toml</literal>.
See https://starship.rs/config/#prompt for documentation.
'';
···
settings = mkOption {
inherit (settingsFormat) type;
default = { };
+
description = lib.mdDoc ''
+
Configuration included in `starship.toml`.
See https://starship.rs/config/#prompt for documentation.
'';