diff --git a/doc/build-aux/pandoc-filters/docbook-writer/rst-roles.lua b/doc/build-aux/pandoc-filters/docbook-writer/rst-roles.lua index 1c745393a04..5c1b034d079 100644 --- a/doc/build-aux/pandoc-filters/docbook-writer/rst-roles.lua +++ b/doc/build-aux/pandoc-filters/docbook-writer/rst-roles.lua @@ -31,6 +31,10 @@ function Code(elem) tag = 'command' elseif elem.attributes['role'] == 'option' then tag = 'option' + elseif elem.attributes['role'] == 'var' then + tag = 'varname' + elseif elem.attributes['role'] == 'env' then + tag = 'envar' end if tag ~= nil then diff --git a/doc/contributing/contributing-to-documentation.chapter.md b/doc/contributing/contributing-to-documentation.chapter.md index db16f13b474..81482523cd0 100644 --- a/doc/contributing/contributing-to-documentation.chapter.md +++ b/doc/contributing/contributing-to-documentation.chapter.md @@ -58,8 +58,10 @@ Additional syntax extensions are available, though not all extensions can be use A few markups for other kinds of literals are also available: - `` {command}`rm -rfi` `` turns into {command}`rm -rfi` - - `` {option}`networking.useDHCP` `` turns into {option}`networking.useDHCP` + - `` {env}`XDG_DATA_DIRS` `` turns into {env}`XDG_DATA_DIRS` - `` {file}`/etc/passwd` `` turns into {file}`/etc/passwd` + - `` {option}`networking.useDHCP` `` turns into {option}`networking.useDHCP` + - `` {var}`/etc/passwd` `` turns into {var}`/etc/passwd` These literal kinds are used mostly in NixOS option documentation. diff --git a/lib/modules.nix b/lib/modules.nix index 6a1b0bfdc4f..d3a7fac82c4 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -163,84 +163,50 @@ rec { # TODO: Change the type of this option to a submodule with a # freeformType, so that individual arguments can be documented # separately - description = '' + description = lib.mdDoc '' Additional arguments passed to each module in addition to ones - like lib, config, - and pkgs, modulesPath. - - + like `lib`, `config`, + and `pkgs`, `modulesPath`. + This option is also available to all submodules. Submodules do not inherit args from their parent module, nor do they provide args to their parent module or sibling submodules. The sole exception to - this is the argument name which is provided by + this is the argument `name` which is provided by parent modules to a submodule and contains the attribute name the submodule is bound to, or a unique generated name if it is not bound to an attribute. - - + Some arguments are already passed by default, of which the - following cannot be changed with this option: - - - - lib: The nixpkgs library. - - - - - config: The results of all options after merging the values from all modules together. - - - - - options: The options declared in all modules. - - - - - specialArgs: The specialArgs argument passed to evalModules. - - - - - All attributes of specialArgs - - - Whereas option values can generally depend on other option values - thanks to laziness, this does not apply to imports, which - must be computed statically before anything else. - - - For this reason, callers of the module system can provide specialArgs - which are available during import resolution. - - - For NixOS, specialArgs includes - modulesPath, which allows you to import - extra modules from the nixpkgs package tree without having to - somehow make the module aware of the location of the - nixpkgs or NixOS directories. - - { modulesPath, ... }: { - imports = [ - (modulesPath + "/profiles/minimal.nix") - ]; - } - - - - - - + following *cannot* be changed with this option: + - {var}`lib`: The nixpkgs library. + - {var}`config`: The results of all options after merging the values from all modules together. + - {var}`options`: The options declared in all modules. + - {var}`specialArgs`: The `specialArgs` argument passed to `evalModules`. + - All attributes of {var}`specialArgs` + + Whereas option values can generally depend on other option values + thanks to laziness, this does not apply to `imports`, which + must be computed statically before anything else. + + For this reason, callers of the module system can provide `specialArgs` + which are available during import resolution. + + For NixOS, `specialArgs` includes + {var}`modulesPath`, which allows you to import + extra modules from the nixpkgs package tree without having to + somehow make the module aware of the location of the + `nixpkgs` or NixOS directories. + ``` + { modulesPath, ... }: { + imports = [ + (modulesPath + "/profiles/minimal.nix") + ]; + } + ``` + For NixOS, the default value for this option includes at least this argument: - - - - pkgs: The nixpkgs package set according to - the option. - - - + - {var}`pkgs`: The nixpkgs package set according to + the {option}`nixpkgs.pkgs` option. ''; }; @@ -248,21 +214,21 @@ rec { type = types.bool; internal = true; default = true; - description = "Whether to check whether all option definitions have matching declarations."; + description = lib.mdDoc "Whether to check whether all option definitions have matching declarations."; }; _module.freeformType = mkOption { type = types.nullOr types.optionType; internal = true; default = null; - description = '' + description = lib.mdDoc '' If set, merge all definitions that don't have an associated option together using this type. The result then gets combined with the - values of all declared options to produce the final - config value. + values of all declared options to produce the final ` + config` value. - If this is null, definitions without an option - will throw an error unless is + If this is `null`, definitions without an option + will throw an error unless {option}`_module.check` is turned off. ''; }; @@ -270,7 +236,7 @@ rec { _module.specialArgs = mkOption { readOnly = true; internal = true; - description = '' + description = lib.mdDoc '' Externally provided module arguments that can't be modified from within a configuration, but can be used in module imports. ''; @@ -1169,7 +1135,7 @@ rec { { options = setAttrByPath from (mkOption { inherit visible; - description = "Alias of ."; + description = lib.mdDoc "Alias of {option}`${showOption to}`."; apply = x: use (toOf config); } // optionalAttrs (toType != null) { type = toType; diff --git a/lib/options.nix b/lib/options.nix index 84d9fd5e15d..a56e579ab84 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -95,7 +95,10 @@ rec { name: mkOption { default = false; example = true; - description = "Whether to enable ${name}."; + description = + if name ? _type && name._type == "mdDoc" + then lib.mdDoc "Whether to enable ${name.text}." + else "Whether to enable ${name}."; type = lib.types.bool; }; @@ -134,7 +137,7 @@ rec { let default' = if !isList default then [ default ] else default; in mkOption { type = lib.types.package; - description = "The ${name} package to use."; + description = lib.mdDoc "The ${name} package to use."; default = attrByPath default' (throw "${concatStringsSep "." default'} cannot be found in pkgs") pkgs; defaultText = literalExpression ("pkgs." + concatStringsSep "." default'); diff --git a/nixos/lib/make-options-doc/mergeJSON.py b/nixos/lib/make-options-doc/mergeJSON.py index c7577e41e2d..1a1af11337e 100644 --- a/nixos/lib/make-options-doc/mergeJSON.py +++ b/nixos/lib/make-options-doc/mergeJSON.py @@ -114,6 +114,10 @@ class Renderer(mistune.renderers.BaseRenderer): return f"" def file(self, text): return f"{escape(text)}" + def var(self, text): + return f"{escape(text)}" + def env(self, text): + return f"{escape(text)}" def manpage(self, page, section): title = f"{escape(page)}" vol = f"{escape(section)}" @@ -136,6 +140,20 @@ def p_file(md): md.inline.register_rule('file', FILE_PATTERN, parse) md.inline.rules.append('file') +def p_var(md): + VAR_PATTERN = r'\{var\}`(.*?)`' + def parse(self, m, state): + return ('var', m.group(1)) + md.inline.register_rule('var', VAR_PATTERN, parse) + md.inline.rules.append('var') + +def p_env(md): + ENV_PATTERN = r'\{env\}`(.*?)`' + def parse(self, m, state): + return ('env', m.group(1)) + md.inline.register_rule('env', ENV_PATTERN, parse) + md.inline.rules.append('env') + def p_option(md): OPTION_PATTERN = r'\{option\}`(.*?)`' def parse(self, m, state): @@ -162,7 +180,7 @@ def p_admonition(md): md.block.rules.append('admonition') md = mistune.create_markdown(renderer=Renderer(), plugins=[ - p_command, p_file, p_option, p_manpage, p_admonition + p_command, p_file, p_var, p_env, p_option, p_manpage, p_admonition ]) # converts in-place! diff --git a/nixos/lib/systemd-types.nix b/nixos/lib/systemd-types.nix index 961b6d7f985..a109f248b17 100644 --- a/nixos/lib/systemd-types.nix +++ b/nixos/lib/systemd-types.nix @@ -37,11 +37,11 @@ rec { initrdContents = types.attrsOf (types.submodule ({ config, options, name, ... }: { options = { - enable = mkEnableOption "copying of this file and symlinking it" // { default = true; }; + enable = mkEnableOption (lib.mdDoc "copying of this file and symlinking it") // { default = true; }; target = mkOption { type = types.path; - description = '' + description = lib.mdDoc '' Path of the symlink. ''; default = name; @@ -50,12 +50,12 @@ rec { text = mkOption { default = null; type = types.nullOr types.lines; - description = "Text of the file."; + description = lib.mdDoc "Text of the file."; }; source = mkOption { type = types.path; - description = "Path of the source file."; + description = lib.mdDoc "Path of the source file."; }; }; diff --git a/nixos/lib/systemd-unit-options.nix b/nixos/lib/systemd-unit-options.nix index 84388b55503..1c56b1b9aa0 100644 --- a/nixos/lib/systemd-unit-options.nix +++ b/nixos/lib/systemd-unit-options.nix @@ -37,24 +37,24 @@ in rec { enable = mkOption { default = true; type = types.bool; - description = '' + description = lib.mdDoc '' If set to false, this unit will be a symlink to /dev/null. This is primarily useful to prevent specific template instances - (e.g. serial-getty@ttyS0) from being - started. Note that enable=true does not + (e.g. `serial-getty@ttyS0`) from being + started. Note that `enable=true` does not make a unit start by default at boot; if you want that, see - wantedBy. + `wantedBy`. ''; }; requiredBy = mkOption { default = []; type = types.listOf unitNameType; - description = '' + description = lib.mdDoc '' Units that require (i.e. depend on and need to go down with) - this unit. The discussion under wantedBy - applies here as well: inverse .requires + this unit. The discussion under `wantedBy` + applies here as well: inverse `.requires` symlinks are established. ''; }; @@ -62,16 +62,16 @@ in rec { wantedBy = mkOption { default = []; type = types.listOf unitNameType; - description = '' + description = lib.mdDoc '' Units that want (i.e. depend on) this unit. The standard way to make a unit start by default at boot is to set this option - to [ "multi-user.target" ]. That's despite + to `[ "multi-user.target" ]`. That's despite the fact that the systemd.unit(5) manpage says this option - goes in the [Install] section that controls - the behaviour of systemctl enable. Since + goes in the `[Install]` section that controls + the behaviour of `systemctl enable`. Since such a process is stateful and thus contrary to the design of NixOS, setting this option instead causes the equivalent - inverse .wants symlink to be present, + inverse `.wants` symlink to be present, establishing the same desired relationship in a stateless way. ''; }; @@ -79,7 +79,7 @@ in rec { aliases = mkOption { default = []; type = types.listOf unitNameType; - description = "Aliases of that unit."; + description = lib.mdDoc "Aliases of that unit."; }; }; @@ -89,12 +89,12 @@ in rec { text = mkOption { type = types.nullOr types.str; default = null; - description = "Text of this systemd unit."; + description = lib.mdDoc "Text of this systemd unit."; }; unit = mkOption { internal = true; - description = "The generated unit."; + description = lib.mdDoc "The generated unit."; }; }; @@ -105,19 +105,19 @@ in rec { description = mkOption { default = ""; type = types.singleLineStr; - description = "Description of this unit used in systemd messages and progress indicators."; + description = lib.mdDoc "Description of this unit used in systemd messages and progress indicators."; }; documentation = mkOption { default = []; type = types.listOf types.str; - description = "A list of URIs referencing documentation for this unit or its configuration."; + description = lib.mdDoc "A list of URIs referencing documentation for this unit or its configuration."; }; requires = mkOption { default = []; type = types.listOf unitNameType; - description = '' + description = lib.mdDoc '' Start the specified units when this unit is started, and stop this unit when the specified units are stopped or fail. ''; @@ -126,7 +126,7 @@ in rec { wants = mkOption { default = []; type = types.listOf unitNameType; - description = '' + description = lib.mdDoc '' Start the specified units when this unit is started. ''; }; @@ -134,7 +134,7 @@ in rec { after = mkOption { default = []; type = types.listOf unitNameType; - description = '' + description = lib.mdDoc '' If the specified units are started at the same time as this unit, delay this unit until they have started. ''; @@ -143,7 +143,7 @@ in rec { before = mkOption { default = []; type = types.listOf unitNameType; - description = '' + description = lib.mdDoc '' If the specified units are started at the same time as this unit, delay them until this unit has started. ''; @@ -152,7 +152,7 @@ in rec { bindsTo = mkOption { default = []; type = types.listOf unitNameType; - description = '' + description = lib.mdDoc '' Like ‘requires’, but in addition, if the specified units unexpectedly disappear, this unit will be stopped as well. ''; @@ -161,7 +161,7 @@ in rec { partOf = mkOption { default = []; type = types.listOf unitNameType; - description = '' + description = lib.mdDoc '' If the specified units are stopped or restarted, then this unit is stopped or restarted as well. ''; @@ -170,7 +170,7 @@ in rec { conflicts = mkOption { default = []; type = types.listOf unitNameType; - description = '' + description = lib.mdDoc '' If the specified units are started, then this unit is stopped and vice versa. ''; @@ -179,7 +179,7 @@ in rec { requisite = mkOption { default = []; type = types.listOf unitNameType; - description = '' + description = lib.mdDoc '' Similar to requires. However if the units listed are not started, they will not be started and the transaction will fail. ''; @@ -189,18 +189,17 @@ in rec { default = {}; example = { RequiresMountsFor = "/data"; }; type = types.attrsOf unitOption; - description = '' + description = lib.mdDoc '' Each attribute in this set specifies an option in the - [Unit] section of the unit. See - systemd.unit - 5 for details. + `[Unit]` section of the unit. See + {manpage}`systemd.unit(5)` for details. ''; }; onFailure = mkOption { default = []; type = types.listOf unitNameType; - description = '' + description = lib.mdDoc '' A list of one or more units that are activated when this unit enters the "failed" state. ''; @@ -209,7 +208,7 @@ in rec { onSuccess = mkOption { default = []; type = types.listOf unitNameType; - description = '' + description = lib.mdDoc '' A list of one or more units that are activated when this unit enters the "inactive" state. ''; @@ -217,7 +216,7 @@ in rec { startLimitBurst = mkOption { type = types.int; - description = '' + description = lib.mdDoc '' Configure unit start rate limiting. Units which are started more than startLimitBurst times within an interval time interval are not permitted to start any more. @@ -226,7 +225,7 @@ in rec { startLimitIntervalSec = mkOption { type = types.int; - description = '' + description = lib.mdDoc '' Configure unit start rate limiting. Units which are started more than startLimitBurst times within an interval time interval are not permitted to start any more. @@ -245,7 +244,7 @@ in rec { restartTriggers = mkOption { default = []; type = types.listOf types.unspecified; - description = '' + description = lib.mdDoc '' An arbitrary list of items such as derivations. If any item in the list changes between reconfigurations, the service will be restarted. @@ -255,7 +254,7 @@ in rec { reloadTriggers = mkOption { default = []; type = types.listOf unitOption; - description = '' + description = lib.mdDoc '' An arbitrary list of items such as derivations. If any item in the list changes between reconfigurations, the service will be reloaded. If anything but a reload trigger changes in the @@ -273,16 +272,16 @@ in rec { default = {}; type = with types; attrsOf (nullOr (oneOf [ str path package ])); example = { PATH = "/foo/bar/bin"; LANG = "nl_NL.UTF-8"; }; - description = "Environment variables passed to the service's processes."; + description = lib.mdDoc "Environment variables passed to the service's processes."; }; path = mkOption { default = []; type = with types; listOf (oneOf [ package str ]); - description = '' - Packages added to the service's PATH - environment variable. Both the bin - and sbin subdirectories of each + description = lib.mdDoc '' + Packages added to the service's {env}`PATH` + environment variable. Both the {file}`bin` + and {file}`sbin` subdirectories of each package are added. ''; }; @@ -293,30 +292,29 @@ in rec { { RestartSec = 5; }; type = types.addCheck (types.attrsOf unitOption) checkService; - description = '' + description = lib.mdDoc '' Each attribute in this set specifies an option in the - [Service] section of the unit. See - systemd.service - 5 for details. + `[Service]` section of the unit. See + {manpage}`systemd.service(5)` for details. ''; }; script = mkOption { type = types.lines; default = ""; - description = "Shell commands executed as the service's main process."; + description = lib.mdDoc "Shell commands executed as the service's main process."; }; scriptArgs = mkOption { type = types.str; default = ""; - description = "Arguments passed to the main process script."; + description = lib.mdDoc "Arguments passed to the main process script."; }; preStart = mkOption { type = types.lines; default = ""; - description = '' + description = lib.mdDoc '' Shell commands executed before the service's main process is started. ''; @@ -325,7 +323,7 @@ in rec { postStart = mkOption { type = types.lines; default = ""; - description = '' + description = lib.mdDoc '' Shell commands executed after the service's main process is started. ''; @@ -334,7 +332,7 @@ in rec { reload = mkOption { type = types.lines; default = ""; - description = '' + description = lib.mdDoc '' Shell commands executed when the service's main process is reloaded. ''; @@ -343,7 +341,7 @@ in rec { preStop = mkOption { type = types.lines; default = ""; - description = '' + description = lib.mdDoc '' Shell commands executed to stop the service. ''; }; @@ -351,7 +349,7 @@ in rec { postStop = mkOption { type = types.lines; default = ""; - description = '' + description = lib.mdDoc '' Shell commands executed after the service's main process has exited. ''; @@ -360,7 +358,7 @@ in rec { jobScripts = mkOption { type = with types; coercedTo path singleton (listOf path); internal = true; - description = "A list of all job script derivations of this unit."; + description = lib.mdDoc "A list of all job script derivations of this unit."; default = []; }; @@ -405,7 +403,7 @@ in rec { restartIfChanged = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether the service should be restarted during a NixOS configuration switch if its definition has changed. ''; @@ -414,14 +412,14 @@ in rec { reloadIfChanged = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether the service should be reloaded during a NixOS configuration switch if its definition has changed. If - enabled, the value of is + enabled, the value of {option}`restartIfChanged` is ignored. This option should not be used anymore in favor of - which allows more granular + {option}`reloadTriggers` which allows more granular control of when a service is reloaded and when a service is restarted. ''; @@ -430,14 +428,14 @@ in rec { stopIfChanged = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' If set, a changed unit is restarted by calling - systemctl stop in the old configuration, - then systemctl start in the new one. + {command}`systemctl stop` in the old configuration, + then {command}`systemctl start` in the new one. Otherwise, it is restarted in a single step using - systemctl restart in the new configuration. + {command}`systemctl restart` in the new configuration. The latter is less correct because it runs the - ExecStop commands from the new + `ExecStop` commands from the new configuration. ''; }; @@ -446,13 +444,12 @@ in rec { type = with types; either str (listOf str); default = []; example = "Sun 14:00:00"; - description = '' + description = lib.mdDoc '' Automatically start this unit at the given date/time, which must be in the format described in - systemd.time - 7. This is equivalent + {manpage}`systemd.time(7)`. This is equivalent to adding a corresponding timer unit with - set to the value given here. + {option}`OnCalendar` set to the value given here. ''; apply = v: if isList v then v else [ v ]; }; @@ -474,9 +471,9 @@ in rec { default = []; type = types.listOf types.str; example = [ "0.0.0.0:993" "/run/my-socket" ]; - description = '' - For each item in this list, a ListenStream - option in the [Socket] section will be created. + description = lib.mdDoc '' + For each item in this list, a `ListenStream` + option in the `[Socket]` section will be created. ''; }; @@ -484,9 +481,9 @@ in rec { default = []; type = types.listOf types.str; example = [ "0.0.0.0:993" "/run/my-socket" ]; - description = '' - For each item in this list, a ListenDatagram - option in the [Socket] section will be created. + description = lib.mdDoc '' + For each item in this list, a `ListenDatagram` + option in the `[Socket]` section will be created. ''; }; @@ -494,11 +491,10 @@ in rec { default = {}; example = { ListenStream = "/run/my-socket"; }; type = types.attrsOf unitOption; - description = '' + description = lib.mdDoc '' Each attribute in this set specifies an option in the - [Socket] section of the unit. See - systemd.socket - 5 for details. + `[Socket]` section of the unit. See + {manpage}`systemd.socket(5)` for details. ''; }; }; @@ -527,13 +523,11 @@ in rec { default = {}; example = { OnCalendar = "Sun 14:00:00"; Unit = "foo.service"; }; type = types.attrsOf unitOption; - description = '' + description = lib.mdDoc '' Each attribute in this set specifies an option in the - [Timer] section of the unit. See - systemd.timer - 5 and - systemd.time - 7 for details. + `[Timer]` section of the unit. See + {manpage}`systemd.timer(5)` and + {manpage}`systemd.time(7)` for details. ''; }; @@ -562,11 +556,10 @@ in rec { default = {}; example = { PathChanged = "/some/path"; Unit = "changedpath.service"; }; type = types.attrsOf unitOption; - description = '' + description = lib.mdDoc '' Each attribute in this set specifies an option in the - [Path] section of the unit. See - systemd.path - 5 for details. + `[Path]` section of the unit. See + {manpage}`systemd.path(5)` for details. ''; }; @@ -594,13 +587,13 @@ in rec { what = mkOption { example = "/dev/sda1"; type = types.str; - description = "Absolute path of device node, file or other resource. (Mandatory)"; + description = lib.mdDoc "Absolute path of device node, file or other resource. (Mandatory)"; }; where = mkOption { example = "/mnt"; type = types.str; - description = '' + description = lib.mdDoc '' Absolute path of a directory of the mount point. Will be created if it doesn't exist. (Mandatory) ''; @@ -610,25 +603,24 @@ in rec { default = ""; example = "ext4"; type = types.str; - description = "File system type."; + description = lib.mdDoc "File system type."; }; options = mkOption { default = ""; example = "noatime"; type = types.commas; - description = "Options used to mount the file system."; + description = lib.mdDoc "Options used to mount the file system."; }; mountConfig = mkOption { default = {}; example = { DirectoryMode = "0775"; }; type = types.attrsOf unitOption; - description = '' + description = lib.mdDoc '' Each attribute in this set specifies an option in the - [Mount] section of the unit. See - systemd.mount - 5 for details. + `[Mount]` section of the unit. See + {manpage}`systemd.mount(5)` for details. ''; }; @@ -655,7 +647,7 @@ in rec { where = mkOption { example = "/mnt"; type = types.str; - description = '' + description = lib.mdDoc '' Absolute path of a directory of the mount point. Will be created if it doesn't exist. (Mandatory) ''; @@ -665,11 +657,10 @@ in rec { default = {}; example = { DirectoryMode = "0775"; }; type = types.attrsOf unitOption; - description = '' + description = lib.mdDoc '' Each attribute in this set specifies an option in the - [Automount] section of the unit. See - systemd.automount - 5 for details. + `[Automount]` section of the unit. See + {manpage}`systemd.automount(5)` for details. ''; }; @@ -697,11 +688,10 @@ in rec { default = {}; example = { MemoryMax = "2G"; }; type = types.attrsOf unitOption; - description = '' + description = lib.mdDoc '' Each attribute in this set specifies an option in the - [Slice] section of the unit. See - systemd.slice - 5 for details. + `[Slice]` section of the unit. See + {manpage}`systemd.slice(5)` for details. ''; }; diff --git a/nixos/maintainers/scripts/ec2/amazon-image.nix b/nixos/maintainers/scripts/ec2/amazon-image.nix index 2d89db0a7f3..e2a05a09d0c 100644 --- a/nixos/maintainers/scripts/ec2/amazon-image.nix +++ b/nixos/maintainers/scripts/ec2/amazon-image.nix @@ -23,7 +23,7 @@ in { options.amazonImage = { name = mkOption { type = types.str; - description = "The name of the generated derivation"; + description = lib.mdDoc "The name of the generated derivation"; default = "nixos-amazon-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}"; }; @@ -35,7 +35,7 @@ in { ] ''; default = []; - description = '' + description = lib.mdDoc '' This option lists files to be copied to fixed locations in the generated image. Glob patterns work. ''; @@ -45,13 +45,13 @@ in { type = with types; either (enum [ "auto" ]) int; default = if config.ec2.hvm then 2048 else 8192; example = 8192; - description = "The size in MB of the image"; + description = lib.mdDoc "The size in MB of the image"; }; format = mkOption { type = types.enum [ "raw" "qcow2" "vpc" ]; default = "vpc"; - description = "The image format to output"; + description = lib.mdDoc "The image format to output"; }; }; diff --git a/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix b/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix index d62a560642d..f73e251d304 100644 --- a/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix +++ b/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix @@ -16,20 +16,20 @@ in options.openstackImage = { name = mkOption { type = types.str; - description = "The name of the generated derivation"; + description = lib.mdDoc "The name of the generated derivation"; default = "nixos-openstack-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}"; }; sizeMB = mkOption { type = types.int; default = 8192; - description = "The size in MB of the image"; + description = lib.mdDoc "The size in MB of the image"; }; format = mkOption { type = types.enum [ "raw" "qcow2" ]; default = "qcow2"; - description = "The image format to output"; + description = lib.mdDoc "The image format to output"; }; }; diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix index f86c0387e91..f9c6e5be226 100644 --- a/nixos/modules/config/fonts/fontconfig.nix +++ b/nixos/modules/config/fonts/fontconfig.nix @@ -259,7 +259,7 @@ in internal = true; type = with types; listOf path; default = [ ]; - description = '' + description = lib.mdDoc '' Fontconfig configuration packages. ''; }; diff --git a/nixos/modules/config/iproute2.nix b/nixos/modules/config/iproute2.nix index 2e059e28170..8f49e7dbf7d 100644 --- a/nixos/modules/config/iproute2.nix +++ b/nixos/modules/config/iproute2.nix @@ -7,7 +7,7 @@ let in { options.networking.iproute2 = { - enable = mkEnableOption "copy IP route configuration files"; + enable = mkEnableOption (lib.mdDoc "copy IP route configuration files"); rttablesExtraConfig = mkOption { type = types.lines; default = ""; diff --git a/nixos/modules/config/krb5/default.nix b/nixos/modules/config/krb5/default.nix index 4c80f87a498..e3e0fadf096 100644 --- a/nixos/modules/config/krb5/default.nix +++ b/nixos/modules/config/krb5/default.nix @@ -78,7 +78,7 @@ in { options = { krb5 = { - enable = mkEnableOption "building krb5.conf, configuration file for Kerberos V"; + enable = mkEnableOption (lib.mdDoc "building krb5.conf, configuration file for Kerberos V"); kerberos = mkOption { type = types.package; diff --git a/nixos/modules/config/ldap.nix b/nixos/modules/config/ldap.nix index 799d60e0103..d2f01fb87d3 100644 --- a/nixos/modules/config/ldap.nix +++ b/nixos/modules/config/ldap.nix @@ -59,7 +59,7 @@ in users.ldap = { - enable = mkEnableOption "authentication against an LDAP server"; + enable = mkEnableOption (lib.mdDoc "authentication against an LDAP server"); loginPam = mkOption { type = types.bool; diff --git a/nixos/modules/config/malloc.nix b/nixos/modules/config/malloc.nix index a3fed33afa1..4db0480b155 100644 --- a/nixos/modules/config/malloc.nix +++ b/nixos/modules/config/malloc.nix @@ -77,24 +77,21 @@ in environment.memoryAllocator.provider = mkOption { type = types.enum ([ "libc" ] ++ attrNames providers); default = "libc"; - description = '' + description = lib.mdDoc '' The system-wide memory allocator. Briefly, the system-wide memory allocator providers are: - - libc: the standard allocator provided by libc - ${toString (mapAttrsToList - (name: value: "${name}: ${value.description}") - providers)} - - - + - `libc`: the standard allocator provided by libc + ${concatStringsSep "\n" (mapAttrsToList + (name: value: "- `${name}`: ${replaceStrings [ "\n" ] [ " " ] value.description}") + providers)} + + ::: {.warning} Selecting an alternative allocator (i.e., anything other than - libc) may result in instability, data loss, + `libc`) may result in instability, data loss, and/or service failure. - - + ::: ''; }; }; diff --git a/nixos/modules/config/mysql.nix b/nixos/modules/config/mysql.nix index 8e7ce2a307e..af20a5e9535 100644 --- a/nixos/modules/config/mysql.nix +++ b/nixos/modules/config/mysql.nix @@ -8,83 +8,73 @@ in { options = { users.mysql = { - enable = mkEnableOption "Authentication against a MySQL/MariaDB database"; + enable = mkEnableOption (lib.mdDoc "Authentication against a MySQL/MariaDB database"); host = mkOption { type = types.str; example = "localhost"; - description = "The hostname of the MySQL/MariaDB server"; + description = lib.mdDoc "The hostname of the MySQL/MariaDB server"; }; database = mkOption { type = types.str; example = "auth"; - description = "The name of the database containing the users"; + description = lib.mdDoc "The name of the database containing the users"; }; user = mkOption { type = types.str; example = "nss-user"; - description = "The username to use when connecting to the database"; + description = lib.mdDoc "The username to use when connecting to the database"; }; passwordFile = mkOption { type = types.path; example = "/run/secrets/mysql-auth-db-passwd"; - description = "The path to the file containing the password for the user"; + description = lib.mdDoc "The path to the file containing the password for the user"; }; pam = mkOption { - description = "Settings for pam_mysql"; + description = lib.mdDoc "Settings for `pam_mysql`"; type = types.submodule { options = { table = mkOption { type = types.str; example = "users"; - description = "The name of table that maps unique login names to the passwords."; + description = lib.mdDoc "The name of table that maps unique login names to the passwords."; }; updateTable = mkOption { type = types.nullOr types.str; default = null; example = "users_updates"; - description = '' + description = lib.mdDoc '' The name of the table used for password alteration. If not defined, the value - of the table option will be used instead. + of the `table` option will be used instead. ''; }; userColumn = mkOption { type = types.str; example = "username"; - description = "The name of the column that contains a unix login name."; + description = lib.mdDoc "The name of the column that contains a unix login name."; }; passwordColumn = mkOption { type = types.str; example = "password"; - description = "The name of the column that contains a (encrypted) password string."; + description = lib.mdDoc "The name of the column that contains a (encrypted) password string."; }; statusColumn = mkOption { type = types.nullOr types.str; default = null; example = "status"; - description = '' + description = lib.mdDoc '' The name of the column or an SQL expression that indicates the status of the user. The status is expressed by the combination of two bitfields shown below: - - - - bit 0 (0x01): - if flagged, pam_mysql deems the account to be expired and - returns PAM_ACCT_EXPIRED. That is, the account is supposed - to no longer be available. Note this doesn't mean that pam_mysql - rejects further authentication operations. - - - - - bit 1 (0x02): - if flagged, pam_mysql deems the authentication token - (password) to be expired and returns PAM_NEW_AUTHTOK_REQD. - This ends up requiring that the user enter a new password. - - - + - `bit 0 (0x01)`: + if flagged, `pam_mysql` deems the account to be expired and + returns `PAM_ACCT_EXPIRED`. That is, the account is supposed + to no longer be available. Note this doesn't mean that `pam_mysql` + rejects further authentication operations. + - `bit 1 (0x02)`: + if flagged, `pam_mysql` deems the authentication token + (password) to be expired and returns `PAM_NEW_AUTHTOK_REQD`. + This ends up requiring that the user enter a new password. ''; }; passwordCrypt = mkOption { @@ -101,101 +91,59 @@ in "8" "sha512" "9" "sha256" ]; - description = '' + description = lib.mdDoc '' The method to encrypt the user's password: - - - - 0 (or "plain"): - No encryption. Passwords are stored in plaintext. HIGHLY DISCOURAGED. - - - - - 1 (or "Y"): - Use crypt(3) function. - - - - - 2 (or "mysql"): - Use the MySQL PASSWORD() function. It is possible that the encryption function used - by pam_mysql is different from that of the MySQL server, as - pam_mysql uses the function defined in MySQL's C-client API - instead of using PASSWORD() SQL function in the query. - - - - - 3 (or "md5"): - Use plain hex MD5. - - - - - 4 (or "sha1"): - Use plain hex SHA1. - - - - - 5 (or "drupal7"): - Use Drupal7 salted passwords. - - - - - 6 (or "joomla15"): - Use Joomla15 salted passwords. - - - - - 7 (or "ssha"): - Use ssha hashed passwords. - - - - - 8 (or "sha512"): - Use sha512 hashed passwords. - - - - - 9 (or "sha256"): - Use sha256 hashed passwords. - - - + - `0` (or `"plain"`): + No encryption. Passwords are stored in plaintext. HIGHLY DISCOURAGED. + - `1` (or `"Y"`): + Use crypt(3) function. + - `2` (or `"mysql"`): + Use the MySQL PASSWORD() function. It is possible that the encryption function used + by `pam_mysql` is different from that of the MySQL server, as + `pam_mysql` uses the function defined in MySQL's C-client API + instead of using PASSWORD() SQL function in the query. + - `3` (or `"md5"`): + Use plain hex MD5. + - `4` (or `"sha1"`): + Use plain hex SHA1. + - `5` (or `"drupal7"`): + Use Drupal7 salted passwords. + - `6` (or `"joomla15"`): + Use Joomla15 salted passwords. + - `7` (or `"ssha"`): + Use ssha hashed passwords. + - `8` (or `"sha512"`): + Use sha512 hashed passwords. + - `9` (or `"sha256"`): + Use sha256 hashed passwords. ''; }; cryptDefault = mkOption { type = types.nullOr (types.enum [ "md5" "sha256" "sha512" "blowfish" ]); default = null; example = "blowfish"; - description = "The default encryption method to use for passwordCrypt = 1."; + description = lib.mdDoc "The default encryption method to use for `passwordCrypt = 1`."; }; where = mkOption { type = types.nullOr types.str; default = null; example = "host.name='web' AND user.active=1"; - description = "Additional criteria for the query."; + description = lib.mdDoc "Additional criteria for the query."; }; verbose = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' If enabled, produces logs with detailed messages that describes what - pam_mysql is doing. May be useful for debugging. + `pam_mysql` is doing. May be useful for debugging. ''; }; disconnectEveryOperation = mkOption { type = types.bool; default = false; - description = '' - By default, pam_mysql keeps the connection to the MySQL + description = lib.mdDoc '' + By default, `pam_mysql` keeps the connection to the MySQL database until the session is closed. If this option is set to true it disconnects every time the PAM operation has finished. This option may be useful in case the session lasts quite long. @@ -205,17 +153,17 @@ in enable = mkOption { type = types.bool; default = false; - description = "Enables logging of authentication attempts in the MySQL database."; + description = lib.mdDoc "Enables logging of authentication attempts in the MySQL database."; }; table = mkOption { type = types.str; example = "logs"; - description = "The name of the table to which logs are written."; + description = lib.mdDoc "The name of the table to which logs are written."; }; msgColumn = mkOption { type = types.str; example = "msg"; - description = '' + description = lib.mdDoc '' The name of the column in the log table to which the description of the performed operation is stored. ''; @@ -223,7 +171,7 @@ in userColumn = mkOption { type = types.str; example = "user"; - description = '' + description = lib.mdDoc '' The name of the column in the log table to which the name of the user being authenticated is stored. ''; @@ -231,16 +179,16 @@ in pidColumn = mkOption { type = types.str; example = "pid"; - description = '' + description = lib.mdDoc '' The name of the column in the log table to which the pid of the - process utilising the pam_mysql's authentication + process utilising the `pam_mysql's` authentication service is stored. ''; }; hostColumn = mkOption { type = types.str; example = "host"; - description = '' + description = lib.mdDoc '' The name of the column in the log table to which the name of the user being authenticated is stored. ''; @@ -248,17 +196,16 @@ in rHostColumn = mkOption { type = types.str; example = "rhost"; - description = '' + description = lib.mdDoc '' The name of the column in the log table to which the name of the remote host that initiates the session is stored. The value is supposed to be - set by the PAM-aware application with pam_set_item(PAM_RHOST) - . + set by the PAM-aware application with `pam_set_item(PAM_RHOST)`. ''; }; timeColumn = mkOption { type = types.str; example = "timestamp"; - description = '' + description = lib.mdDoc '' The name of the column in the log table to which the timestamp of the log entry is stored. ''; @@ -268,11 +215,11 @@ in }; }; nss = mkOption { - description = '' - Settings for libnss-mysql. + description = lib.mdDoc '' + Settings for `libnss-mysql`. - All examples are from the minimal example - of libnss-mysql, but they are modified with NixOS paths for bash. + All examples are from the [minimal example](https://github.com/saknopper/libnss-mysql/tree/master/sample/minimal) + of `libnss-mysql`, but they are modified with NixOS paths for bash. ''; type = types.submodule { options = { @@ -285,9 +232,8 @@ in WHERE username='%1$s' \ LIMIT 1 ''; - description = '' - SQL query for the getpwnam + description = lib.mdDoc '' + SQL query for the [getpwnam](https://man7.org/linux/man-pages/man3/getpwnam.3.html) syscall. ''; }; @@ -300,9 +246,8 @@ in WHERE uid='%1$u' \ LIMIT 1 ''; - description = '' - SQL query for the getpwuid + description = lib.mdDoc '' + SQL query for the [getpwuid](https://man7.org/linux/man-pages/man3/getpwuid.3.html) syscall. ''; }; @@ -315,9 +260,8 @@ in WHERE username='%1$s' \ LIMIT 1 ''; - description = '' - SQL query for the getspnam + description = lib.mdDoc '' + SQL query for the [getspnam](https://man7.org/linux/man-pages/man3/getspnam.3.html) syscall. ''; }; @@ -327,9 +271,8 @@ in example = literalExpression '' SELECT username,'x',uid,'5000','MySQL User', CONCAT('/home/',username),'/run/sw/current-system/bin/bash' FROM users ''; - description = '' - SQL query for the getpwent + description = lib.mdDoc '' + SQL query for the [getpwent](https://man7.org/linux/man-pages/man3/getpwent.3.html) syscall. ''; }; @@ -339,9 +282,8 @@ in example = literalExpression '' SELECT username,password,'1','0','99999','0','0','-1','0' FROM users ''; - description = '' - SQL query for the getspent + description = lib.mdDoc '' + SQL query for the [getspent](https://man7.org/linux/man-pages/man3/getspent.3.html) syscall. ''; }; @@ -351,9 +293,8 @@ in example = literalExpression '' SELECT name,password,gid FROM groups WHERE name='%1$s' LIMIT 1 ''; - description = '' - SQL query for the getgrnam + description = lib.mdDoc '' + SQL query for the [getgrnam](https://man7.org/linux/man-pages/man3/getgrnam.3.html) syscall. ''; }; @@ -363,9 +304,8 @@ in example = literalExpression '' SELECT name,password,gid FROM groups WHERE gid='%1$u' LIMIT 1 ''; - description = '' - SQL query for the getgrgid + description = lib.mdDoc '' + SQL query for the [getgrgid](https://man7.org/linux/man-pages/man3/getgrgid.3.html) syscall. ''; }; @@ -375,9 +315,8 @@ in example = literalExpression '' SELECT name,password,gid FROM groups ''; - description = '' - SQL query for the getgrent + description = lib.mdDoc '' + SQL query for the [getgrent](https://man7.org/linux/man-pages/man3/getgrent.3.html) syscall. ''; }; @@ -387,9 +326,8 @@ in example = literalExpression '' SELECT username FROM grouplist WHERE gid='%1$u' ''; - description = '' - SQL query for the memsbygid + description = lib.mdDoc '' + SQL query for the [memsbygid](https://man7.org/linux/man-pages/man3/memsbygid.3.html) syscall. ''; }; @@ -399,9 +337,8 @@ in example = literalExpression '' SELECT gid FROM grouplist WHERE username='%1$s' ''; - description = '' - SQL query for the gidsbymem + description = lib.mdDoc '' + SQL query for the [gidsbymem](https://man7.org/linux/man-pages/man3/gidsbymem.3.html) syscall. ''; }; diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix index 22e580233a1..aa6d75e199f 100644 --- a/nixos/modules/config/networking.nix +++ b/nixos/modules/config/networking.nix @@ -141,7 +141,7 @@ in type = types.attrs; internal = true; default = {}; - description = '' + description = lib.mdDoc '' Environment variables used for the network proxy. ''; }; diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix index 096152cefe9..3e969991f8f 100644 --- a/nixos/modules/config/pulseaudio.nix +++ b/nixos/modules/config/pulseaudio.nix @@ -190,17 +190,17 @@ in { zeroconf = { discovery.enable = - mkEnableOption "discovery of pulseaudio sinks in the local network"; + mkEnableOption (lib.mdDoc "discovery of pulseaudio sinks in the local network"); publish.enable = - mkEnableOption "publishing the pulseaudio sink in the local network"; + mkEnableOption (lib.mdDoc "publishing the pulseaudio sink in the local network"); }; # TODO: enable by default? tcp = { - enable = mkEnableOption "tcp streaming support"; + enable = mkEnableOption (lib.mdDoc "tcp streaming support"); anonymousClients = { - allowAll = mkEnableOption "all anonymous clients to stream to the server"; + allowAll = mkEnableOption (lib.mdDoc "all anonymous clients to stream to the server"); allowedIpRanges = mkOption { type = types.listOf types.str; default = []; diff --git a/nixos/modules/config/qt5.nix b/nixos/modules/config/qt5.nix index 9e19774b582..cb3180d7b96 100644 --- a/nixos/modules/config/qt5.nix +++ b/nixos/modules/config/qt5.nix @@ -27,7 +27,7 @@ in options = { qt5 = { - enable = mkEnableOption "Qt5 theming configuration"; + enable = mkEnableOption (lib.mdDoc "Qt5 theming configuration"); platformTheme = mkOption { type = types.enum [ diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix index 2fda71749c0..50bb9b17783 100644 --- a/nixos/modules/config/shells-environment.nix +++ b/nixos/modules/config/shells-environment.nix @@ -140,9 +140,9 @@ in example = literalExpression ''"''${pkgs.dash}/bin/dash"''; type = types.path; visible = false; - description = '' + description = lib.mdDoc '' The shell executable that is linked system-wide to - /bin/sh. Please note that NixOS assumes all + `/bin/sh`. Please note that NixOS assumes all over the place that shell to be Bash, so override the default setting only if you know exactly what you're doing. ''; diff --git a/nixos/modules/config/swap.nix b/nixos/modules/config/swap.nix index 3216590d8f9..10d52ade288 100644 --- a/nixos/modules/config/swap.nix +++ b/nixos/modules/config/swap.nix @@ -73,8 +73,8 @@ let label = mkOption { example = "swap"; type = types.str; - description = '' - Label of the device. Can be used instead of device. + description = lib.mdDoc '' + Label of the device. Can be used instead of {var}`device`. ''; }; diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix index a35510b215f..e8bbeac4f72 100644 --- a/nixos/modules/config/system-path.nix +++ b/nixos/modules/config/system-path.nix @@ -132,7 +132,7 @@ in path = mkOption { internal = true; - description = '' + description = lib.mdDoc '' The packages you want in the boot environment. ''; }; diff --git a/nixos/modules/config/xdg/portal.nix b/nixos/modules/config/xdg/portal.nix index 079b3385f8f..e28ff74e5d8 100644 --- a/nixos/modules/config/xdg/portal.nix +++ b/nixos/modules/config/xdg/portal.nix @@ -33,7 +33,7 @@ in options.xdg.portal = { enable = - mkEnableOption ''xdg desktop integration'' // { + mkEnableOption (lib.mdDoc ''[xdg desktop integration](https://github.com/flatpak/xdg-desktop-portal)'') // { default = false; }; @@ -54,11 +54,11 @@ in type = types.bool; visible = false; default = false; - description = '' - Sets environment variable GTK_USE_PORTAL to 1. + description = lib.mdDoc '' + Sets environment variable `GTK_USE_PORTAL` to `1`. This will force GTK-based programs ran outside Flatpak to respect and use XDG Desktop Portals for features like file chooser but it is an unsupported hack that can easily break things. - Defaults to false to respect its opt-in nature. + Defaults to `false` to respect its opt-in nature. ''; }; }; diff --git a/nixos/modules/config/xdg/portals/lxqt.nix b/nixos/modules/config/xdg/portals/lxqt.nix index 4cc6c193e7c..18fcf3d81c0 100644 --- a/nixos/modules/config/xdg/portals/lxqt.nix +++ b/nixos/modules/config/xdg/portals/lxqt.nix @@ -12,13 +12,13 @@ in }; options.xdg.portal.lxqt = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' the desktop portal for the LXQt desktop environment. - This will add the lxqt.xdg-desktop-portal-lxqt + This will add the `lxqt.xdg-desktop-portal-lxqt` package (with the extra Qt styles) into the - option - ''; + {option}`xdg.portal.extraPortals` option + ''); styles = mkOption { type = types.listOf types.package; diff --git a/nixos/modules/config/xdg/portals/wlr.nix b/nixos/modules/config/xdg/portals/wlr.nix index d8cbc68b1d6..d84ae794e3b 100644 --- a/nixos/modules/config/xdg/portals/wlr.nix +++ b/nixos/modules/config/xdg/portals/wlr.nix @@ -14,13 +14,13 @@ in }; options.xdg.portal.wlr = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' desktop portal for wlroots-based desktops - This will add the xdg-desktop-portal-wlr package into - the option, and provide the + This will add the `xdg-desktop-portal-wlr` package into + the {option}`xdg.portal.extraPortals` option, and provide the configuration file - ''; + ''); settings = mkOption { description = lib.mdDoc '' diff --git a/nixos/modules/hardware/brillo.nix b/nixos/modules/hardware/brillo.nix index e970c948099..92239de5aae 100644 --- a/nixos/modules/hardware/brillo.nix +++ b/nixos/modules/hardware/brillo.nix @@ -7,10 +7,10 @@ in { options = { hardware.brillo = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' Enable brillo in userspace. This will allow brightness control from users in the video group. - ''; + ''); }; }; diff --git a/nixos/modules/hardware/ckb-next.nix b/nixos/modules/hardware/ckb-next.nix index 287d287a775..e5c79c81431 100644 --- a/nixos/modules/hardware/ckb-next.nix +++ b/nixos/modules/hardware/ckb-next.nix @@ -13,7 +13,7 @@ in ]; options.hardware.ckb-next = { - enable = mkEnableOption "the Corsair keyboard/mouse driver"; + enable = mkEnableOption (lib.mdDoc "the Corsair keyboard/mouse driver"); gid = mkOption { type = types.nullOr types.int; diff --git a/nixos/modules/hardware/corectrl.nix b/nixos/modules/hardware/corectrl.nix index 345ec479e73..965cbe0267e 100644 --- a/nixos/modules/hardware/corectrl.nix +++ b/nixos/modules/hardware/corectrl.nix @@ -7,15 +7,15 @@ let in { options.programs.corectrl = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' A tool to overclock amd graphics cards and processors. Add your user to the corectrl group to run corectrl without needing to enter your password - ''; + ''); gpuOverclock = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' true - ''; + ''); ppfeaturemask = mkOption { type = types.str; default = "0xfffd7fff"; diff --git a/nixos/modules/hardware/cpu/amd-sev.nix b/nixos/modules/hardware/cpu/amd-sev.nix index 678b98e5135..28ee07f005b 100644 --- a/nixos/modules/hardware/cpu/amd-sev.nix +++ b/nixos/modules/hardware/cpu/amd-sev.nix @@ -6,7 +6,7 @@ let in with lib; { options.hardware.cpu.amd.sev = { - enable = mkEnableOption "access to the AMD SEV device"; + enable = mkEnableOption (lib.mdDoc "access to the AMD SEV device"); user = mkOption { description = lib.mdDoc "Owner to assign to the SEV device."; type = types.str; diff --git a/nixos/modules/hardware/cpu/intel-sgx.nix b/nixos/modules/hardware/cpu/intel-sgx.nix index 76664133a08..38a484cb126 100644 --- a/nixos/modules/hardware/cpu/intel-sgx.nix +++ b/nixos/modules/hardware/cpu/intel-sgx.nix @@ -20,7 +20,7 @@ in }; options.hardware.cpu.intel.sgx.provision = { - enable = mkEnableOption "access to the Intel SGX provisioning device"; + enable = mkEnableOption (lib.mdDoc "access to the Intel SGX provisioning device"); user = mkOption { description = lib.mdDoc "Owner to assign to the SGX provisioning device."; type = types.str; diff --git a/nixos/modules/hardware/device-tree.nix b/nixos/modules/hardware/device-tree.nix index 58b4ac66b46..2807313a5a9 100644 --- a/nixos/modules/hardware/device-tree.nix +++ b/nixos/modules/hardware/device-tree.nix @@ -171,7 +171,7 @@ in default = null; type = types.nullOr types.path; internal = true; - description = '' + description = lib.mdDoc '' A path containing the result of applying `overlays` to `kernelPackage`. ''; }; diff --git a/nixos/modules/hardware/flirc.nix b/nixos/modules/hardware/flirc.nix index 94ec715b9fa..2fe40db947e 100644 --- a/nixos/modules/hardware/flirc.nix +++ b/nixos/modules/hardware/flirc.nix @@ -3,7 +3,7 @@ let cfg = config.hardware.flirc; in { - options.hardware.flirc.enable = lib.mkEnableOption "software to configure a Flirc USB device"; + options.hardware.flirc.enable = lib.mkEnableOption (lib.mdDoc "software to configure a Flirc USB device"); config = lib.mkIf cfg.enable { environment.systemPackages = [ pkgs.flirc ]; diff --git a/nixos/modules/hardware/gkraken.nix b/nixos/modules/hardware/gkraken.nix index 97d15369db0..f427fec0a7c 100644 --- a/nixos/modules/hardware/gkraken.nix +++ b/nixos/modules/hardware/gkraken.nix @@ -7,7 +7,7 @@ let in { options.hardware.gkraken = { - enable = mkEnableOption "gkraken's udev rules for NZXT AIO liquid coolers"; + enable = mkEnableOption (lib.mdDoc "gkraken's udev rules for NZXT AIO liquid coolers"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/hardware/gpgsmartcards.nix b/nixos/modules/hardware/gpgsmartcards.nix index 4c1d0cc5b2a..43ade4d12e1 100644 --- a/nixos/modules/hardware/gpgsmartcards.nix +++ b/nixos/modules/hardware/gpgsmartcards.nix @@ -28,7 +28,7 @@ let cfg = config.hardware.gpgSmartcards; in { options.hardware.gpgSmartcards = { - enable = mkEnableOption "udev rules for gnupg smart cards"; + enable = mkEnableOption (lib.mdDoc "udev rules for gnupg smart cards"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/hardware/i2c.nix b/nixos/modules/hardware/i2c.nix index 0b57cd1c28d..c0423cc5d99 100644 --- a/nixos/modules/hardware/i2c.nix +++ b/nixos/modules/hardware/i2c.nix @@ -8,11 +8,11 @@ in { options.hardware.i2c = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' i2c devices support. By default access is granted to users in the "i2c" group (will be created if non-existent) and any user with a seat, meaning logged on the computer locally. - ''; + ''); group = mkOption { type = types.str; diff --git a/nixos/modules/hardware/keyboard/teck.nix b/nixos/modules/hardware/keyboard/teck.nix index 091ddb81962..2705668d9a7 100644 --- a/nixos/modules/hardware/keyboard/teck.nix +++ b/nixos/modules/hardware/keyboard/teck.nix @@ -6,7 +6,7 @@ let in { options.hardware.keyboard.teck = { - enable = mkEnableOption "non-root access to the firmware of TECK keyboards"; + enable = mkEnableOption (lib.mdDoc "non-root access to the firmware of TECK keyboards"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/hardware/keyboard/uhk.nix b/nixos/modules/hardware/keyboard/uhk.nix index bf2d739c3a9..c1805143993 100644 --- a/nixos/modules/hardware/keyboard/uhk.nix +++ b/nixos/modules/hardware/keyboard/uhk.nix @@ -6,12 +6,12 @@ let in { options.hardware.keyboard.uhk = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' non-root access to the firmware of UHK keyboards. You need it when you want to flash a new firmware on the keyboard. Access to the keyboard is granted to users in the "input" group. You may want to install the uhk-agent package. - ''; + ''); }; diff --git a/nixos/modules/hardware/ksm.nix b/nixos/modules/hardware/ksm.nix index ba7a1c12169..82d94e6ab57 100644 --- a/nixos/modules/hardware/ksm.nix +++ b/nixos/modules/hardware/ksm.nix @@ -11,7 +11,7 @@ in { ]; options.hardware.ksm = { - enable = mkEnableOption "Kernel Same-Page Merging"; + enable = mkEnableOption (lib.mdDoc "Kernel Same-Page Merging"); sleep = mkOption { type = types.nullOr types.int; default = null; diff --git a/nixos/modules/hardware/ledger.nix b/nixos/modules/hardware/ledger.nix index 41abe74315a..fcce4f61a87 100644 --- a/nixos/modules/hardware/ledger.nix +++ b/nixos/modules/hardware/ledger.nix @@ -6,7 +6,7 @@ let cfg = config.hardware.ledger; in { - options.hardware.ledger.enable = mkEnableOption "udev rules for Ledger devices"; + options.hardware.ledger.enable = mkEnableOption (lib.mdDoc "udev rules for Ledger devices"); config = mkIf cfg.enable { services.udev.packages = [ pkgs.ledger-udev-rules ]; diff --git a/nixos/modules/hardware/logitech.nix b/nixos/modules/hardware/logitech.nix index 70ca59a7dd3..9b06eb8a8b0 100644 --- a/nixos/modules/hardware/logitech.nix +++ b/nixos/modules/hardware/logitech.nix @@ -19,7 +19,7 @@ in options.hardware.logitech = { lcd = { - enable = mkEnableOption "Logitech LCD Devices"; + enable = mkEnableOption (lib.mdDoc "Logitech LCD Devices"); startWhenNeeded = mkOption { type = types.bool; @@ -41,7 +41,7 @@ in }; wireless = { - enable = mkEnableOption "Logitech Wireless Devices"; + enable = mkEnableOption (lib.mdDoc "Logitech Wireless Devices"); enableGraphical = mkOption { type = types.bool; diff --git a/nixos/modules/hardware/opengl.nix b/nixos/modules/hardware/opengl.nix index dd30bd92b45..5a5d88d9a4e 100644 --- a/nixos/modules/hardware/opengl.nix +++ b/nixos/modules/hardware/opengl.nix @@ -71,7 +71,7 @@ in package = mkOption { type = types.package; internal = true; - description = '' + description = lib.mdDoc '' The package that provides the OpenGL implementation. ''; }; @@ -79,9 +79,9 @@ in package32 = mkOption { type = types.package; internal = true; - description = '' + description = lib.mdDoc '' The package that provides the 32-bit OpenGL implementation on - 64-bit systems. Used when is + 64-bit systems. Used when {option}`driSupport32Bit` is set. ''; }; @@ -111,11 +111,11 @@ in type = types.bool; internal = true; default = false; - description = '' - Whether the LD_LIBRARY_PATH environment variable + description = lib.mdDoc '' + Whether the `LD_LIBRARY_PATH` environment variable should be set to the locations of driver libraries. Drivers which rely on overriding libraries should set this to true. Drivers which - support libglvnd and other dispatch libraries + support `libglvnd` and other dispatch libraries instead of overriding libraries should not set this. ''; }; diff --git a/nixos/modules/hardware/openrazer.nix b/nixos/modules/hardware/openrazer.nix index 315a4a6824b..247913297c9 100644 --- a/nixos/modules/hardware/openrazer.nix +++ b/nixos/modules/hardware/openrazer.nix @@ -49,9 +49,9 @@ in { options = { hardware.openrazer = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' OpenRazer drivers and userspace daemon. - ''; + ''); verboseLogging = mkOption { type = types.bool; diff --git a/nixos/modules/hardware/raid/hpsa.nix b/nixos/modules/hardware/raid/hpsa.nix index 120348a74bf..2934cd19a8c 100644 --- a/nixos/modules/hardware/raid/hpsa.nix +++ b/nixos/modules/hardware/raid/hpsa.nix @@ -48,7 +48,7 @@ in { options = { hardware.raid.HPSmartArray = { - enable = mkEnableOption "HP Smart Array kernel modules and CLI utility"; + enable = mkEnableOption (lib.mdDoc "HP Smart Array kernel modules and CLI utility"); }; }; diff --git a/nixos/modules/hardware/saleae-logic.nix b/nixos/modules/hardware/saleae-logic.nix index 02d234cd3f0..f144814a06b 100644 --- a/nixos/modules/hardware/saleae-logic.nix +++ b/nixos/modules/hardware/saleae-logic.nix @@ -5,7 +5,7 @@ let in { options.hardware.saleae-logic = { - enable = lib.mkEnableOption "udev rules for Saleae Logic devices"; + enable = lib.mkEnableOption (lib.mdDoc "udev rules for Saleae Logic devices"); package = lib.mkOption { type = lib.types.package; diff --git a/nixos/modules/hardware/sata.nix b/nixos/modules/hardware/sata.nix index bac24236f7d..5330ba9268b 100644 --- a/nixos/modules/hardware/sata.nix +++ b/nixos/modules/hardware/sata.nix @@ -36,7 +36,7 @@ in meta.maintainers = with lib.maintainers; [ peterhoeg ]; options.hardware.sata.timeout = { - enable = mkEnableOption "SATA drive timeouts"; + enable = mkEnableOption (lib.mdDoc "SATA drive timeouts"); deciSeconds = mkOption { example = 70; diff --git a/nixos/modules/hardware/system-76.nix b/nixos/modules/hardware/system-76.nix index 21cab4a3787..3fb2c10a6e3 100644 --- a/nixos/modules/hardware/system-76.nix +++ b/nixos/modules/hardware/system-76.nix @@ -57,7 +57,7 @@ let in { options = { hardware.system76 = { - enableAll = mkEnableOption "all recommended configuration for system76 systems"; + enableAll = mkEnableOption (lib.mdDoc "all recommended configuration for system76 systems"); firmware-daemon.enable = mkOption { default = cfg.enableAll; diff --git a/nixos/modules/hardware/tuxedo-keyboard.nix b/nixos/modules/hardware/tuxedo-keyboard.nix index 7bcabde4890..3ae876bd1f1 100644 --- a/nixos/modules/hardware/tuxedo-keyboard.nix +++ b/nixos/modules/hardware/tuxedo-keyboard.nix @@ -8,23 +8,23 @@ let in { options.hardware.tuxedo-keyboard = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' Enables the tuxedo-keyboard driver. - To configure the driver, pass the options to the configuration. + To configure the driver, pass the options to the {option}`boot.kernelParams` configuration. There are several parameters you can change. It's best to check at the source code description which options are supported. - You can find all the supported parameters at: + You can find all the supported parameters at: - In order to use the custom lighting with the maximumg brightness and a color of 0xff0a0a one would put pass like this: + In order to use the `custom` lighting with the maximumg brightness and a color of `0xff0a0a` one would put pass {option}`boot.kernelParams` like this: - + ``` boot.kernelParams = [ "tuxedo_keyboard.mode=0" "tuxedo_keyboard.brightness=255" "tuxedo_keyboard.color_left=0xff0a0a" ]; - - ''; + ``` + ''); }; config = mkIf cfg.enable diff --git a/nixos/modules/hardware/ubertooth.nix b/nixos/modules/hardware/ubertooth.nix index e76fa45fea5..4b87abe5beb 100644 --- a/nixos/modules/hardware/ubertooth.nix +++ b/nixos/modules/hardware/ubertooth.nix @@ -10,7 +10,7 @@ let }; in { options.hardware.ubertooth = { - enable = mkEnableOption "Enable the Ubertooth software and its udev rules."; + enable = mkEnableOption (lib.mdDoc "Enable the Ubertooth software and its udev rules."); group = mkOption { type = types.str; diff --git a/nixos/modules/hardware/uinput.nix b/nixos/modules/hardware/uinput.nix index 55e86bfa6bd..15fa66b8d83 100644 --- a/nixos/modules/hardware/uinput.nix +++ b/nixos/modules/hardware/uinput.nix @@ -4,7 +4,7 @@ let cfg = config.hardware.uinput; in { options.hardware.uinput = { - enable = lib.mkEnableOption "uinput support"; + enable = lib.mkEnableOption (lib.mdDoc "uinput support"); }; config = lib.mkIf cfg.enable { diff --git a/nixos/modules/hardware/video/capture/mwprocapture.nix b/nixos/modules/hardware/video/capture/mwprocapture.nix index 76cb4c6ee9b..ddd3f3ec7f3 100644 --- a/nixos/modules/hardware/video/capture/mwprocapture.nix +++ b/nixos/modules/hardware/video/capture/mwprocapture.nix @@ -12,7 +12,7 @@ in { - options.hardware.mwProCapture.enable = mkEnableOption "Magewell Pro Capture family kernel module"; + options.hardware.mwProCapture.enable = mkEnableOption (lib.mdDoc "Magewell Pro Capture family kernel module"); config = mkIf cfg.enable { diff --git a/nixos/modules/hardware/video/hidpi.nix b/nixos/modules/hardware/video/hidpi.nix index 1cb4470f1b3..8c8f8bc0c26 100644 --- a/nixos/modules/hardware/video/hidpi.nix +++ b/nixos/modules/hardware/video/hidpi.nix @@ -2,7 +2,7 @@ with lib; { - options.hardware.video.hidpi.enable = mkEnableOption "Font/DPI configuration optimized for HiDPI displays"; + options.hardware.video.hidpi.enable = mkEnableOption (lib.mdDoc "Font/DPI configuration optimized for HiDPI displays"); config = mkIf config.hardware.video.hidpi.enable { console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz"; diff --git a/nixos/modules/hardware/video/switcheroo-control.nix b/nixos/modules/hardware/video/switcheroo-control.nix index 199adb2ad8f..982388f8e5f 100644 --- a/nixos/modules/hardware/video/switcheroo-control.nix +++ b/nixos/modules/hardware/video/switcheroo-control.nix @@ -6,7 +6,7 @@ let cfg = config.services.switcherooControl; in { options.services.switcherooControl = { - enable = mkEnableOption "switcheroo-control, a D-Bus service to check the availability of dual-GPU"; + enable = mkEnableOption (lib.mdDoc "switcheroo-control, a D-Bus service to check the availability of dual-GPU"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/hardware/video/webcam/facetimehd.nix b/nixos/modules/hardware/video/webcam/facetimehd.nix index 8940674ce53..480c636aa0d 100644 --- a/nixos/modules/hardware/video/webcam/facetimehd.nix +++ b/nixos/modules/hardware/video/webcam/facetimehd.nix @@ -12,7 +12,7 @@ in { - options.hardware.facetimehd.enable = mkEnableOption "facetimehd kernel module"; + options.hardware.facetimehd.enable = mkEnableOption (lib.mdDoc "facetimehd kernel module"); options.hardware.facetimehd.withCalibration = mkOption { default = false; diff --git a/nixos/modules/hardware/wooting.nix b/nixos/modules/hardware/wooting.nix index ee550cbbf6b..2843dbfd7b2 100644 --- a/nixos/modules/hardware/wooting.nix +++ b/nixos/modules/hardware/wooting.nix @@ -3,7 +3,7 @@ with lib; { options.hardware.wooting.enable = - mkEnableOption "Enable support for Wooting keyboards"; + mkEnableOption (lib.mdDoc "Enable support for Wooting keyboards"); config = mkIf config.hardware.wooting.enable { environment.systemPackages = [ pkgs.wootility ]; diff --git a/nixos/modules/hardware/xone.nix b/nixos/modules/hardware/xone.nix index 89690d8c6fb..211d3fce867 100644 --- a/nixos/modules/hardware/xone.nix +++ b/nixos/modules/hardware/xone.nix @@ -6,7 +6,7 @@ let in { options.hardware.xone = { - enable = mkEnableOption "the xone driver for Xbox One and Xbobx Series X|S accessories"; + enable = mkEnableOption (lib.mdDoc "the xone driver for Xbox One and Xbobx Series X|S accessories"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/hardware/xpadneo.nix b/nixos/modules/hardware/xpadneo.nix index 092f36729b3..1e43794dc0f 100644 --- a/nixos/modules/hardware/xpadneo.nix +++ b/nixos/modules/hardware/xpadneo.nix @@ -6,7 +6,7 @@ let in { options.hardware.xpadneo = { - enable = mkEnableOption "the xpadneo driver for Xbox One wireless controllers"; + enable = mkEnableOption (lib.mdDoc "the xpadneo driver for Xbox One wireless controllers"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/i18n/input-method/default.nix b/nixos/modules/i18n/input-method/default.nix index bbc5783565a..07fb86bcc25 100644 --- a/nixos/modules/i18n/input-method/default.nix +++ b/nixos/modules/i18n/input-method/default.nix @@ -32,22 +32,20 @@ in type = types.nullOr (types.enum [ "ibus" "fcitx" "fcitx5" "nabi" "uim" "hime" "kime" ]); default = null; example = "fcitx"; - description = '' + description = lib.mdDoc '' Select the enabled input method. Input methods is a software to input symbols that are not available on standard input devices. Input methods are specially used to input Chinese, Japanese and Korean characters. Currently the following input methods are available in NixOS: - - ibus: The intelligent input bus, extra input engines can be added using i18n.inputMethod.ibus.engines. - fcitx: A customizable lightweight input method, extra input engines can be added using i18n.inputMethod.fcitx.engines. - fcitx5: The next generation of fcitx, addons (including engines, dictionaries, skins) can be added using i18n.inputMethod.fcitx5.addons. - nabi: A Korean input method based on XIM. Nabi doesn't support Qt 5. - uim: The universal input method, is a library with a XIM bridge. uim mainly support Chinese, Japanese and Korean. - hime: An extremely easy-to-use input method framework. - kime: Koream IME. - + - ibus: The intelligent input bus, extra input engines can be added using `i18n.inputMethod.ibus.engines`. + - fcitx: A customizable lightweight input method, extra input engines can be added using `i18n.inputMethod.fcitx.engines`. + - fcitx5: The next generation of fcitx, addons (including engines, dictionaries, skins) can be added using `i18n.inputMethod.fcitx5.addons`. + - nabi: A Korean input method based on XIM. Nabi doesn't support Qt 5. + - uim: The universal input method, is a library with a XIM bridge. uim mainly support Chinese, Japanese and Korean. + - hime: An extremely easy-to-use input method framework. + - kime: Koream IME. ''; }; @@ -55,7 +53,7 @@ in internal = true; type = types.nullOr types.path; default = null; - description = '' + description = lib.mdDoc '' The input method method package. ''; }; diff --git a/nixos/modules/i18n/input-method/fcitx5.nix b/nixos/modules/i18n/input-method/fcitx5.nix index 7cdef9ae932..aa816c90a3d 100644 --- a/nixos/modules/i18n/input-method/fcitx5.nix +++ b/nixos/modules/i18n/input-method/fcitx5.nix @@ -20,7 +20,7 @@ in { ''; }; - enableRimeData = mkEnableOption "default rime-data with fcitx5-rime"; + enableRimeData = mkEnableOption (lib.mdDoc "default rime-data with fcitx5-rime"); }; }; diff --git a/nixos/modules/installer/sd-card/sd-image.nix b/nixos/modules/installer/sd-card/sd-image.nix index e192312649e..cb2522d8678 100644 --- a/nixos/modules/installer/sd-card/sd-image.nix +++ b/nixos/modules/installer/sd-card/sd-image.nix @@ -58,7 +58,7 @@ in firmwarePartitionOffset = mkOption { type = types.int; default = 8; - description = '' + description = lib.mdDoc '' Gap in front of the /boot/firmware partition, in mebibytes (1024×1024 bytes). Can be increased to make more space for boards requiring to dd u-boot diff --git a/nixos/modules/misc/assertions.nix b/nixos/modules/misc/assertions.nix index 550b3ac97f6..364bb02be82 100644 --- a/nixos/modules/misc/assertions.nix +++ b/nixos/modules/misc/assertions.nix @@ -11,7 +11,7 @@ with lib; internal = true; default = []; example = [ { assertion = false; message = "you can't enable this for that reason"; } ]; - description = '' + description = lib.mdDoc '' This option allows modules to express conditions that must hold for the evaluation of the system configuration to succeed, along with associated error messages for the user. @@ -23,7 +23,7 @@ with lib; default = []; type = types.listOf types.str; example = [ "The `foo' service is deprecated and will go away soon!" ]; - description = '' + description = lib.mdDoc '' This option allows modules to show warnings to users during the evaluation of the system configuration. ''; diff --git a/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix index 251a361a580..5dcdc8f96c4 100644 --- a/nixos/modules/misc/documentation.nix +++ b/nixos/modules/misc/documentation.nix @@ -226,15 +226,14 @@ in nixos.enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to install NixOS's own documentation. - - This includes man pages like - configuration.nix5 if is - set. - This includes the HTML manual and the nixos-help command if - is set. - + + - This includes man pages like + {manpage}`configuration.nix(5)` if {option}`documentation.man.enable` is + set. + - This includes the HTML manual and the {command}`nixos-help` command if + {option}`documentation.doc.enable` is set. ''; }; diff --git a/nixos/modules/misc/documentation/test.nix b/nixos/modules/misc/documentation/test.nix index 1eaa63b1fb6..dd1588abdb4 100644 --- a/nixos/modules/misc/documentation/test.nix +++ b/nixos/modules/misc/documentation/test.nix @@ -30,7 +30,7 @@ let specialArgs.someArg.myModule = { lib, ... }: { options.foobar = lib.mkOption { type = lib.types.str; - description = "The foobar option was added via specialArgs"; + description = lib.mdDoc "The foobar option was added via specialArgs"; default = "qux"; }; }; diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 38ab338aa56..cbc3b612059 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -19,7 +19,7 @@ in ids.uids = lib.mkOption { internal = true; - description = '' + description = lib.mdDoc '' The user IDs used in NixOS. ''; type = types.attrsOf types.int; @@ -27,7 +27,7 @@ in ids.gids = lib.mkOption { internal = true; - description = '' + description = lib.mdDoc '' The group IDs used in NixOS. ''; type = types.attrsOf types.int; diff --git a/nixos/modules/misc/label.nix b/nixos/modules/misc/label.nix index b97cbaa2630..0c29d13aab1 100644 --- a/nixos/modules/misc/label.nix +++ b/nixos/modules/misc/label.nix @@ -12,7 +12,7 @@ in nixos.label = mkOption { type = types.strMatching "[a-zA-Z0-9:_\\.-]*"; - description = '' + description = lib.mdDoc '' NixOS version name to be used in the names of generated outputs and boot labels. @@ -20,25 +20,26 @@ in this is the option for you. It can only contain letters, numbers and the following symbols: - :, _, . and -. + `:`, `_`, `.` and `-`. - The default is separated by - "-" + "-" + NIXOS_LABEL_VERSION environment + The default is {option}`system.nixos.tags` separated by + "-" + "-" + {env}`NIXOS_LABEL_VERSION` environment variable (defaults to the value of - ). + {option}`system.nixos.version`). - Can be overriden by setting NIXOS_LABEL. + Can be overriden by setting {env}`NIXOS_LABEL`. Useful for not loosing track of configurations built from different nixos branches/revisions, e.g.: - + ``` #!/bin/sh today=`date +%Y%m%d` branch=`(cd nixpkgs ; git branch 2>/dev/null | sed -n '/^\* / { s|^\* ||; p; }')` revision=`(cd nixpkgs ; git rev-parse HEAD)` export NIXOS_LABEL_VERSION="$today.$branch-''${revision:0:7}" - nixos-rebuild switch + nixos-rebuild switch + ``` ''; }; @@ -46,19 +47,19 @@ in type = types.listOf types.str; default = []; example = [ "with-xen" ]; - description = '' + description = lib.mdDoc '' Strings to prefix to the default - . + {option}`system.nixos.label`. Useful for not loosing track of configurations built with different options, e.g.: - + ``` { system.nixos.tags = [ "with-xen" ]; virtualisation.xen.enable = true; } - + ``` ''; }; diff --git a/nixos/modules/misc/man-db.nix b/nixos/modules/misc/man-db.nix index d267ad12564..524199ac409 100644 --- a/nixos/modules/misc/man-db.nix +++ b/nixos/modules/misc/man-db.nix @@ -7,7 +7,7 @@ in { options = { documentation.man.man-db = { - enable = lib.mkEnableOption "man-db as the default man page viewer" // { + enable = lib.mkEnableOption (lib.mdDoc "man-db as the default man page viewer") // { default = config.documentation.man.enable; defaultText = lib.literalExpression "config.documentation.man.enable"; example = false; diff --git a/nixos/modules/misc/mandoc.nix b/nixos/modules/misc/mandoc.nix index d67c42bff6a..9bcef5b1a09 100644 --- a/nixos/modules/misc/mandoc.nix +++ b/nixos/modules/misc/mandoc.nix @@ -10,7 +10,7 @@ in { options = { documentation.man.mandoc = { - enable = lib.mkEnableOption "mandoc as the default man page viewer"; + enable = lib.mkEnableOption (lib.mdDoc "mandoc as the default man page viewer"); manPath = lib.mkOption { type = with lib.types; listOf str; diff --git a/nixos/modules/misc/meta.nix b/nixos/modules/misc/meta.nix index 8e689a63f6b..e1d16f802ce 100644 --- a/nixos/modules/misc/meta.nix +++ b/nixos/modules/misc/meta.nix @@ -38,7 +38,7 @@ in internal = true; default = []; example = literalExpression ''[ lib.maintainers.all ]''; - description = '' + description = lib.mdDoc '' List of maintainers of each module. This option should be defined at most once per module. ''; @@ -48,7 +48,7 @@ in type = docFile; internal = true; example = "./meta.chapter.xml"; - description = '' + description = lib.mdDoc '' Documentation prologue for the set of options of each module. This option should be defined at most once per module. ''; @@ -60,7 +60,7 @@ in }; internal = true; default = true; - description = '' + description = lib.mdDoc '' Whether to include this module in the split options doc build. Disable if the module references `config`, `pkgs` or other module arguments that cannot be evaluated as constants. diff --git a/nixos/modules/misc/nixops-autoluks.nix b/nixos/modules/misc/nixops-autoluks.nix index 20c143286af..221b34f3cc3 100644 --- a/nixos/modules/misc/nixops-autoluks.nix +++ b/nixos/modules/misc/nixops-autoluks.nix @@ -5,7 +5,7 @@ let inherit (config.nixops) enableDeprecatedAutoLuks; in { - options.nixops.enableDeprecatedAutoLuks = lib.mkEnableOption "Enable the deprecated NixOps AutoLuks module"; + options.nixops.enableDeprecatedAutoLuks = lib.mkEnableOption (lib.mdDoc "Enable the deprecated NixOps AutoLuks module"); config = { assertions = [ diff --git a/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix index 127f37b0df0..80b8ef591d3 100644 --- a/nixos/modules/misc/nixpkgs.nix +++ b/nixos/modules/misc/nixpkgs.nix @@ -311,26 +311,26 @@ in defaultText = lib.literalMD '' Traditionally `builtins.currentSystem`, but unset when invoking NixOS through `lib.nixosSystem`. ''; - description = '' + description = lib.mdDoc '' This option does not need to be specified for NixOS configurations - with a recently generated hardware-configuration.nix. + with a recently generated `hardware-configuration.nix`. Specifies the Nix platform type on which NixOS should be built. - It is better to specify nixpkgs.localSystem instead. - + It is better to specify `nixpkgs.localSystem` instead. + ``` { nixpkgs.system = ..; } - + ``` is the same as - + ``` { nixpkgs.localSystem.system = ..; } - - See nixpkgs.localSystem for more information. + ``` + See `nixpkgs.localSystem` for more information. - Ignored when nixpkgs.pkgs, nixpkgs.localSystem or nixpkgs.hostPlatform is set. + Ignored when `nixpkgs.pkgs`, `nixpkgs.localSystem` or `nixpkgs.hostPlatform` is set. ''; }; }; diff --git a/nixos/modules/misc/passthru.nix b/nixos/modules/misc/passthru.nix index 4e99631fdd8..beb9d782903 100644 --- a/nixos/modules/misc/passthru.nix +++ b/nixos/modules/misc/passthru.nix @@ -7,7 +7,7 @@ options = { passthru = lib.mkOption { visible = false; - description = '' + description = lib.mdDoc '' This attribute set will be exported as a system attribute. You can put whatever you want here. ''; diff --git a/nixos/modules/misc/wordlist.nix b/nixos/modules/misc/wordlist.nix index 72ef226ca65..f01fcb6f5a9 100644 --- a/nixos/modules/misc/wordlist.nix +++ b/nixos/modules/misc/wordlist.nix @@ -8,7 +8,7 @@ in { options = { environment.wordlist = { - enable = mkEnableOption "environment variables for lists of words"; + enable = mkEnableOption (lib.mdDoc "environment variables for lists of words"); lists = mkOption { type = types.attrsOf (types.nonEmptyListOf types.path); diff --git a/nixos/modules/programs/_1password-gui.nix b/nixos/modules/programs/_1password-gui.nix index 20bd846d516..83ef6037fb5 100644 --- a/nixos/modules/programs/_1password-gui.nix +++ b/nixos/modules/programs/_1password-gui.nix @@ -16,7 +16,7 @@ in options = { programs._1password-gui = { - enable = mkEnableOption "the 1Password GUI application"; + enable = mkEnableOption (lib.mdDoc "the 1Password GUI application"); polkitPolicyOwners = mkOption { type = types.listOf types.str; diff --git a/nixos/modules/programs/_1password.nix b/nixos/modules/programs/_1password.nix index b87e9b776e8..91246150755 100644 --- a/nixos/modules/programs/_1password.nix +++ b/nixos/modules/programs/_1password.nix @@ -16,7 +16,7 @@ in options = { programs._1password = { - enable = mkEnableOption "the 1Password CLI tool"; + enable = mkEnableOption (lib.mdDoc "the 1Password CLI tool"); package = mkPackageOption pkgs "1Password CLI" { default = [ "_1password" ]; diff --git a/nixos/modules/programs/appgate-sdp.nix b/nixos/modules/programs/appgate-sdp.nix index 12cb542f4d0..bdd538dc2f1 100644 --- a/nixos/modules/programs/appgate-sdp.nix +++ b/nixos/modules/programs/appgate-sdp.nix @@ -5,7 +5,7 @@ with lib; { options = { programs.appgate-sdp = { - enable = mkEnableOption "AppGate SDP VPN client"; + enable = mkEnableOption (lib.mdDoc "AppGate SDP VPN client"); }; }; diff --git a/nixos/modules/programs/atop.nix b/nixos/modules/programs/atop.nix index a0763d2dcf6..2b14d7c7343 100644 --- a/nixos/modules/programs/atop.nix +++ b/nixos/modules/programs/atop.nix @@ -14,7 +14,7 @@ in programs.atop = rec { - enable = mkEnableOption "Atop"; + enable = mkEnableOption (lib.mdDoc "Atop"); package = mkOption { type = types.package; diff --git a/nixos/modules/programs/bash-my-aws.nix b/nixos/modules/programs/bash-my-aws.nix index 15e429a7549..10f16cae651 100644 --- a/nixos/modules/programs/bash-my-aws.nix +++ b/nixos/modules/programs/bash-my-aws.nix @@ -13,7 +13,7 @@ in { options = { programs.bash-my-aws = { - enable = mkEnableOption "bash-my-aws"; + enable = mkEnableOption (lib.mdDoc "bash-my-aws"); }; }; diff --git a/nixos/modules/programs/bash/bash-completion.nix b/nixos/modules/programs/bash/bash-completion.nix index b8e5b1bfa33..96fbe0126d6 100644 --- a/nixos/modules/programs/bash/bash-completion.nix +++ b/nixos/modules/programs/bash/bash-completion.nix @@ -7,7 +7,7 @@ let in { options = { - programs.bash.enableCompletion = mkEnableOption "Bash completion for all interactive bash shells" // { + programs.bash.enableCompletion = mkEnableOption (lib.mdDoc "Bash completion for all interactive bash shells") // { default = true; }; }; diff --git a/nixos/modules/programs/bash/ls-colors.nix b/nixos/modules/programs/bash/ls-colors.nix index 254ee14c477..6a5253a3cca 100644 --- a/nixos/modules/programs/bash/ls-colors.nix +++ b/nixos/modules/programs/bash/ls-colors.nix @@ -7,7 +7,7 @@ let in { options = { - programs.bash.enableLsColors = mkEnableOption "extra colors in directory listings" // { + programs.bash.enableLsColors = mkEnableOption (lib.mdDoc "extra colors in directory listings") // { default = true; }; }; diff --git a/nixos/modules/programs/bash/undistract-me.nix b/nixos/modules/programs/bash/undistract-me.nix index 8d1b1740f64..587b649377d 100644 --- a/nixos/modules/programs/bash/undistract-me.nix +++ b/nixos/modules/programs/bash/undistract-me.nix @@ -8,9 +8,9 @@ in { options = { programs.bash.undistractMe = { - enable = mkEnableOption "notifications when long-running terminal commands complete"; + enable = mkEnableOption (lib.mdDoc "notifications when long-running terminal commands complete"); - playSound = mkEnableOption "notification sounds when long-running terminal commands complete"; + playSound = mkEnableOption (lib.mdDoc "notification sounds when long-running terminal commands complete"); timeout = mkOption { default = 10; diff --git a/nixos/modules/programs/bcc.nix b/nixos/modules/programs/bcc.nix index e475c6ceaa6..ff29d56bedb 100644 --- a/nixos/modules/programs/bcc.nix +++ b/nixos/modules/programs/bcc.nix @@ -1,6 +1,6 @@ { config, pkgs, lib, ... }: { - options.programs.bcc.enable = lib.mkEnableOption "bcc"; + options.programs.bcc.enable = lib.mkEnableOption (lib.mdDoc "bcc"); config = lib.mkIf config.programs.bcc.enable { environment.systemPackages = [ pkgs.bcc ]; diff --git a/nixos/modules/programs/browserpass.nix b/nixos/modules/programs/browserpass.nix index e1456d3c184..346d38e5e88 100644 --- a/nixos/modules/programs/browserpass.nix +++ b/nixos/modules/programs/browserpass.nix @@ -4,7 +4,7 @@ with lib; { - options.programs.browserpass.enable = mkEnableOption "Browserpass native messaging host"; + options.programs.browserpass.enable = mkEnableOption (lib.mdDoc "Browserpass native messaging host"); config = mkIf config.programs.browserpass.enable { environment.etc = let diff --git a/nixos/modules/programs/calls.nix b/nixos/modules/programs/calls.nix index 08a223b408d..7a18982915a 100644 --- a/nixos/modules/programs/calls.nix +++ b/nixos/modules/programs/calls.nix @@ -7,9 +7,9 @@ let in { options = { programs.calls = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' Whether to enable GNOME calls: a phone dialer and call handler. - ''; + ''); }; }; diff --git a/nixos/modules/programs/captive-browser.nix b/nixos/modules/programs/captive-browser.nix index fd8400315af..36ceb1a6961 100644 --- a/nixos/modules/programs/captive-browser.nix +++ b/nixos/modules/programs/captive-browser.nix @@ -34,7 +34,7 @@ in options = { programs.captive-browser = { - enable = mkEnableOption "captive browser"; + enable = mkEnableOption (lib.mdDoc "captive browser"); package = mkOption { type = types.package; diff --git a/nixos/modules/programs/ccache.nix b/nixos/modules/programs/ccache.nix index a554109533b..19fb7ca3294 100644 --- a/nixos/modules/programs/ccache.nix +++ b/nixos/modules/programs/ccache.nix @@ -6,7 +6,7 @@ let in { options.programs.ccache = { # host configuration - enable = mkEnableOption "CCache"; + enable = mkEnableOption (lib.mdDoc "CCache"); cacheDir = mkOption { type = types.path; description = lib.mdDoc "CCache directory"; diff --git a/nixos/modules/programs/cfs-zen-tweaks.nix b/nixos/modules/programs/cfs-zen-tweaks.nix index f168662bbef..97c2570475c 100644 --- a/nixos/modules/programs/cfs-zen-tweaks.nix +++ b/nixos/modules/programs/cfs-zen-tweaks.nix @@ -17,7 +17,7 @@ in }; options = { - programs.cfs-zen-tweaks.enable = mkEnableOption "CFS Zen Tweaks"; + programs.cfs-zen-tweaks.enable = mkEnableOption (lib.mdDoc "CFS Zen Tweaks"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/programs/chromium.nix b/nixos/modules/programs/chromium.nix index 58ead42daf5..4024f337dfc 100644 --- a/nixos/modules/programs/chromium.nix +++ b/nixos/modules/programs/chromium.nix @@ -19,7 +19,7 @@ in options = { programs.chromium = { - enable = mkEnableOption "chromium policies"; + enable = mkEnableOption (lib.mdDoc "{command}`chromium` policies"); extensions = mkOption { type = types.listOf types.str; diff --git a/nixos/modules/programs/cnping.nix b/nixos/modules/programs/cnping.nix index d208d2b0704..d3cf659d429 100644 --- a/nixos/modules/programs/cnping.nix +++ b/nixos/modules/programs/cnping.nix @@ -8,7 +8,7 @@ in { options = { programs.cnping = { - enable = mkEnableOption "Whether to install a setcap wrapper for cnping"; + enable = mkEnableOption (lib.mdDoc "Whether to install a setcap wrapper for cnping"); }; }; diff --git a/nixos/modules/programs/dconf.nix b/nixos/modules/programs/dconf.nix index b5ef42a3b72..7261a143528 100644 --- a/nixos/modules/programs/dconf.nix +++ b/nixos/modules/programs/dconf.nix @@ -28,7 +28,7 @@ in options = { programs.dconf = { - enable = mkEnableOption "dconf"; + enable = mkEnableOption (lib.mdDoc "dconf"); profiles = mkOption { type = types.attrsOf types.path; diff --git a/nixos/modules/programs/droidcam.nix b/nixos/modules/programs/droidcam.nix index 9843a1f5be2..c9b4457d1d1 100644 --- a/nixos/modules/programs/droidcam.nix +++ b/nixos/modules/programs/droidcam.nix @@ -4,7 +4,7 @@ with lib; { options.programs.droidcam = { - enable = mkEnableOption "DroidCam client"; + enable = mkEnableOption (lib.mdDoc "DroidCam client"); }; config = lib.mkIf config.programs.droidcam.enable { diff --git a/nixos/modules/programs/evince.nix b/nixos/modules/programs/evince.nix index bbc54241d52..9ed5ea0feb0 100644 --- a/nixos/modules/programs/evince.nix +++ b/nixos/modules/programs/evince.nix @@ -22,7 +22,7 @@ in { programs.evince = { enable = mkEnableOption - "Evince, the GNOME document viewer"; + (lib.mdDoc "Evince, the GNOME document viewer"); package = mkOption { type = types.package; diff --git a/nixos/modules/programs/extra-container.nix b/nixos/modules/programs/extra-container.nix index c10ccd76916..5e717c4d822 100644 --- a/nixos/modules/programs/extra-container.nix +++ b/nixos/modules/programs/extra-container.nix @@ -5,10 +5,10 @@ let cfg = config.programs.extra-container; in { options = { - programs.extra-container.enable = mkEnableOption '' + programs.extra-container.enable = mkEnableOption (lib.mdDoc '' extra-container, a tool for running declarative NixOS containers without host system rebuilds - ''; + ''); }; config = mkIf cfg.enable { environment.systemPackages = [ pkgs.extra-container ]; diff --git a/nixos/modules/programs/feedbackd.nix b/nixos/modules/programs/feedbackd.nix index 7e6cf829467..cee8daa3146 100644 --- a/nixos/modules/programs/feedbackd.nix +++ b/nixos/modules/programs/feedbackd.nix @@ -7,11 +7,11 @@ let in { options = { programs.feedbackd = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' Whether to enable the feedbackd D-BUS service and udev rules. Your user needs to be in the `feedbackd` group to trigger effects. - ''; + ''); package = mkOption { description = lib.mdDoc '' Which feedbackd package to use. diff --git a/nixos/modules/programs/file-roller.nix b/nixos/modules/programs/file-roller.nix index ca2651becfe..ca0c4d1b2a2 100644 --- a/nixos/modules/programs/file-roller.nix +++ b/nixos/modules/programs/file-roller.nix @@ -21,7 +21,7 @@ in { programs.file-roller = { - enable = mkEnableOption "File Roller, an archive manager for GNOME"; + enable = mkEnableOption (lib.mdDoc "File Roller, an archive manager for GNOME"); package = mkOption { type = types.package; diff --git a/nixos/modules/programs/firejail.nix b/nixos/modules/programs/firejail.nix index 417eff91d3c..a98c15a0451 100644 --- a/nixos/modules/programs/firejail.nix +++ b/nixos/modules/programs/firejail.nix @@ -32,26 +32,26 @@ let in { options.programs.firejail = { - enable = mkEnableOption "firejail"; + enable = mkEnableOption (lib.mdDoc "firejail"); wrappedBinaries = mkOption { type = types.attrsOf (types.either types.path (types.submodule { options = { executable = mkOption { type = types.path; - description = "Executable to run sandboxed"; + description = lib.mdDoc "Executable to run sandboxed"; example = literalExpression ''"''${lib.getBin pkgs.firefox}/bin/firefox"''; }; profile = mkOption { type = types.nullOr types.path; default = null; - description = "Profile to use"; + description = lib.mdDoc "Profile to use"; example = literalExpression ''"''${pkgs.firejail}/etc/firejail/firefox.profile"''; }; extraArgs = mkOption { type = types.listOf types.str; default = []; - description = "Extra arguments to pass to firejail"; + description = lib.mdDoc "Extra arguments to pass to firejail"; example = [ "--private=~/.firejail_home" ]; }; }; diff --git a/nixos/modules/programs/flexoptix-app.nix b/nixos/modules/programs/flexoptix-app.nix index e87d1076508..2524e7ba4d5 100644 --- a/nixos/modules/programs/flexoptix-app.nix +++ b/nixos/modules/programs/flexoptix-app.nix @@ -7,7 +7,7 @@ let in { options = { programs.flexoptix-app = { - enable = mkEnableOption "FLEXOPTIX app + udev rules"; + enable = mkEnableOption (lib.mdDoc "FLEXOPTIX app + udev rules"); package = mkOption { description = lib.mdDoc "FLEXOPTIX app package to use"; diff --git a/nixos/modules/programs/gamemode.nix b/nixos/modules/programs/gamemode.nix index 84e20934edb..c43e2c2296f 100644 --- a/nixos/modules/programs/gamemode.nix +++ b/nixos/modules/programs/gamemode.nix @@ -10,9 +10,9 @@ in { options = { programs.gamemode = { - enable = mkEnableOption "GameMode to optimise system performance on demand"; + enable = mkEnableOption (lib.mdDoc "GameMode to optimise system performance on demand"); - enableRenice = mkEnableOption "CAP_SYS_NICE on gamemoded to support lowering process niceness" // { + enableRenice = mkEnableOption (lib.mdDoc "CAP_SYS_NICE on gamemoded to support lowering process niceness") // { default = true; }; diff --git a/nixos/modules/programs/geary.nix b/nixos/modules/programs/geary.nix index 407680c30dc..d9454a2247f 100644 --- a/nixos/modules/programs/geary.nix +++ b/nixos/modules/programs/geary.nix @@ -11,7 +11,7 @@ in { }; options = { - programs.geary.enable = mkEnableOption "Geary, a Mail client for GNOME 3"; + programs.geary.enable = mkEnableOption (lib.mdDoc "Geary, a Mail client for GNOME 3"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/programs/git.nix b/nixos/modules/programs/git.nix index c4cf3cc561a..acff5dfdd88 100644 --- a/nixos/modules/programs/git.nix +++ b/nixos/modules/programs/git.nix @@ -9,7 +9,7 @@ in { options = { programs.git = { - enable = mkEnableOption "git"; + enable = mkEnableOption (lib.mdDoc "git"); package = mkOption { type = types.package; @@ -33,7 +33,7 @@ in }; lfs = { - enable = mkEnableOption "git-lfs"; + enable = mkEnableOption (lib.mdDoc "git-lfs"); package = mkOption { type = types.package; diff --git a/nixos/modules/programs/gnome-terminal.nix b/nixos/modules/programs/gnome-terminal.nix index 71a6b217880..a8d82e0b018 100644 --- a/nixos/modules/programs/gnome-terminal.nix +++ b/nixos/modules/programs/gnome-terminal.nix @@ -24,7 +24,7 @@ in ]; options = { - programs.gnome-terminal.enable = mkEnableOption "GNOME Terminal"; + programs.gnome-terminal.enable = mkEnableOption (lib.mdDoc "GNOME Terminal"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/programs/haguichi.nix b/nixos/modules/programs/haguichi.nix index 4f48551cf1d..699327c28c6 100644 --- a/nixos/modules/programs/haguichi.nix +++ b/nixos/modules/programs/haguichi.nix @@ -4,7 +4,7 @@ with lib; { options.programs.haguichi = { - enable = mkEnableOption "Haguichi, a Linux GUI frontend to the proprietary LogMeIn Hamachi"; + enable = mkEnableOption (lib.mdDoc "Haguichi, a Linux GUI frontend to the proprietary LogMeIn Hamachi"); }; config = mkIf config.programs.haguichi.enable { diff --git a/nixos/modules/programs/hamster.nix b/nixos/modules/programs/hamster.nix index 0bb56ad7ff3..f50438cc170 100644 --- a/nixos/modules/programs/hamster.nix +++ b/nixos/modules/programs/hamster.nix @@ -6,7 +6,7 @@ with lib; meta.maintainers = pkgs.hamster.meta.maintainers; options.programs.hamster.enable = - mkEnableOption "hamster, a time tracking program"; + mkEnableOption (lib.mdDoc "hamster, a time tracking program"); config = lib.mkIf config.programs.hamster.enable { environment.systemPackages = [ pkgs.hamster ]; diff --git a/nixos/modules/programs/htop.nix b/nixos/modules/programs/htop.nix index 94f6e3c0efa..521287f9352 100644 --- a/nixos/modules/programs/htop.nix +++ b/nixos/modules/programs/htop.nix @@ -26,7 +26,7 @@ in ''; }; - enable = mkEnableOption "htop process monitor"; + enable = mkEnableOption (lib.mdDoc "htop process monitor"); settings = mkOption { type = with types; attrsOf (oneOf [ str int bool (listOf (oneOf [ str int bool ])) ]); diff --git a/nixos/modules/programs/iftop.nix b/nixos/modules/programs/iftop.nix index c74714a9a6d..1db018858b6 100644 --- a/nixos/modules/programs/iftop.nix +++ b/nixos/modules/programs/iftop.nix @@ -6,7 +6,7 @@ let cfg = config.programs.iftop; in { options = { - programs.iftop.enable = mkEnableOption "iftop + setcap wrapper"; + programs.iftop.enable = mkEnableOption (lib.mdDoc "iftop + setcap wrapper"); }; config = mkIf cfg.enable { environment.systemPackages = [ pkgs.iftop ]; diff --git a/nixos/modules/programs/iotop.nix b/nixos/modules/programs/iotop.nix index b7c1c69f9dd..0eb60b989eb 100644 --- a/nixos/modules/programs/iotop.nix +++ b/nixos/modules/programs/iotop.nix @@ -6,7 +6,7 @@ let cfg = config.programs.iotop; in { options = { - programs.iotop.enable = mkEnableOption "iotop + setcap wrapper"; + programs.iotop.enable = mkEnableOption (lib.mdDoc "iotop + setcap wrapper"); }; config = mkIf cfg.enable { security.wrappers.iotop = { diff --git a/nixos/modules/programs/java.nix b/nixos/modules/programs/java.nix index 5994f53f76b..4f03c1f3ff2 100644 --- a/nixos/modules/programs/java.nix +++ b/nixos/modules/programs/java.nix @@ -15,20 +15,19 @@ in programs.java = { - enable = mkEnableOption "java" // { - description = '' + enable = mkEnableOption (lib.mdDoc "java") // { + description = lib.mdDoc '' Install and setup the Java development kit. - - This adds JAVA_HOME to the global environment, by sourcing the - jdk's setup-hook on shell init. It is equivalent to starting a shell - through 'nix-shell -p jdk', or roughly the following system-wide - configuration: - - - environment.variables.JAVA_HOME = ''${pkgs.jdk.home}/lib/openjdk; - environment.systemPackages = [ pkgs.jdk ]; - - + + ::: {.note} + This adds JAVA_HOME to the global environment, by sourcing the + jdk's setup-hook on shell init. It is equivalent to starting a shell + through 'nix-shell -p jdk', or roughly the following system-wide + configuration: + + environment.variables.JAVA_HOME = ''${pkgs.jdk.home}/lib/openjdk; + environment.systemPackages = [ pkgs.jdk ]; + ::: ''; }; diff --git a/nixos/modules/programs/k40-whisperer.nix b/nixos/modules/programs/k40-whisperer.nix index 305c828f0a8..27a79caa4b5 100644 --- a/nixos/modules/programs/k40-whisperer.nix +++ b/nixos/modules/programs/k40-whisperer.nix @@ -10,7 +10,7 @@ let in { options.programs.k40-whisperer = { - enable = mkEnableOption "K40-Whisperer"; + enable = mkEnableOption (lib.mdDoc "K40-Whisperer"); group = mkOption { type = types.str; diff --git a/nixos/modules/programs/kbdlight.nix b/nixos/modules/programs/kbdlight.nix index 8a2a0057cf2..6c3c79ddb4a 100644 --- a/nixos/modules/programs/kbdlight.nix +++ b/nixos/modules/programs/kbdlight.nix @@ -7,7 +7,7 @@ let in { - options.programs.kbdlight.enable = mkEnableOption "kbdlight"; + options.programs.kbdlight.enable = mkEnableOption (lib.mdDoc "kbdlight"); config = mkIf cfg.enable { environment.systemPackages = [ pkgs.kbdlight ]; diff --git a/nixos/modules/programs/kclock.nix b/nixos/modules/programs/kclock.nix index 42d81d2798b..049e237187e 100644 --- a/nixos/modules/programs/kclock.nix +++ b/nixos/modules/programs/kclock.nix @@ -4,7 +4,7 @@ let cfg = config.programs.kclock; kclockPkg = pkgs.libsForQt5.kclock; in { - options.programs.kclock = { enable = mkEnableOption "Enable KClock"; }; + options.programs.kclock = { enable = mkEnableOption (lib.mdDoc "Enable KClock"); }; config = mkIf cfg.enable { services.dbus.packages = [ kclockPkg ]; diff --git a/nixos/modules/programs/kdeconnect.nix b/nixos/modules/programs/kdeconnect.nix index 1f326c9e921..4978c428ce3 100644 --- a/nixos/modules/programs/kdeconnect.nix +++ b/nixos/modules/programs/kdeconnect.nix @@ -2,15 +2,15 @@ with lib; { options.programs.kdeconnect = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' kdeconnect. Note that it will open the TCP and UDP port from 1714 to 1764 as they are needed for it to function properly. - You can use the to use - gnomeExtensions.gsconnect as an alternative + You can use the {option}`package` to use + `gnomeExtensions.gsconnect` as an alternative implementation if you use Gnome. - ''; + ''); package = mkOption { default = pkgs.plasma5Packages.kdeconnect-kde; defaultText = literalExpression "pkgs.plasma5Packages.kdeconnect-kde"; diff --git a/nixos/modules/programs/less.nix b/nixos/modules/programs/less.nix index 9f2d5d91581..51a32639380 100644 --- a/nixos/modules/programs/less.nix +++ b/nixos/modules/programs/less.nix @@ -35,7 +35,7 @@ in # note that environment.nix sets PAGER=less, and # therefore also enables this module - enable = mkEnableOption "less"; + enable = mkEnableOption (lib.mdDoc "less"); configFile = mkOption { type = types.nullOr types.path; diff --git a/nixos/modules/programs/liboping.nix b/nixos/modules/programs/liboping.nix index 4433f9767d6..39e75ba90c9 100644 --- a/nixos/modules/programs/liboping.nix +++ b/nixos/modules/programs/liboping.nix @@ -6,7 +6,7 @@ let cfg = config.programs.liboping; in { options.programs.liboping = { - enable = mkEnableOption "liboping"; + enable = mkEnableOption (lib.mdDoc "liboping"); }; config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ liboping ]; diff --git a/nixos/modules/programs/mininet.nix b/nixos/modules/programs/mininet.nix index 2cf6c014c35..0b7e82cc5bd 100644 --- a/nixos/modules/programs/mininet.nix +++ b/nixos/modules/programs/mininet.nix @@ -28,7 +28,7 @@ let ''; in { - options.programs.mininet.enable = mkEnableOption "Mininet"; + options.programs.mininet.enable = mkEnableOption (lib.mdDoc "Mininet"); config = mkIf cfg.enable { diff --git a/nixos/modules/programs/msmtp.nix b/nixos/modules/programs/msmtp.nix index 023ffdd444b..a9aed027bdb 100644 --- a/nixos/modules/programs/msmtp.nix +++ b/nixos/modules/programs/msmtp.nix @@ -10,7 +10,7 @@ in { options = { programs.msmtp = { - enable = mkEnableOption "msmtp - an SMTP client"; + enable = mkEnableOption (lib.mdDoc "msmtp - an SMTP client"); setSendmail = mkOption { type = types.bool; diff --git a/nixos/modules/programs/nbd.nix b/nixos/modules/programs/nbd.nix index fea9bc1ff71..a44403021e3 100644 --- a/nixos/modules/programs/nbd.nix +++ b/nixos/modules/programs/nbd.nix @@ -8,7 +8,7 @@ in { options = { programs.nbd = { - enable = mkEnableOption "Network Block Device (nbd) support"; + enable = mkEnableOption (lib.mdDoc "Network Block Device (nbd) support"); }; }; diff --git a/nixos/modules/programs/neovim.nix b/nixos/modules/programs/neovim.nix index 85963159a72..31848c246f6 100644 --- a/nixos/modules/programs/neovim.nix +++ b/nixos/modules/programs/neovim.nix @@ -11,7 +11,7 @@ let in { options.programs.neovim = { - enable = mkEnableOption "Neovim"; + enable = mkEnableOption (lib.mdDoc "Neovim"); defaultEditor = mkOption { type = types.bool; @@ -89,7 +89,7 @@ in { type = types.package; visible = false; readOnly = true; - description = "Resulting customized neovim package."; + description = lib.mdDoc "Resulting customized neovim package."; }; runtime = mkOption { diff --git a/nixos/modules/programs/nix-ld.nix b/nixos/modules/programs/nix-ld.nix index 89779cfef39..602278d1ba9 100644 --- a/nixos/modules/programs/nix-ld.nix +++ b/nixos/modules/programs/nix-ld.nix @@ -2,7 +2,7 @@ { meta.maintainers = [ lib.maintainers.mic92 ]; options = { - programs.nix-ld.enable = lib.mkEnableOption ''nix-ld, Documentation: ''; + programs.nix-ld.enable = lib.mkEnableOption (lib.mdDoc ''nix-ld, Documentation: ''); }; config = lib.mkIf config.programs.nix-ld.enable { systemd.tmpfiles.packages = [ pkgs.nix-ld ]; diff --git a/nixos/modules/programs/nm-applet.nix b/nixos/modules/programs/nm-applet.nix index ef24030c9db..4b09b1884d7 100644 --- a/nixos/modules/programs/nm-applet.nix +++ b/nixos/modules/programs/nm-applet.nix @@ -6,7 +6,7 @@ }; options.programs.nm-applet = { - enable = lib.mkEnableOption "nm-applet"; + enable = lib.mkEnableOption (lib.mdDoc "nm-applet"); indicator = lib.mkOption { type = lib.types.bool; diff --git a/nixos/modules/programs/nncp.nix b/nixos/modules/programs/nncp.nix index a58748d2fe6..98fea84ab74 100644 --- a/nixos/modules/programs/nncp.nix +++ b/nixos/modules/programs/nncp.nix @@ -11,7 +11,7 @@ in { options.programs.nncp = { enable = - mkEnableOption "NNCP (Node to Node copy) utilities and configuration"; + mkEnableOption (lib.mdDoc "NNCP (Node to Node copy) utilities and configuration"); group = mkOption { type = types.str; diff --git a/nixos/modules/programs/noisetorch.nix b/nixos/modules/programs/noisetorch.nix index d5e004da73e..c022b01d79a 100644 --- a/nixos/modules/programs/noisetorch.nix +++ b/nixos/modules/programs/noisetorch.nix @@ -6,7 +6,7 @@ let cfg = config.programs.noisetorch; in { options.programs.noisetorch = { - enable = mkEnableOption "noisetorch + setcap wrapper"; + enable = mkEnableOption (lib.mdDoc "noisetorch + setcap wrapper"); package = mkOption { type = types.package; diff --git a/nixos/modules/programs/npm.nix b/nixos/modules/programs/npm.nix index 70943804834..48dc48e668f 100644 --- a/nixos/modules/programs/npm.nix +++ b/nixos/modules/programs/npm.nix @@ -11,7 +11,7 @@ in options = { programs.npm = { - enable = mkEnableOption "npm global config"; + enable = mkEnableOption (lib.mdDoc "{command}`npm` global config"); package = mkOption { type = types.package; diff --git a/nixos/modules/programs/openvpn3.nix b/nixos/modules/programs/openvpn3.nix index f3101d3cebd..df7e9ef22c1 100644 --- a/nixos/modules/programs/openvpn3.nix +++ b/nixos/modules/programs/openvpn3.nix @@ -7,7 +7,7 @@ let in { options.programs.openvpn3 = { - enable = mkEnableOption "the openvpn3 client"; + enable = mkEnableOption (lib.mdDoc "the openvpn3 client"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/programs/pantheon-tweaks.nix b/nixos/modules/programs/pantheon-tweaks.nix index 0b8a19ea22c..82f93619db1 100644 --- a/nixos/modules/programs/pantheon-tweaks.nix +++ b/nixos/modules/programs/pantheon-tweaks.nix @@ -9,7 +9,7 @@ with lib; ###### interface options = { - programs.pantheon-tweaks.enable = mkEnableOption "Pantheon Tweaks, an unofficial system settings panel for Pantheon"; + programs.pantheon-tweaks.enable = mkEnableOption (lib.mdDoc "Pantheon Tweaks, an unofficial system settings panel for Pantheon"); }; ###### implementation diff --git a/nixos/modules/programs/partition-manager.nix b/nixos/modules/programs/partition-manager.nix index 1be2f0a69a1..c18598b7c25 100644 --- a/nixos/modules/programs/partition-manager.nix +++ b/nixos/modules/programs/partition-manager.nix @@ -7,7 +7,7 @@ with lib; ###### interface options = { - programs.partition-manager.enable = mkEnableOption "KDE Partition Manager"; + programs.partition-manager.enable = mkEnableOption (lib.mdDoc "KDE Partition Manager"); }; ###### implementation diff --git a/nixos/modules/programs/proxychains.nix b/nixos/modules/programs/proxychains.nix index 5d932b2d842..0771f03c77d 100644 --- a/nixos/modules/programs/proxychains.nix +++ b/nixos/modules/programs/proxychains.nix @@ -22,7 +22,7 @@ let proxyOptions = { options = { - enable = mkEnableOption "this proxy"; + enable = mkEnableOption (lib.mdDoc "this proxy"); type = mkOption { type = types.enum [ "http" "socks4" "socks5" ]; @@ -49,7 +49,7 @@ in { programs.proxychains = { - enable = mkEnableOption "installing proxychains configuration"; + enable = mkEnableOption (lib.mdDoc "installing proxychains configuration"); chain = { type = mkOption { @@ -86,7 +86,7 @@ in { description = lib.mdDoc "Proxy DNS requests - no leak for DNS data."; }; - quietMode = mkEnableOption "Quiet mode (no output from the library)."; + quietMode = mkEnableOption (lib.mdDoc "Quiet mode (no output from the library)."); remoteDNSSubnet = mkOption { type = types.enum [ 10 127 224 ]; diff --git a/nixos/modules/programs/seahorse.nix b/nixos/modules/programs/seahorse.nix index c0a356bff57..5e179c1446e 100644 --- a/nixos/modules/programs/seahorse.nix +++ b/nixos/modules/programs/seahorse.nix @@ -20,7 +20,7 @@ with lib; programs.seahorse = { - enable = mkEnableOption "Seahorse, a GNOME application for managing encryption keys and passwords in the GNOME Keyring"; + enable = mkEnableOption (lib.mdDoc "Seahorse, a GNOME application for managing encryption keys and passwords in the GNOME Keyring"); }; diff --git a/nixos/modules/programs/sedutil.nix b/nixos/modules/programs/sedutil.nix index 7efc80f4abb..d5e20a8815d 100644 --- a/nixos/modules/programs/sedutil.nix +++ b/nixos/modules/programs/sedutil.nix @@ -6,7 +6,7 @@ let cfg = config.programs.sedutil; in { - options.programs.sedutil.enable = mkEnableOption "sedutil"; + options.programs.sedutil.enable = mkEnableOption (lib.mdDoc "sedutil"); config = mkIf cfg.enable { boot.kernelParams = [ diff --git a/nixos/modules/programs/singularity.nix b/nixos/modules/programs/singularity.nix index db935abe4bb..9648d0c2787 100644 --- a/nixos/modules/programs/singularity.nix +++ b/nixos/modules/programs/singularity.nix @@ -11,7 +11,7 @@ let }); in { options.programs.singularity = { - enable = mkEnableOption "Singularity"; + enable = mkEnableOption (lib.mdDoc "Singularity"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/programs/starship.nix b/nixos/modules/programs/starship.nix index ade80b9999e..b56c0b25616 100644 --- a/nixos/modules/programs/starship.nix +++ b/nixos/modules/programs/starship.nix @@ -11,7 +11,7 @@ let in { options.programs.starship = { - enable = mkEnableOption "the Starship shell prompt"; + enable = mkEnableOption (lib.mdDoc "the Starship shell prompt"); settings = mkOption { inherit (settingsFormat) type; diff --git a/nixos/modules/programs/steam.nix b/nixos/modules/programs/steam.nix index d80718e792a..adbbf5d9ed4 100644 --- a/nixos/modules/programs/steam.nix +++ b/nixos/modules/programs/steam.nix @@ -13,7 +13,7 @@ let }; in { options.programs.steam = { - enable = mkEnableOption "steam"; + enable = mkEnableOption (lib.mdDoc "steam"); remotePlay.openFirewall = mkOption { type = types.bool; diff --git a/nixos/modules/programs/streamdeck-ui.nix b/nixos/modules/programs/streamdeck-ui.nix index 04aa0a80e88..e933b899c55 100644 --- a/nixos/modules/programs/streamdeck-ui.nix +++ b/nixos/modules/programs/streamdeck-ui.nix @@ -6,7 +6,7 @@ let cfg = config.programs.streamdeck-ui; in { options.programs.streamdeck-ui = { - enable = mkEnableOption "streamdeck-ui"; + enable = mkEnableOption (lib.mdDoc "streamdeck-ui"); autoStart = mkOption { default = true; diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix index af2b261d3c5..971527e1e61 100644 --- a/nixos/modules/programs/sway.nix +++ b/nixos/modules/programs/sway.nix @@ -35,12 +35,12 @@ let }; in { options.programs.sway = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' Sway, the i3-compatible tiling Wayland compositor. You can manually launch Sway by executing "exec sway" on a TTY. Copy /etc/sway/config to ~/.config/sway/config to modify the default configuration. See - and - "man 5 sway" for more information''; + and + "man 5 sway" for more information''); wrapperFeatures = mkOption { type = wrapperOptions; diff --git a/nixos/modules/programs/sysdig.nix b/nixos/modules/programs/sysdig.nix index fbbf2906556..ccb1e1d4c5f 100644 --- a/nixos/modules/programs/sysdig.nix +++ b/nixos/modules/programs/sysdig.nix @@ -5,7 +5,7 @@ with lib; let cfg = config.programs.sysdig; in { - options.programs.sysdig.enable = mkEnableOption "sysdig"; + options.programs.sysdig.enable = mkEnableOption (lib.mdDoc "sysdig"); config = mkIf cfg.enable { environment.systemPackages = [ pkgs.sysdig ]; diff --git a/nixos/modules/programs/system-config-printer.nix b/nixos/modules/programs/system-config-printer.nix index 34592dd7064..7c7eea58054 100644 --- a/nixos/modules/programs/system-config-printer.nix +++ b/nixos/modules/programs/system-config-printer.nix @@ -10,7 +10,7 @@ with lib; programs.system-config-printer = { - enable = mkEnableOption "system-config-printer, a Graphical user interface for CUPS administration"; + enable = mkEnableOption (lib.mdDoc "system-config-printer, a Graphical user interface for CUPS administration"); }; diff --git a/nixos/modules/programs/thefuck.nix b/nixos/modules/programs/thefuck.nix index 6b939cce419..e057d1ca657 100644 --- a/nixos/modules/programs/thefuck.nix +++ b/nixos/modules/programs/thefuck.nix @@ -16,7 +16,7 @@ in { options = { programs.thefuck = { - enable = mkEnableOption "thefuck"; + enable = mkEnableOption (lib.mdDoc "thefuck"); alias = mkOption { default = "fuck"; diff --git a/nixos/modules/programs/thunar.nix b/nixos/modules/programs/thunar.nix index a67d8ae064d..cb85b3886c1 100644 --- a/nixos/modules/programs/thunar.nix +++ b/nixos/modules/programs/thunar.nix @@ -11,7 +11,7 @@ in { options = { programs.thunar = { - enable = mkEnableOption "Thunar, the Xfce file manager"; + enable = mkEnableOption (lib.mdDoc "Thunar, the Xfce file manager"); plugins = mkOption { default = []; diff --git a/nixos/modules/programs/tsm-client.nix b/nixos/modules/programs/tsm-client.nix index cdd70b7744b..89662cecaa4 100644 --- a/nixos/modules/programs/tsm-client.nix +++ b/nixos/modules/programs/tsm-client.nix @@ -65,18 +65,18 @@ let directive in {file}`dsm.sys`. ''; }; - options.genPasswd = mkEnableOption '' + options.genPasswd = mkEnableOption (lib.mdDoc '' automatic client password generation. This option influences the - passwordaccess - directive in dsm.sys. + `passwordaccess` + directive in {file}`dsm.sys`. The password will be stored in the directory - given by the option . - Caution: + given by the option {option}`passwdDir`. + *Caution*: If this option is enabled and the server forces to renew the password (e.g. on first connection), a random password will be generated and stored - ''; + ''); options.passwdDir = mkOption { type = path; example = "/home/alice/tsm-password"; @@ -140,7 +140,7 @@ let type = str; internal = true; visible = false; - description = "Server stanza text generated from the options."; + description = lib.mdDoc "Server stanza text generated from the options."; }; config.name = mkDefault name; # Client system-options file directives are explained here: @@ -172,11 +172,11 @@ let }; options.programs.tsmClient = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' IBM Spectrum Protect (Tivoli Storage Manager, TSM) client command line applications with a client system-options file "dsm.sys" - ''; + ''); servers = mkOption { type = attrsOf (submodule [ serverOptions ]); default = {}; diff --git a/nixos/modules/programs/udevil.nix b/nixos/modules/programs/udevil.nix index 0dc08c435df..b0f00b4b541 100644 --- a/nixos/modules/programs/udevil.nix +++ b/nixos/modules/programs/udevil.nix @@ -6,7 +6,7 @@ let cfg = config.programs.udevil; in { - options.programs.udevil.enable = mkEnableOption "udevil"; + options.programs.udevil.enable = mkEnableOption (lib.mdDoc "udevil"); config = mkIf cfg.enable { security.wrappers.udevil = diff --git a/nixos/modules/programs/usbtop.nix b/nixos/modules/programs/usbtop.nix index c1b6ee38caa..e262ae3745b 100644 --- a/nixos/modules/programs/usbtop.nix +++ b/nixos/modules/programs/usbtop.nix @@ -6,7 +6,7 @@ let cfg = config.programs.usbtop; in { options = { - programs.usbtop.enable = mkEnableOption "usbtop and required kernel module"; + programs.usbtop.enable = mkEnableOption (lib.mdDoc "usbtop and required kernel module"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/programs/waybar.nix b/nixos/modules/programs/waybar.nix index 22530e6c7d4..4697d0f7a62 100644 --- a/nixos/modules/programs/waybar.nix +++ b/nixos/modules/programs/waybar.nix @@ -4,7 +4,7 @@ with lib; { options.programs.waybar = { - enable = mkEnableOption "waybar"; + enable = mkEnableOption (lib.mdDoc "waybar"); }; config = mkIf config.programs.waybar.enable { diff --git a/nixos/modules/programs/weylus.nix b/nixos/modules/programs/weylus.nix index 0a506bfa278..eab8afdf2cc 100644 --- a/nixos/modules/programs/weylus.nix +++ b/nixos/modules/programs/weylus.nix @@ -7,7 +7,7 @@ let in { options.programs.weylus = with types; { - enable = mkEnableOption "weylus"; + enable = mkEnableOption (lib.mdDoc "weylus"); openFirewall = mkOption { type = bool; diff --git a/nixos/modules/programs/wshowkeys.nix b/nixos/modules/programs/wshowkeys.nix index f7b71d2bb0c..ebb5c550944 100644 --- a/nixos/modules/programs/wshowkeys.nix +++ b/nixos/modules/programs/wshowkeys.nix @@ -9,10 +9,10 @@ in { options = { programs.wshowkeys = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' wshowkeys (displays keypresses on screen on supported Wayland compositors). It requires root permissions to read input events, but - these permissions are dropped after startup''; + these permissions are dropped after startup''); }; }; diff --git a/nixos/modules/programs/xfconf.nix b/nixos/modules/programs/xfconf.nix index 8e854b40e51..b0f45339335 100644 --- a/nixos/modules/programs/xfconf.nix +++ b/nixos/modules/programs/xfconf.nix @@ -11,7 +11,7 @@ in { options = { programs.xfconf = { - enable = mkEnableOption "Xfconf, the Xfce configuration storage system"; + enable = mkEnableOption (lib.mdDoc "Xfconf, the Xfce configuration storage system"); }; }; diff --git a/nixos/modules/programs/xss-lock.nix b/nixos/modules/programs/xss-lock.nix index c14c09721d6..87b3957ab83 100644 --- a/nixos/modules/programs/xss-lock.nix +++ b/nixos/modules/programs/xss-lock.nix @@ -7,7 +7,7 @@ let in { options.programs.xss-lock = { - enable = mkEnableOption "xss-lock"; + enable = mkEnableOption (lib.mdDoc "xss-lock"); lockerCommand = mkOption { default = "${pkgs.i3lock}/bin/i3lock"; diff --git a/nixos/modules/programs/xwayland.nix b/nixos/modules/programs/xwayland.nix index 9296116dca8..8d13e4c22b5 100644 --- a/nixos/modules/programs/xwayland.nix +++ b/nixos/modules/programs/xwayland.nix @@ -10,7 +10,7 @@ in { options.programs.xwayland = { - enable = mkEnableOption "Xwayland (an X server for interfacing X11 apps with the Wayland protocol)"; + enable = mkEnableOption (lib.mdDoc "Xwayland (an X server for interfacing X11 apps with the Wayland protocol)"); defaultFontPath = mkOption { type = types.str; diff --git a/nixos/modules/programs/yabar.nix b/nixos/modules/programs/yabar.nix index c6eb0eb10c3..58ffe555715 100644 --- a/nixos/modules/programs/yabar.nix +++ b/nixos/modules/programs/yabar.nix @@ -41,7 +41,7 @@ let in { options.programs.yabar = { - enable = mkEnableOption "yabar"; + enable = mkEnableOption (lib.mdDoc "yabar"); package = mkOption { default = pkgs.yabar-unstable; diff --git a/nixos/modules/programs/zmap.nix b/nixos/modules/programs/zmap.nix index 2e27fce4d7c..056f7888306 100644 --- a/nixos/modules/programs/zmap.nix +++ b/nixos/modules/programs/zmap.nix @@ -6,7 +6,7 @@ let cfg = config.programs.zmap; in { options.programs.zmap = { - enable = mkEnableOption "ZMap"; + enable = mkEnableOption (lib.mdDoc "ZMap"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/programs/zsh/zsh-autoenv.nix b/nixos/modules/programs/zsh/zsh-autoenv.nix index 46fc4d49c59..be93c96b2bc 100644 --- a/nixos/modules/programs/zsh/zsh-autoenv.nix +++ b/nixos/modules/programs/zsh/zsh-autoenv.nix @@ -7,7 +7,7 @@ let in { options = { programs.zsh.zsh-autoenv = { - enable = mkEnableOption "zsh-autoenv"; + enable = mkEnableOption (lib.mdDoc "zsh-autoenv"); package = mkOption { default = pkgs.zsh-autoenv; defaultText = literalExpression "pkgs.zsh-autoenv"; diff --git a/nixos/modules/programs/zsh/zsh-autosuggestions.nix b/nixos/modules/programs/zsh/zsh-autosuggestions.nix index 92a3fc08137..d3a9c372e89 100644 --- a/nixos/modules/programs/zsh/zsh-autosuggestions.nix +++ b/nixos/modules/programs/zsh/zsh-autosuggestions.nix @@ -12,7 +12,7 @@ in options.programs.zsh.autosuggestions = { - enable = mkEnableOption "zsh-autosuggestions"; + enable = mkEnableOption (lib.mdDoc "zsh-autosuggestions"); highlightStyle = mkOption { type = types.str; diff --git a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix index 37e1c2ebc38..bc110134928 100644 --- a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix +++ b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix @@ -15,7 +15,7 @@ in options = { programs.zsh.syntaxHighlighting = { - enable = mkEnableOption "zsh-syntax-highlighting"; + enable = mkEnableOption (lib.mdDoc "zsh-syntax-highlighting"); highlighters = mkOption { default = [ "main" ]; diff --git a/nixos/modules/security/acme/default.nix b/nixos/modules/security/acme/default.nix index f85cf2fc121..377b543c581 100644 --- a/nixos/modules/security/acme/default.nix +++ b/nixos/modules/security/acme/default.nix @@ -457,7 +457,7 @@ let ''; }; - enableDebugLogs = mkEnableOption "debug logging for this certificate" // { + enableDebugLogs = mkEnableOption (lib.mdDoc "debug logging for this certificate") // { inherit (defaultAndText "enableDebugLogs" true) default defaultText; }; @@ -576,13 +576,12 @@ let ocspMustStaple = mkOption { type = types.bool; inherit (defaultAndText "ocspMustStaple" false) default defaultText; - description = '' + description = lib.mdDoc '' Turns on the OCSP Must-Staple TLS extension. Make sure you know what you're doing! See: - - - - + + - + - ''; }; diff --git a/nixos/modules/security/apparmor.nix b/nixos/modules/security/apparmor.nix index c4eca453254..0d858a45856 100644 --- a/nixos/modules/security/apparmor.nix +++ b/nixos/modules/security/apparmor.nix @@ -7,7 +7,7 @@ let inherit (lib) types; inherit (config.environment) etc; cfg = config.security.apparmor; - mkDisableOption = name: mkEnableOption name // { + mkDisableOption = name: mkEnableOption (lib.mdDoc name) // { default = true; example = false; }; @@ -24,7 +24,7 @@ in options = { security.apparmor = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' the AppArmor Mandatory Access Control system. If you're enabling this module on a running system, @@ -38,9 +38,9 @@ in introducing for the first time an AppArmor profile for the executable of a running process. - Enable + Enable [](#opt-security.apparmor.killUnconfinedConfinables) if you want this service to do such killing - by sending a SIGTERM to those running processes''; + by sending a `SIGTERM` to those running processes''); policies = mkOption { description = lib.mdDoc '' AppArmor policies. @@ -72,23 +72,23 @@ in default = []; description = lib.mdDoc "List of packages to be added to AppArmor's include path"; }; - enableCache = mkEnableOption '' + enableCache = mkEnableOption (lib.mdDoc '' caching of AppArmor policies - in /var/cache/apparmor/. + in `/var/cache/apparmor/`. Beware that AppArmor policies almost always contain Nix store paths, and thus produce at each change of these paths - a new cached version accumulating in the cache''; - killUnconfinedConfinables = mkEnableOption '' + a new cached version accumulating in the cache''); + killUnconfinedConfinables = mkEnableOption (lib.mdDoc '' killing of processes which have an AppArmor profile enabled - (in ) + (in [](#opt-security.apparmor.policies)) but are not confined (because AppArmor can only confine new processes). - This is only sending a gracious SIGTERM signal to the processes, - not a SIGKILL. + This is only sending a gracious `SIGTERM` signal to the processes, + not a `SIGKILL`. Beware that due to a current limitation of AppArmor, - only profiles with exact paths (and no name) can enable such kills''; + only profiles with exact paths (and no name) can enable such kills''); }; }; diff --git a/nixos/modules/security/auditd.nix b/nixos/modules/security/auditd.nix index 9d26cfbcfb1..db4b2701ee2 100644 --- a/nixos/modules/security/auditd.nix +++ b/nixos/modules/security/auditd.nix @@ -3,7 +3,7 @@ with lib; { - options.security.auditd.enable = mkEnableOption "the Linux Audit daemon"; + options.security.auditd.enable = mkEnableOption (lib.mdDoc "the Linux Audit daemon"); config = mkIf config.security.auditd.enable { boot.kernelParams = [ "audit=1" ]; diff --git a/nixos/modules/security/dhparams.nix b/nixos/modules/security/dhparams.nix index 93c9066dc95..9fed7e012b1 100644 --- a/nixos/modules/security/dhparams.nix +++ b/nixos/modules/security/dhparams.nix @@ -56,45 +56,53 @@ in { in attrsOf (coercedTo int coerce (submodule paramsSubmodule)); default = {}; example = lib.literalExpression "{ nginx.bits = 3072; }"; - description = '' + description = lib.mdDoc '' Diffie-Hellman parameters to generate. The value is the size (in bits) of the DH params to generate. The generated DH params path can be found in - config.security.dhparams.params.«name».path. + `config.security.dhparams.params.«name».path`. - The name of the DH params is taken as being the name of + ::: {.note} + The name of the DH params is taken as being the name of the service it serves and the params will be generated before the - said service is started. + said service is started. + ::: - If you are removing all dhparams from this list, you - have to leave for at + ::: {.warning} + If you are removing all dhparams from this list, you + have to leave {option}`security.dhparams.enable` for at least one activation in order to have them be cleaned up. This also means if you rollback to a version without any dhparams the existing ones won't be cleaned up. Of course this only applies if - is - true. + {option}`security.dhparams.stateful` is + `true`. + ::: - For module implementers:It's recommended + ::: {.note} + **For module implementers:** It's recommended to not set a specific bit size here, so that users can easily override this by setting - . + {option}`security.dhparams.defaultBitSize`. + ::: ''; }; stateful = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether generation of Diffie-Hellman parameters should be stateful or not. If this is enabled, PEM-encoded files for Diffie-Hellman parameters are placed in the directory specified by - . Otherwise the files are + {option}`security.dhparams.path`. Otherwise the files are created within the Nix store. - If this is false the resulting store + ::: {.note} + If this is `false` the resulting store path will be non-deterministic and will be rebuilt every time the - openssl package changes. + `openssl` package changes. + ::: ''; }; diff --git a/nixos/modules/security/misc.nix b/nixos/modules/security/misc.nix index 6833452a570..cd48eade778 100644 --- a/nixos/modules/security/misc.nix +++ b/nixos/modules/security/misc.nix @@ -83,34 +83,19 @@ with lib; security.virtualisation.flushL1DataCache = mkOption { type = types.nullOr (types.enum [ "never" "cond" "always" ]); default = null; - description = '' + description = lib.mdDoc '' Whether the hypervisor should flush the L1 data cache before entering guests. - See also . + See also [](#opt-security.allowSimultaneousMultithreading). - - - null - uses the kernel default - - - "never" - disables L1 data cache flushing entirely. - May be appropriate if all guests are trusted. - - - "cond" - flushes L1 data cache only for pre-determined - code paths. May leak information about the host address space - layout. - - - "always" - flushes L1 data cache every time the hypervisor - enters the guest. May incur significant performance cost. - - - + - `null`: uses the kernel default + - `"never"`: disables L1 data cache flushing entirely. + May be appropriate if all guests are trusted. + - `"cond"`: flushes L1 data cache only for pre-determined + code paths. May leak information about the host address space + layout. + - `"always"`: flushes L1 data cache every time the hypervisor + enters the guest. May incur significant performance cost. ''; }; }; diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index c30cbd23e29..c4d891333f5 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -146,8 +146,8 @@ let default = config.users.mysql.enable; defaultText = literalExpression "config.users.mysql.enable"; type = types.bool; - description = '' - If set, the pam_mysql module will be used to + description = lib.mdDoc '' + If set, the `pam_mysql` module will be used to authenticate users against a MySQL/MariaDB database. ''; }; @@ -773,16 +773,16 @@ in } ]; - description = '' + description = lib.mdDoc '' Define resource limits that should apply to users or groups. Each item in the list should be an attribute set with a - domain, type, - item, and value + {var}`domain`, {var}`type`, + {var}`item`, and {var}`value` attribute. The syntax and semantics of these attributes - must be that described in limits.conf5. + must be that described in {manpage}`limits.conf(5)`. Note that these limits do not apply to systemd services, - whose limits can be changed via + whose limits can be changed via {option}`systemd.extraConfig` instead. ''; }; @@ -822,7 +822,7 @@ in ''; }; - security.pam.enableOTPW = mkEnableOption "the OTPW (one-time password) PAM module"; + security.pam.enableOTPW = mkEnableOption (lib.mdDoc "the OTPW (one-time password) PAM module"); security.pam.krb5 = { enable = mkOption { @@ -1145,7 +1145,7 @@ in }; }; - security.pam.enableEcryptfs = mkEnableOption "eCryptfs PAM module (mounting ecryptfs home directory on login)"; + security.pam.enableEcryptfs = mkEnableOption (lib.mdDoc "eCryptfs PAM module (mounting ecryptfs home directory on login)"); users.motd = mkOption { default = null; diff --git a/nixos/modules/security/polkit.nix b/nixos/modules/security/polkit.nix index 0a2d81445ba..95a2d4d5377 100644 --- a/nixos/modules/security/polkit.nix +++ b/nixos/modules/security/polkit.nix @@ -12,7 +12,7 @@ in options = { - security.polkit.enable = mkEnableOption "polkit"; + security.polkit.enable = mkEnableOption (lib.mdDoc "polkit"); security.polkit.extraConfig = mkOption { type = types.lines; diff --git a/nixos/modules/security/sudo.nix b/nixos/modules/security/sudo.nix index 68ceb6c230e..296b61fd703 100644 --- a/nixos/modules/security/sudo.nix +++ b/nixos/modules/security/sudo.nix @@ -157,17 +157,17 @@ in options = { command = mkOption { type = with types; str; - description = '' + description = lib.mdDoc '' A command being either just a path to a binary to allow any arguments, - the full command with arguments pre-set or with "" used as the argument, + the full command with arguments pre-set or with `""` used as the argument, not allowing arguments to the command at all. ''; }; options = mkOption { type = with types; listOf (enum [ "NOPASSWD" "PASSWD" "NOEXEC" "EXEC" "SETENV" "NOSETENV" "LOG_INPUT" "NOLOG_INPUT" "LOG_OUTPUT" "NOLOG_OUTPUT" ]); - description = '' - Options for running the command. Refer to the sudo manual. + description = lib.mdDoc '' + Options for running the command. Refer to the [sudo manual](https://www.sudo.ws/man/1.7.10/sudoers.man.html). ''; default = []; }; diff --git a/nixos/modules/security/systemd-confinement.nix b/nixos/modules/security/systemd-confinement.nix index f5ed3d281a5..be04741f4d0 100644 --- a/nixos/modules/security/systemd-confinement.nix +++ b/nixos/modules/security/systemd-confinement.nix @@ -38,8 +38,8 @@ in { type = types.listOf (types.either types.str types.package); default = []; description = let - mkScOption = optName: ""; - in '' + mkScOption = optName: "{option}`serviceConfig.${optName}`"; + in lib.mdDoc '' Additional packages or strings with context to add to the closure of the chroot. By default, this includes all the packages from the ${lib.concatMapStringsSep ", " mkScOption [ @@ -47,12 +47,14 @@ in { "ExecStopPost" ]} and ${mkScOption "ExecStart"} options. If you want to have all the dependencies of this systemd unit, you can use - . + {option}`confinement.fullUnit`. - The store paths listed in are - not included in the closure as + ::: {.note} + The store paths listed in {option}`path` are + **not** included in the closure as well as paths from other options except those listed - above. + above. + ::: ''; }; @@ -74,20 +76,20 @@ in { options.confinement.mode = lib.mkOption { type = types.enum [ "full-apivfs" "chroot-only" ]; default = "full-apivfs"; - description = '' - The value full-apivfs (the default) sets up - private /dev, /proc, /sys and /tmp file systems in a separate user + description = lib.mdDoc '' + The value `full-apivfs` (the default) sets up + private {file}`/dev`, {file}`/proc`, + {file}`/sys` and {file}`/tmp` file systems in a separate user name space. - If this is set to chroot-only, only the file + If this is set to `chroot-only`, only the file system name space is set up along with the call to - chroot2. + {manpage}`chroot(2)`. - This doesn't cover network namespaces and is solely for - file system level isolation. + ::: {.note} + This doesn't cover network namespaces and is solely for + file system level isolation. + ::: ''; }; diff --git a/nixos/modules/security/tpm2.nix b/nixos/modules/security/tpm2.nix index 375f4af1a64..5a023cec48e 100644 --- a/nixos/modules/security/tpm2.nix +++ b/nixos/modules/security/tpm2.nix @@ -17,7 +17,7 @@ let in { options.security.tpm2 = { - enable = lib.mkEnableOption "Trusted Platform Module 2 support"; + enable = lib.mkEnableOption (lib.mdDoc "Trusted Platform Module 2 support"); tssUser = lib.mkOption { description = lib.mdDoc '' @@ -48,9 +48,9 @@ in { }; abrmd = { - enable = lib.mkEnableOption '' + enable = lib.mkEnableOption (lib.mdDoc '' Trusted Platform 2 userspace resource manager daemon - ''; + ''); package = lib.mkOption { description = lib.mdDoc "tpm2-abrmd package to use"; @@ -61,10 +61,10 @@ in { }; pkcs11 = { - enable = lib.mkEnableOption '' + enable = lib.mkEnableOption (lib.mdDoc '' TPM2 PKCS#11 tool and shared library in system path - (/run/current-system/sw/lib/libtpm2_pkcs11.so) - ''; + (`/run/current-system/sw/lib/libtpm2_pkcs11.so`) + ''); package = lib.mkOption { description = lib.mdDoc "tpm2-pkcs11 package to use"; @@ -76,21 +76,11 @@ in { tctiEnvironment = { enable = lib.mkOption { - description = '' + description = lib.mdDoc '' Set common TCTI environment variables to the specified value. The variables are - - - - TPM2TOOLS_TCTI - - - - - TPM2_PKCS11_TCTI - - - + - `TPM2TOOLS_TCTI` + - `TPM2_PKCS11_TCTI` ''; type = lib.types.bool; default = false; diff --git a/nixos/modules/security/wrappers/default.nix b/nixos/modules/security/wrappers/default.nix index aa37ec7db49..45aee7c9733 100644 --- a/nixos/modules/security/wrappers/default.nix +++ b/nixos/modules/security/wrappers/default.nix @@ -51,20 +51,20 @@ let options.capabilities = lib.mkOption { type = lib.types.commas; default = ""; - description = '' + description = lib.mdDoc '' A comma-separated list of capabilities to be given to the wrapper program. For capabilities supported by the system check the - capabilities7 + {manpage}`capabilities(7)` manual page. - - cap_setpcap, which is required for the wrapper - program to be able to raise caps into the Ambient set is NOT raised - to the Ambient set so that the real program cannot modify its own - capabilities!! This may be too restrictive for cases in which the - real program needs cap_setpcap but it at least leans on the side - security paranoid vs. too relaxed. - + ::: {.note} + `cap_setpcap`, which is required for the wrapper + program to be able to raise caps into the Ambient set is NOT raised + to the Ambient set so that the real program cannot modify its own + capabilities!! This may be too restrictive for cases in which the + real program needs cap_setpcap but it at least leans on the side + security paranoid vs. too relaxed. + ::: ''; }; options.setuid = lib.mkOption @@ -189,7 +189,7 @@ in default = "50%"; example = "10G"; type = lib.types.str; - description = '' + description = lib.mdDoc '' Size limit for the /run/wrappers tmpfs. Look at mount(8), tmpfs size option, for the accepted syntax. WARNING: don't set to less than 64MB. ''; @@ -199,7 +199,7 @@ in type = lib.types.path; default = "/run/wrappers/bin"; internal = true; - description = '' + description = lib.mdDoc '' This option defines the path to the wrapper programs. It should not be overriden. ''; diff --git a/nixos/modules/services/admin/meshcentral.nix b/nixos/modules/services/admin/meshcentral.nix index e1df39716d4..22f31e95262 100644 --- a/nixos/modules/services/admin/meshcentral.nix +++ b/nixos/modules/services/admin/meshcentral.nix @@ -5,7 +5,7 @@ let configFile = configFormat.generate "meshcentral-config.json" cfg.settings; in with lib; { options.services.meshcentral = with types; { - enable = mkEnableOption "MeshCentral computer management server"; + enable = mkEnableOption (lib.mdDoc "MeshCentral computer management server"); package = mkOption { description = lib.mdDoc "MeshCentral package to use. Replacing this may be necessary to add dependencies for extra functionality."; type = types.package; @@ -13,15 +13,13 @@ in with lib; { defaultText = literalExpression "pkgs.meshcentral"; }; settings = mkOption { - description = '' + description = lib.mdDoc '' Settings for MeshCentral. Refer to upstream documentation for details: - - JSON Schema definition - simple sample configuration - complex sample configuration - Old homepage) with documentation link - + - [JSON Schema definition](https://github.com/Ylianst/MeshCentral/blob/master/meshcentral-config-schema.json) + - [simple sample configuration](https://github.com/Ylianst/MeshCentral/blob/master/sample-config.json) + - [complex sample configuration](https://github.com/Ylianst/MeshCentral/blob/master/sample-config-advanced.json) + - [Old homepage with documentation link](https://www.meshcommander.com/meshcentral2) ''; type = types.submodule { freeformType = configFormat.type; diff --git a/nixos/modules/services/admin/oxidized.nix b/nixos/modules/services/admin/oxidized.nix index f0d46f787b7..56f33031498 100644 --- a/nixos/modules/services/admin/oxidized.nix +++ b/nixos/modules/services/admin/oxidized.nix @@ -7,7 +7,7 @@ let in { options.services.oxidized = { - enable = mkEnableOption "the oxidized configuration backup service"; + enable = mkEnableOption (lib.mdDoc "the oxidized configuration backup service"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/admin/pgadmin.nix b/nixos/modules/services/admin/pgadmin.nix index aff25bcb68b..439f8f0d0fd 100644 --- a/nixos/modules/services/admin/pgadmin.nix +++ b/nixos/modules/services/admin/pgadmin.nix @@ -28,7 +28,7 @@ let in { options.services.pgadmin = { - enable = mkEnableOption "PostgreSQL Admin 4"; + enable = mkEnableOption (lib.mdDoc "PostgreSQL Admin 4"); port = mkOption { description = lib.mdDoc "Port for pgadmin4 to run on"; @@ -49,7 +49,7 @@ in type = types.path; }; - openFirewall = mkEnableOption "firewall passthrough for pgadmin4"; + openFirewall = mkEnableOption (lib.mdDoc "firewall passthrough for pgadmin4"); settings = mkOption { description = lib.mdDoc '' diff --git a/nixos/modules/services/admin/salt/master.nix b/nixos/modules/services/admin/salt/master.nix index 3c246a94239..4346022970e 100644 --- a/nixos/modules/services/admin/salt/master.nix +++ b/nixos/modules/services/admin/salt/master.nix @@ -20,7 +20,7 @@ in { options = { services.salt.master = { - enable = mkEnableOption "Salt master service"; + enable = mkEnableOption (lib.mdDoc "Salt master service"); configuration = mkOption { type = types.attrs; default = {}; diff --git a/nixos/modules/services/admin/salt/minion.nix b/nixos/modules/services/admin/salt/minion.nix index 165ec8ef96b..3ae02a4cc5d 100644 --- a/nixos/modules/services/admin/salt/minion.nix +++ b/nixos/modules/services/admin/salt/minion.nix @@ -21,7 +21,7 @@ in { options = { services.salt.minion = { - enable = mkEnableOption "Salt minion service"; + enable = mkEnableOption (lib.mdDoc "Salt minion service"); configuration = mkOption { type = types.attrs; default = {}; diff --git a/nixos/modules/services/amqp/rabbitmq.nix b/nixos/modules/services/amqp/rabbitmq.nix index 9d3243722d6..11dabf0b51c 100644 --- a/nixos/modules/services/amqp/rabbitmq.nix +++ b/nixos/modules/services/amqp/rabbitmq.nix @@ -136,7 +136,7 @@ in }; managementPlugin = { - enable = mkEnableOption "the management plugin"; + enable = mkEnableOption (lib.mdDoc "the management plugin"); port = mkOption { default = 15672; type = types.port; diff --git a/nixos/modules/services/audio/botamusique.nix b/nixos/modules/services/audio/botamusique.nix index edb59a49fd1..4cd900f945c 100644 --- a/nixos/modules/services/audio/botamusique.nix +++ b/nixos/modules/services/audio/botamusique.nix @@ -12,7 +12,7 @@ in meta.maintainers = with lib.maintainers; [ hexa ]; options.services.botamusique = { - enable = mkEnableOption "botamusique, a bot to play audio streams on mumble"; + enable = mkEnableOption (lib.mdDoc "botamusique, a bot to play audio streams on mumble"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/audio/hqplayerd.nix b/nixos/modules/services/audio/hqplayerd.nix index 4045a34b40d..eff1549380c 100644 --- a/nixos/modules/services/audio/hqplayerd.nix +++ b/nixos/modules/services/audio/hqplayerd.nix @@ -12,7 +12,7 @@ in { options = { services.hqplayerd = { - enable = mkEnableOption "HQPlayer Embedded"; + enable = mkEnableOption (lib.mdDoc "HQPlayer Embedded"); auth = { username = mkOption { diff --git a/nixos/modules/services/audio/icecast.nix b/nixos/modules/services/audio/icecast.nix index 0a81d71b569..759f1ab0db9 100644 --- a/nixos/modules/services/audio/icecast.nix +++ b/nixos/modules/services/audio/icecast.nix @@ -44,7 +44,7 @@ in { services.icecast = { - enable = mkEnableOption "Icecast server"; + enable = mkEnableOption (lib.mdDoc "Icecast server"); hostname = mkOption { type = types.nullOr types.str; diff --git a/nixos/modules/services/audio/jack.nix b/nixos/modules/services/audio/jack.nix index ae566bba84e..105e99cb2f5 100644 --- a/nixos/modules/services/audio/jack.nix +++ b/nixos/modules/services/audio/jack.nix @@ -16,9 +16,9 @@ in { options = { services.jack = { jackd = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' JACK Audio Connection Kit. You need to add yourself to the "jackaudio" group - ''; + ''); package = mkOption { # until jack1 promiscuous mode is fixed @@ -27,7 +27,7 @@ in { default = pkgs.jack2; defaultText = literalExpression "pkgs.jack2"; example = literalExpression "pkgs.jack1"; - description = '' + description = lib.mdDoc '' The JACK package to use. ''; }; diff --git a/nixos/modules/services/audio/jmusicbot.nix b/nixos/modules/services/audio/jmusicbot.nix index 7e23ffe6bf2..c6392c679c0 100644 --- a/nixos/modules/services/audio/jmusicbot.nix +++ b/nixos/modules/services/audio/jmusicbot.nix @@ -7,7 +7,7 @@ in { options = { services.jmusicbot = { - enable = mkEnableOption "jmusicbot, a Discord music bot that's easy to set up and run yourself"; + enable = mkEnableOption (lib.mdDoc "jmusicbot, a Discord music bot that's easy to set up and run yourself"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/audio/mopidy.nix b/nixos/modules/services/audio/mopidy.nix index 9c8e9b693c3..50ee9a82451 100644 --- a/nixos/modules/services/audio/mopidy.nix +++ b/nixos/modules/services/audio/mopidy.nix @@ -26,7 +26,7 @@ in { services.mopidy = { - enable = mkEnableOption "Mopidy, a music player daemon"; + enable = mkEnableOption (lib.mdDoc "Mopidy, a music player daemon"); dataDir = mkOption { default = "/var/lib/mopidy"; diff --git a/nixos/modules/services/audio/mpdscribble.nix b/nixos/modules/services/audio/mpdscribble.nix index 01d4c11e734..132d9ad3258 100644 --- a/nixos/modules/services/audio/mpdscribble.nix +++ b/nixos/modules/services/audio/mpdscribble.nix @@ -77,7 +77,7 @@ in { options.services.mpdscribble = { - enable = mkEnableOption "mpdscribble"; + enable = mkEnableOption (lib.mdDoc "mpdscribble"); proxy = mkOption { default = null; diff --git a/nixos/modules/services/audio/navidrome.nix b/nixos/modules/services/audio/navidrome.nix index a7c8953f510..d74835e220f 100644 --- a/nixos/modules/services/audio/navidrome.nix +++ b/nixos/modules/services/audio/navidrome.nix @@ -9,7 +9,7 @@ in { options = { services.navidrome = { - enable = mkEnableOption "Navidrome music server"; + enable = mkEnableOption (lib.mdDoc "Navidrome music server"); settings = mkOption rec { type = settingsFormat.type; diff --git a/nixos/modules/services/audio/networkaudiod.nix b/nixos/modules/services/audio/networkaudiod.nix index 265a4e1d95d..11486429e66 100644 --- a/nixos/modules/services/audio/networkaudiod.nix +++ b/nixos/modules/services/audio/networkaudiod.nix @@ -8,7 +8,7 @@ let in { options = { services.networkaudiod = { - enable = mkEnableOption "Networkaudiod (NAA)"; + enable = mkEnableOption (lib.mdDoc "Networkaudiod (NAA)"); }; }; diff --git a/nixos/modules/services/audio/roon-bridge.nix b/nixos/modules/services/audio/roon-bridge.nix index 9a9a6479efc..db84ba28622 100644 --- a/nixos/modules/services/audio/roon-bridge.nix +++ b/nixos/modules/services/audio/roon-bridge.nix @@ -8,7 +8,7 @@ let in { options = { services.roon-bridge = { - enable = mkEnableOption "Roon Bridge"; + enable = mkEnableOption (lib.mdDoc "Roon Bridge"); openFirewall = mkOption { type = types.bool; default = false; diff --git a/nixos/modules/services/audio/roon-server.nix b/nixos/modules/services/audio/roon-server.nix index 535950f7565..4764ee3e598 100644 --- a/nixos/modules/services/audio/roon-server.nix +++ b/nixos/modules/services/audio/roon-server.nix @@ -8,7 +8,7 @@ let in { options = { services.roon-server = { - enable = mkEnableOption "Roon Server"; + enable = mkEnableOption (lib.mdDoc "Roon Server"); openFirewall = mkOption { type = types.bool; default = false; diff --git a/nixos/modules/services/audio/spotifyd.nix b/nixos/modules/services/audio/spotifyd.nix index 87ee083e74b..975be5a87cb 100644 --- a/nixos/modules/services/audio/spotifyd.nix +++ b/nixos/modules/services/audio/spotifyd.nix @@ -17,7 +17,7 @@ in { options = { services.spotifyd = { - enable = mkEnableOption "spotifyd, a Spotify playing daemon"; + enable = mkEnableOption (lib.mdDoc "spotifyd, a Spotify playing daemon"); config = mkOption { default = ""; diff --git a/nixos/modules/services/audio/squeezelite.nix b/nixos/modules/services/audio/squeezelite.nix index 767eeda177f..30dc12552f0 100644 --- a/nixos/modules/services/audio/squeezelite.nix +++ b/nixos/modules/services/audio/squeezelite.nix @@ -14,9 +14,9 @@ in ###### interface options.services.squeezelite = { - enable = mkEnableOption "Squeezelite, a software Squeezebox emulator"; + enable = mkEnableOption (lib.mdDoc "Squeezelite, a software Squeezebox emulator"); - pulseAudio = mkEnableOption "pulseaudio support"; + pulseAudio = mkEnableOption (lib.mdDoc "pulseaudio support"); extraArguments = mkOption { default = ""; diff --git a/nixos/modules/services/audio/ympd.nix b/nixos/modules/services/audio/ympd.nix index 98522f25423..f14c81cdb8d 100644 --- a/nixos/modules/services/audio/ympd.nix +++ b/nixos/modules/services/audio/ympd.nix @@ -12,7 +12,7 @@ in { services.ympd = { - enable = mkEnableOption "ympd, the MPD Web GUI"; + enable = mkEnableOption (lib.mdDoc "ympd, the MPD Web GUI"); webPort = mkOption { type = types.either types.str types.port; # string for backwards compat diff --git a/nixos/modules/services/backup/automysqlbackup.nix b/nixos/modules/services/backup/automysqlbackup.nix index 194b49da539..d0237f196a8 100644 --- a/nixos/modules/services/backup/automysqlbackup.nix +++ b/nixos/modules/services/backup/automysqlbackup.nix @@ -30,7 +30,7 @@ in options = { services.automysqlbackup = { - enable = mkEnableOption "AutoMySQLBackup"; + enable = mkEnableOption (lib.mdDoc "AutoMySQLBackup"); calendar = mkOption { type = types.str; diff --git a/nixos/modules/services/backup/bacula.nix b/nixos/modules/services/backup/bacula.nix index cb8a6eb4390..d4f6ac8f5d3 100644 --- a/nixos/modules/services/backup/bacula.nix +++ b/nixos/modules/services/backup/bacula.nix @@ -195,7 +195,7 @@ let }; devices = mkOption { - description = ""; + description = lib.mdDoc ""; type = types.listOf types.str; }; diff --git a/nixos/modules/services/backup/borgmatic.nix b/nixos/modules/services/backup/borgmatic.nix index 7236a1f1941..73c4acda393 100644 --- a/nixos/modules/services/backup/borgmatic.nix +++ b/nixos/modules/services/backup/borgmatic.nix @@ -8,7 +8,7 @@ let cfgfile = settingsFormat.generate "config.yaml" cfg.settings; in { options.services.borgmatic = { - enable = mkEnableOption "borgmatic"; + enable = mkEnableOption (lib.mdDoc "borgmatic"); settings = mkOption { description = lib.mdDoc '' diff --git a/nixos/modules/services/backup/duplicati.nix b/nixos/modules/services/backup/duplicati.nix index 8da29a04c82..47f0b618c8d 100644 --- a/nixos/modules/services/backup/duplicati.nix +++ b/nixos/modules/services/backup/duplicati.nix @@ -8,7 +8,7 @@ in { options = { services.duplicati = { - enable = mkEnableOption "Duplicati"; + enable = mkEnableOption (lib.mdDoc "Duplicati"); port = mkOption { default = 8200; @@ -21,14 +21,14 @@ in dataDir = mkOption { type = types.str; default = "/var/lib/duplicati"; - description = '' + description = lib.mdDoc '' The directory where Duplicati stores its data files. - - If left as the default value this directory will automatically be created - before the Duplicati server starts, otherwise you are responsible for ensuring - the directory exists with appropriate ownership and permissions. - + ::: {.note} + If left as the default value this directory will automatically be created + before the Duplicati server starts, otherwise you are responsible for ensuring + the directory exists with appropriate ownership and permissions. + ::: ''; }; diff --git a/nixos/modules/services/backup/duplicity.nix b/nixos/modules/services/backup/duplicity.nix index afa4f31b129..05ec997ab66 100644 --- a/nixos/modules/services/backup/duplicity.nix +++ b/nixos/modules/services/backup/duplicity.nix @@ -13,7 +13,7 @@ let in { options.services.duplicity = { - enable = mkEnableOption "backups with duplicity"; + enable = mkEnableOption (lib.mdDoc "backups with duplicity"); root = mkOption { type = types.path; @@ -54,15 +54,15 @@ in secretFile = mkOption { type = types.nullOr types.path; default = null; - description = '' + description = lib.mdDoc '' Path of a file containing secrets (gpg passphrase, access key...) in the format of EnvironmentFile as described by - systemd.exec5. For example: - + {manpage}`systemd.exec(5)`. For example: + ``` PASSPHRASE=«...» AWS_ACCESS_KEY_ID=«...» AWS_SECRET_ACCESS_KEY=«...» - + ``` ''; }; diff --git a/nixos/modules/services/backup/mysql-backup.nix b/nixos/modules/services/backup/mysql-backup.nix index 41adb63e7fa..289291c6bd2 100644 --- a/nixos/modules/services/backup/mysql-backup.nix +++ b/nixos/modules/services/backup/mysql-backup.nix @@ -37,7 +37,7 @@ in services.mysqlBackup = { - enable = mkEnableOption "MySQL backups"; + enable = mkEnableOption (lib.mdDoc "MySQL backups"); calendar = mkOption { type = types.str; diff --git a/nixos/modules/services/backup/postgresql-backup.nix b/nixos/modules/services/backup/postgresql-backup.nix index 744ccb98e2c..d3c6f3104fc 100644 --- a/nixos/modules/services/backup/postgresql-backup.nix +++ b/nixos/modules/services/backup/postgresql-backup.nix @@ -71,7 +71,7 @@ in { options = { services.postgresqlBackup = { - enable = mkEnableOption "PostgreSQL dumps"; + enable = mkEnableOption (lib.mdDoc "PostgreSQL dumps"); startAt = mkOption { default = "*-*-* 01:15:00"; diff --git a/nixos/modules/services/backup/restic-rest-server.nix b/nixos/modules/services/backup/restic-rest-server.nix index 1d3892c158e..37a6150c99d 100644 --- a/nixos/modules/services/backup/restic-rest-server.nix +++ b/nixos/modules/services/backup/restic-rest-server.nix @@ -9,7 +9,7 @@ in meta.maintainers = [ maintainers.bachp ]; options.services.restic.server = { - enable = mkEnableOption "Restic REST Server"; + enable = mkEnableOption (lib.mdDoc "Restic REST Server"); listenAddress = mkOption { default = ":8000"; diff --git a/nixos/modules/services/backup/restic.nix b/nixos/modules/services/backup/restic.nix index 2b0dcb16344..65fe34b2d39 100644 --- a/nixos/modules/services/backup/restic.nix +++ b/nixos/modules/services/backup/restic.nix @@ -182,11 +182,11 @@ in pruneOpts = mkOption { type = types.listOf types.str; default = [ ]; - description = '' - A list of options (--keep-* et al.) for 'restic forget + description = lib.mdDoc '' + A list of options (--keep-\* et al.) for 'restic forget --prune', to automatically prune old snapshots. The 'forget' command is run *after* the 'backup' command, so - keep that in mind when constructing the --keep-* options. + keep that in mind when constructing the --keep-\* options. ''; example = [ "--keep-daily 7" diff --git a/nixos/modules/services/backup/rsnapshot.nix b/nixos/modules/services/backup/rsnapshot.nix index b18c02d7d11..0b9bb60af0e 100644 --- a/nixos/modules/services/backup/rsnapshot.nix +++ b/nixos/modules/services/backup/rsnapshot.nix @@ -22,7 +22,7 @@ in { options = { services.rsnapshot = { - enable = mkEnableOption "rsnapshot backups"; + enable = mkEnableOption (lib.mdDoc "rsnapshot backups"); enableManualRsnapshot = mkOption { description = lib.mdDoc "Whether to enable manual usage of the rsnapshot command with this module."; default = true; diff --git a/nixos/modules/services/backup/sanoid.nix b/nixos/modules/services/backup/sanoid.nix index 40a2c9aae81..a51708170fb 100644 --- a/nixos/modules/services/backup/sanoid.nix +++ b/nixos/modules/services/backup/sanoid.nix @@ -112,7 +112,7 @@ in # Interface options.services.sanoid = { - enable = mkEnableOption "Sanoid ZFS snapshotting service"; + enable = mkEnableOption (lib.mdDoc "Sanoid ZFS snapshotting service"); interval = mkOption { type = types.str; diff --git a/nixos/modules/services/backup/syncoid.nix b/nixos/modules/services/backup/syncoid.nix index 1e445f4bebe..6188f109463 100644 --- a/nixos/modules/services/backup/syncoid.nix +++ b/nixos/modules/services/backup/syncoid.nix @@ -85,7 +85,7 @@ in # Interface options.services.syncoid = { - enable = mkEnableOption "Syncoid ZFS synchronization service"; + enable = mkEnableOption (lib.mdDoc "Syncoid ZFS synchronization service"); interval = mkOption { type = types.str; @@ -200,7 +200,7 @@ in ''; }; - recursive = mkEnableOption ''the transfer of child datasets''; + recursive = mkEnableOption (lib.mdDoc ''the transfer of child datasets''); sshKey = mkOption { type = types.nullOr types.path; diff --git a/nixos/modules/services/backup/tarsnap.nix b/nixos/modules/services/backup/tarsnap.nix index c2d4f87362e..b34aa3ff50d 100644 --- a/nixos/modules/services/backup/tarsnap.nix +++ b/nixos/modules/services/backup/tarsnap.nix @@ -30,7 +30,7 @@ in options = { services.tarsnap = { - enable = mkEnableOption "periodic tarsnap backups"; + enable = mkEnableOption (lib.mdDoc "periodic tarsnap backups"); keyfile = mkOption { type = types.str; diff --git a/nixos/modules/services/backup/tsm.nix b/nixos/modules/services/backup/tsm.nix index bd6f3d71fe6..c4de0b16d47 100644 --- a/nixos/modules/services/backup/tsm.nix +++ b/nixos/modules/services/backup/tsm.nix @@ -8,12 +8,12 @@ let inherit (lib.types) nonEmptyStr nullOr; options.services.tsmBackup = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' automatic backups with the IBM Spectrum Protect (Tivoli Storage Manager, TSM) client. This also enables - - ''; + {option}`programs.tsmClient.enable` + ''); command = mkOption { type = nonEmptyStr; default = "backup"; diff --git a/nixos/modules/services/backup/zfs-replication.nix b/nixos/modules/services/backup/zfs-replication.nix index 1a089bb3486..f0267c47364 100644 --- a/nixos/modules/services/backup/zfs-replication.nix +++ b/nixos/modules/services/backup/zfs-replication.nix @@ -9,7 +9,7 @@ let in { options = { services.zfs.autoReplication = { - enable = mkEnableOption "ZFS snapshot replication."; + enable = mkEnableOption (lib.mdDoc "ZFS snapshot replication."); followDelete = mkOption { description = lib.mdDoc "Remove remote snapshots that don't have a local correspondant."; diff --git a/nixos/modules/services/backup/znapzend.nix b/nixos/modules/services/backup/znapzend.nix index ecd90ba5b30..f8d741e3ad9 100644 --- a/nixos/modules/services/backup/znapzend.nix +++ b/nixos/modules/services/backup/znapzend.nix @@ -12,19 +12,19 @@ let backups. It consists of a series of retention periodes to interval associations: - + ``` retA=>intA,retB=>intB,... - + ``` Both intervals and retention periods are expressed in standard units of time or multiples of them. You can use both the full name or a shortcut according to the following listing: - + ``` second|sec|s, minute|min, hour|h, day|d, week|w, month|mon|m, year|y - + ``` - See znapzendzetup1 for more info. + See {manpage}`znapzendzetup(1)` for more info. ''; planExample = "1h=>10min,1d=>1h,1w=>1d,1m=>1w,1y=>1m"; @@ -57,7 +57,7 @@ let plan = mkOption { type = str; - description = planDescription; + description = lib.mdDoc planDescription; example = planExample; }; @@ -209,7 +209,7 @@ let plan = mkOption { type = str; - description = planDescription; + description = lib.mdDoc planDescription; example = planExample; }; @@ -294,7 +294,7 @@ in { options = { services.znapzend = { - enable = mkEnableOption "ZnapZend ZFS backup daemon"; + enable = mkEnableOption (lib.mdDoc "ZnapZend ZFS backup daemon"); logLevel = mkOption { default = "debug"; @@ -310,8 +310,8 @@ in type = str; default = "syslog::daemon"; example = "/var/log/znapzend.log"; - description = '' - Where to log to (syslog::<facility> or <filepath>). + description = lib.mdDoc '' + Where to log to (syslog::\ or \). ''; }; @@ -358,62 +358,62 @@ in default = false; }; - features.oracleMode = mkEnableOption '' + features.oracleMode = mkEnableOption (lib.mdDoc '' Destroy snapshots one by one instead of using one long argument list. If source and destination are out of sync for a long time, you may have so many snapshots to destroy that the argument gets is too long and the command fails. - ''; - features.recvu = mkEnableOption '' - recvu feature which uses -u on the receiving end to keep the destination + ''); + features.recvu = mkEnableOption (lib.mdDoc '' + recvu feature which uses `-u` on the receiving end to keep the destination filesystem unmounted. - ''; - features.compressed = mkEnableOption '' - compressed feature which adds the options -Lce to - the zfs send command. When this is enabled, make + ''); + features.compressed = mkEnableOption (lib.mdDoc '' + compressed feature which adds the options `-Lce` to + the {command}`zfs send` command. When this is enabled, make sure that both the sending and receiving pool have the same relevant - features enabled. Using -c will skip unneccessary - decompress-compress stages, -L is for large block + features enabled. Using `-c` will skip unneccessary + decompress-compress stages, `-L` is for large block support and -e is for embedded data support. see - znapzend1 - and zfs8 + {manpage}`znapzend(1)` + and {manpage}`zfs(8)` for more info. - ''; - features.sendRaw = mkEnableOption '' - sendRaw feature which adds the options -w to the - zfs send command. For encrypted source datasets this + ''); + features.sendRaw = mkEnableOption (lib.mdDoc '' + sendRaw feature which adds the options `-w` to the + {command}`zfs send` command. For encrypted source datasets this instructs zfs not to decrypt before sending which results in a remote backup that can't be read without the encryption key/passphrase, useful when the remote isn't fully trusted or not physically secure. This option must be used consistently, raw incrementals cannot be based on non-raw snapshots and vice versa. - ''; - features.skipIntermediates = mkEnableOption '' + ''); + features.skipIntermediates = mkEnableOption (lib.mdDoc '' Enable the skipIntermediates feature to send a single increment between latest common snapshot and the newly made one. It may skip several source snaps if the destination was offline for some time, and it should skip snapshots not managed by znapzend. Normally for online destinations, the new snapshot is sent as soon as it is created on the source, so there are no automatic increments to skip. - ''; - features.lowmemRecurse = mkEnableOption '' + ''); + features.lowmemRecurse = mkEnableOption (lib.mdDoc '' use lowmemRecurse on systems where you have too many datasets, so a recursive listing of attributes to find backup plans exhausts the - memory available to znapzend: instead, go the slower + memory available to {command}`znapzend`: instead, go the slower way to first list all impacted dataset names, and then query their configs one by one. - ''; - features.zfsGetType = mkEnableOption '' - use zfsGetType if your zfs get supports a - -t argument for filtering by dataset type at all AND + ''); + features.zfsGetType = mkEnableOption (lib.mdDoc '' + use zfsGetType if your {command}`zfs get` supports a + `-t` argument for filtering by dataset type at all AND lists properties for snapshots by default when recursing, so that there is too much data to process while searching for backup plans. If these two conditions apply to your system, the time needed for a - --recursive search for backup plans can literally + `--recursive` search for backup plans can literally differ by hundreds of times (depending on the amount of snapshots in that dataset tree... and a decent backup plan will ensure you have a lot of those), so you would benefit from requesting this feature. - ''; + ''); }; }; diff --git a/nixos/modules/services/backup/zrepl.nix b/nixos/modules/services/backup/zrepl.nix index ea858a8b77d..1d3afa3eda0 100644 --- a/nixos/modules/services/backup/zrepl.nix +++ b/nixos/modules/services/backup/zrepl.nix @@ -11,7 +11,7 @@ in options = { services.zrepl = { - enable = mkEnableOption "zrepl"; + enable = mkEnableOption (lib.mdDoc "zrepl"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/blockchain/ethereum/geth.nix b/nixos/modules/services/blockchain/ethereum/geth.nix index 1d443d91d19..eca308dc366 100644 --- a/nixos/modules/services/blockchain/ethereum/geth.nix +++ b/nixos/modules/services/blockchain/ethereum/geth.nix @@ -9,7 +9,7 @@ let options = { - enable = lib.mkEnableOption "Go Ethereum Node"; + enable = lib.mkEnableOption (lib.mdDoc "Go Ethereum Node"); port = mkOption { type = types.port; @@ -18,7 +18,7 @@ let }; http = { - enable = lib.mkEnableOption "Go Ethereum HTTP API"; + enable = lib.mkEnableOption (lib.mdDoc "Go Ethereum HTTP API"); address = mkOption { type = types.str; default = "127.0.0.1"; @@ -40,7 +40,7 @@ let }; websocket = { - enable = lib.mkEnableOption "Go Ethereum WebSocket API"; + enable = lib.mkEnableOption (lib.mdDoc "Go Ethereum WebSocket API"); address = mkOption { type = types.str; default = "127.0.0.1"; @@ -62,7 +62,7 @@ let }; authrpc = { - enable = lib.mkEnableOption "Go Ethereum Auth RPC API"; + enable = lib.mkEnableOption (lib.mdDoc "Go Ethereum Auth RPC API"); address = mkOption { type = types.str; default = "127.0.0.1"; @@ -91,7 +91,7 @@ let }; metrics = { - enable = lib.mkEnableOption "Go Ethereum prometheus metrics"; + enable = lib.mkEnableOption (lib.mdDoc "Go Ethereum prometheus metrics"); address = mkOption { type = types.str; default = "127.0.0.1"; diff --git a/nixos/modules/services/cluster/corosync/default.nix b/nixos/modules/services/cluster/corosync/default.nix index 97308944541..7ef17c46b81 100644 --- a/nixos/modules/services/cluster/corosync/default.nix +++ b/nixos/modules/services/cluster/corosync/default.nix @@ -7,7 +7,7 @@ in { # interface options.services.corosync = { - enable = mkEnableOption "corosync"; + enable = mkEnableOption (lib.mdDoc "corosync"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/cluster/hadoop/default.nix b/nixos/modules/services/cluster/hadoop/default.nix index 76e84c1111a..72bf25c2114 100644 --- a/nixos/modules/services/cluster/hadoop/default.nix +++ b/nixos/modules/services/cluster/hadoop/default.nix @@ -25,7 +25,7 @@ with lib; default = {}; type = types.attrsOf types.anything; internal = true; - description = '' + description = lib.mdDoc '' Internal option to add configs to core-site.xml based on module options ''; }; @@ -59,7 +59,7 @@ with lib; default = {}; type = types.attrsOf types.anything; internal = true; - description = '' + description = lib.mdDoc '' Internal option to add configs to hdfs-site.xml based on module options ''; }; @@ -134,7 +134,7 @@ with lib; default = {}; type = types.attrsOf types.anything; internal = true; - description = '' + description = lib.mdDoc '' Internal option to add configs to yarn-site.xml based on module options ''; }; @@ -197,13 +197,13 @@ with lib; description = lib.mdDoc "Directories containing additional config files to be added to HADOOP_CONF_DIR"; }; - gatewayRole.enable = mkEnableOption "gateway role for deploying hadoop configs"; + gatewayRole.enable = mkEnableOption (lib.mdDoc "gateway role for deploying hadoop configs"); package = mkOption { type = types.package; default = pkgs.hadoop; defaultText = literalExpression "pkgs.hadoop"; - description = ""; + description = lib.mdDoc ""; }; }; diff --git a/nixos/modules/services/cluster/hadoop/hbase.nix b/nixos/modules/services/cluster/hadoop/hbase.nix index 8fd40459c19..237a1d428fe 100644 --- a/nixos/modules/services/cluster/hadoop/hbase.nix +++ b/nixos/modules/services/cluster/hadoop/hbase.nix @@ -9,7 +9,7 @@ in { options.services.hadoop = { - gatewayRole.enableHbaseCli = mkEnableOption "HBase CLI tools"; + gatewayRole.enableHbaseCli = mkEnableOption (lib.mdDoc "HBase CLI tools"); hbaseSiteDefault = mkOption { default = { @@ -39,7 +39,7 @@ in default = {}; type = with types; attrsOf anything; internal = true; - description = '' + description = lib.mdDoc '' Internal option to add configs to hbase-site.xml based on module options ''; }; @@ -77,8 +77,8 @@ in default = null; }; master = { - enable = mkEnableOption "HBase Master"; - initHDFS = mkEnableOption "initialization of the hbase directory on HDFS"; + enable = mkEnableOption (lib.mdDoc "HBase Master"); + initHDFS = mkEnableOption (lib.mdDoc "initialization of the hbase directory on HDFS"); openFirewall = mkOption { type = types.bool; @@ -89,7 +89,7 @@ in }; }; regionServer = { - enable = mkEnableOption "HBase RegionServer"; + enable = mkEnableOption (lib.mdDoc "HBase RegionServer"); overrideHosts = mkOption { type = types.bool; diff --git a/nixos/modules/services/cluster/hadoop/hdfs.nix b/nixos/modules/services/cluster/hadoop/hdfs.nix index 75a97e53547..4a49bd0ddd4 100644 --- a/nixos/modules/services/cluster/hadoop/hdfs.nix +++ b/nixos/modules/services/cluster/hadoop/hdfs.nix @@ -8,7 +8,7 @@ let # Generator for HDFS service options hadoopServiceOption = { serviceName, firewallOption ? true, extraOpts ? null }: { - enable = mkEnableOption serviceName; + enable = mkEnableOption (lib.mdDoc serviceName); restartIfChanged = mkOption { type = types.bool; description = lib.mdDoc '' diff --git a/nixos/modules/services/cluster/hadoop/yarn.nix b/nixos/modules/services/cluster/hadoop/yarn.nix index be0b9c13cd3..26077f35fdd 100644 --- a/nixos/modules/services/cluster/hadoop/yarn.nix +++ b/nixos/modules/services/cluster/hadoop/yarn.nix @@ -31,7 +31,7 @@ in { options.services.hadoop.yarn = { resourcemanager = { - enable = mkEnableOption "Hadoop YARN ResourceManager"; + enable = mkEnableOption (lib.mdDoc "Hadoop YARN ResourceManager"); inherit restartIfChanged extraFlags extraEnv; openFirewall = mkOption { @@ -43,7 +43,7 @@ in }; }; nodemanager = { - enable = mkEnableOption "Hadoop YARN NodeManager"; + enable = mkEnableOption (lib.mdDoc "Hadoop YARN NodeManager"); inherit restartIfChanged extraFlags extraEnv; resource = { diff --git a/nixos/modules/services/cluster/k3s/default.nix b/nixos/modules/services/cluster/k3s/default.nix index d0269fde893..693f388de14 100644 --- a/nixos/modules/services/cluster/k3s/default.nix +++ b/nixos/modules/services/cluster/k3s/default.nix @@ -13,7 +13,7 @@ in # interface options.services.k3s = { - enable = mkEnableOption "k3s"; + enable = mkEnableOption (lib.mdDoc "k3s"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/cluster/kubernetes/addon-manager.nix b/nixos/modules/services/cluster/kubernetes/addon-manager.nix index 99fd1e6f049..d6b3428908b 100644 --- a/nixos/modules/services/cluster/kubernetes/addon-manager.nix +++ b/nixos/modules/services/cluster/kubernetes/addon-manager.nix @@ -62,7 +62,7 @@ in ''; }; - enable = mkEnableOption "Kubernetes addon manager."; + enable = mkEnableOption (lib.mdDoc "Kubernetes addon manager."); }; ###### implementation diff --git a/nixos/modules/services/cluster/kubernetes/addons/dns.nix b/nixos/modules/services/cluster/kubernetes/addons/dns.nix index 5b7790a6457..3d41b5f0085 100644 --- a/nixos/modules/services/cluster/kubernetes/addons/dns.nix +++ b/nixos/modules/services/cluster/kubernetes/addons/dns.nix @@ -12,7 +12,7 @@ let }; in { options.services.kubernetes.addons.dns = { - enable = mkEnableOption "kubernetes dns addon"; + enable = mkEnableOption (lib.mdDoc "kubernetes dns addon"); clusterIp = mkOption { description = lib.mdDoc "Dns addon clusterIP"; diff --git a/nixos/modules/services/cluster/kubernetes/apiserver.nix b/nixos/modules/services/cluster/kubernetes/apiserver.nix index c9ae2c14bbf..718244e742d 100644 --- a/nixos/modules/services/cluster/kubernetes/apiserver.nix +++ b/nixos/modules/services/cluster/kubernetes/apiserver.nix @@ -98,7 +98,7 @@ in type = listOf str; }; - enable = mkEnableOption "Kubernetes apiserver"; + enable = mkEnableOption (lib.mdDoc "Kubernetes apiserver"); enableAdmissionPlugins = mkOption { description = lib.mdDoc '' diff --git a/nixos/modules/services/cluster/kubernetes/controller-manager.nix b/nixos/modules/services/cluster/kubernetes/controller-manager.nix index 6080e6f9915..b1a96e1c384 100644 --- a/nixos/modules/services/cluster/kubernetes/controller-manager.nix +++ b/nixos/modules/services/cluster/kubernetes/controller-manager.nix @@ -35,7 +35,7 @@ in type = str; }; - enable = mkEnableOption "Kubernetes controller manager"; + enable = mkEnableOption (lib.mdDoc "Kubernetes controller manager"); extraOpts = mkOption { description = lib.mdDoc "Kubernetes controller manager extra command line options."; diff --git a/nixos/modules/services/cluster/kubernetes/flannel.nix b/nixos/modules/services/cluster/kubernetes/flannel.nix index cb81eaaf016..5b591eaa8e0 100644 --- a/nixos/modules/services/cluster/kubernetes/flannel.nix +++ b/nixos/modules/services/cluster/kubernetes/flannel.nix @@ -12,7 +12,7 @@ in { ###### interface options.services.kubernetes.flannel = { - enable = mkEnableOption "enable flannel networking"; + enable = mkEnableOption (lib.mdDoc "enable flannel networking"); }; ###### implementation diff --git a/nixos/modules/services/cluster/kubernetes/kubelet.nix b/nixos/modules/services/cluster/kubernetes/kubelet.nix index 2489cb2be7c..ae9548bdba2 100644 --- a/nixos/modules/services/cluster/kubernetes/kubelet.nix +++ b/nixos/modules/services/cluster/kubernetes/kubelet.nix @@ -145,7 +145,7 @@ in default = "unix:///run/containerd/containerd.sock"; }; - enable = mkEnableOption "Kubernetes kubelet."; + enable = mkEnableOption (lib.mdDoc "Kubernetes kubelet."); extraOpts = mkOption { description = lib.mdDoc "Kubernetes kubelet extra command line options."; diff --git a/nixos/modules/services/cluster/kubernetes/pki.nix b/nixos/modules/services/cluster/kubernetes/pki.nix index 7c46ac85584..507e74570e4 100644 --- a/nixos/modules/services/cluster/kubernetes/pki.nix +++ b/nixos/modules/services/cluster/kubernetes/pki.nix @@ -41,7 +41,7 @@ in ###### interface options.services.kubernetes.pki = with lib.types; { - enable = mkEnableOption "easyCert issuer service"; + enable = mkEnableOption (lib.mdDoc "easyCert issuer service"); certs = mkOption { description = lib.mdDoc "List of certificate specs to feed to cert generator."; @@ -114,9 +114,9 @@ in }; etcClusterAdminKubeconfig = mkOption { - description = '' + description = lib.mdDoc '' Symlink a kubeconfig with cluster-admin privileges to environment path - (/etc/<path>). + (/etc/\). ''; default = null; type = nullOr str; diff --git a/nixos/modules/services/cluster/kubernetes/proxy.nix b/nixos/modules/services/cluster/kubernetes/proxy.nix index 51114c32499..015784f7e31 100644 --- a/nixos/modules/services/cluster/kubernetes/proxy.nix +++ b/nixos/modules/services/cluster/kubernetes/proxy.nix @@ -21,7 +21,7 @@ in type = str; }; - enable = mkEnableOption "Kubernetes proxy"; + enable = mkEnableOption (lib.mdDoc "Kubernetes proxy"); extraOpts = mkOption { description = lib.mdDoc "Kubernetes proxy extra command line options."; diff --git a/nixos/modules/services/cluster/kubernetes/scheduler.nix b/nixos/modules/services/cluster/kubernetes/scheduler.nix index ddc67889a37..2eada43eb4e 100644 --- a/nixos/modules/services/cluster/kubernetes/scheduler.nix +++ b/nixos/modules/services/cluster/kubernetes/scheduler.nix @@ -17,7 +17,7 @@ in type = str; }; - enable = mkEnableOption "Kubernetes scheduler"; + enable = mkEnableOption (lib.mdDoc "Kubernetes scheduler"); extraOpts = mkOption { description = lib.mdDoc "Kubernetes scheduler extra command line options."; diff --git a/nixos/modules/services/cluster/pacemaker/default.nix b/nixos/modules/services/cluster/pacemaker/default.nix index 41d98a460f5..0f37f4b754f 100644 --- a/nixos/modules/services/cluster/pacemaker/default.nix +++ b/nixos/modules/services/cluster/pacemaker/default.nix @@ -7,7 +7,7 @@ in { # interface options.services.pacemaker = { - enable = mkEnableOption "pacemaker"; + enable = mkEnableOption (lib.mdDoc "pacemaker"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/cluster/patroni/default.nix b/nixos/modules/services/cluster/patroni/default.nix index 1685351e48d..83b372f5949 100644 --- a/nixos/modules/services/cluster/patroni/default.nix +++ b/nixos/modules/services/cluster/patroni/default.nix @@ -15,7 +15,7 @@ in { options.services.patroni = { - enable = mkEnableOption "Patroni"; + enable = mkEnableOption (lib.mdDoc "Patroni"); postgresqlPackage = mkOption { type = types.package; diff --git a/nixos/modules/services/cluster/spark/default.nix b/nixos/modules/services/cluster/spark/default.nix index 30d8fa0fc41..bf39c553733 100644 --- a/nixos/modules/services/cluster/spark/default.nix +++ b/nixos/modules/services/cluster/spark/default.nix @@ -7,7 +7,7 @@ with lib; options = { services.spark = { master = { - enable = mkEnableOption "Spark master service"; + enable = mkEnableOption (lib.mdDoc "Spark master service"); bind = mkOption { type = types.str; description = lib.mdDoc "Address the spark master binds to."; @@ -35,7 +35,7 @@ with lib; }; }; worker = { - enable = mkEnableOption "Spark worker service"; + enable = mkEnableOption (lib.mdDoc "Spark worker service"); workDir = mkOption { type = types.path; description = lib.mdDoc "Spark worker work dir."; diff --git a/nixos/modules/services/computing/boinc/client.nix b/nixos/modules/services/computing/boinc/client.nix index ec88be95ecb..5fb715f4d77 100644 --- a/nixos/modules/services/computing/boinc/client.nix +++ b/nixos/modules/services/computing/boinc/client.nix @@ -47,13 +47,13 @@ in allowRemoteGuiRpc = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' If set to true, any remote host can connect to and control this BOINC client (subject to password authentication). If instead set to false, - only the hosts listed in dataDir/remote_hosts.cfg will be allowed to + only the hosts listed in {var}`dataDir`/remote_hosts.cfg will be allowed to connect. - See also: + See also: ''; }; @@ -61,36 +61,23 @@ in type = types.listOf types.package; default = []; example = literalExpression "[ pkgs.virtualbox ]"; - description = '' + description = lib.mdDoc '' Additional packages to make available in the environment in which BOINC will run. Common choices are: - - - pkgs.virtualbox - - The VirtualBox virtual machine framework. Required by some BOINC - projects, such as ATLAS@home. - - - - pkgs.ocl-icd - - OpenCL infrastructure library. Required by BOINC projects that - use OpenCL, in addition to a device-specific OpenCL driver. - - - - pkgs.linuxPackages.nvidia_x11 - - Provides CUDA libraries. Required by BOINC projects that use - CUDA. Note that this requires an NVIDIA graphics device to be - present on the system. - - Also provides OpenCL drivers for NVIDIA GPUs; - pkgs.ocl-icd is also needed in this case. - - - + + - {var}`pkgs.virtualbox`: + The VirtualBox virtual machine framework. Required by some BOINC + projects, such as ATLAS@home. + - {var}`pkgs.ocl-icd`: + OpenCL infrastructure library. Required by BOINC projects that + use OpenCL, in addition to a device-specific OpenCL driver. + - {var}`pkgs.linuxPackages.nvidia_x11`: + Provides CUDA libraries. Required by BOINC projects that use + CUDA. Note that this requires an NVIDIA graphics device to be + present on the system. + + Also provides OpenCL drivers for NVIDIA GPUs; + {var}`pkgs.ocl-icd` is also needed in this case. ''; }; }; diff --git a/nixos/modules/services/computing/foldingathome/client.nix b/nixos/modules/services/computing/foldingathome/client.nix index ad88fffe43c..d8dd17a5ceb 100644 --- a/nixos/modules/services/computing/foldingathome/client.nix +++ b/nixos/modules/services/computing/foldingathome/client.nix @@ -18,7 +18,7 @@ in '') ]; options.services.foldingathome = { - enable = mkEnableOption "Enable the Folding@home client"; + enable = mkEnableOption (lib.mdDoc "Enable the Folding@home client"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/computing/slurm/slurm.nix b/nixos/modules/services/computing/slurm/slurm.nix index 21877456754..0c80e79d4b7 100644 --- a/nixos/modules/services/computing/slurm/slurm.nix +++ b/nixos/modules/services/computing/slurm/slurm.nix @@ -76,7 +76,7 @@ in }; dbdserver = { - enable = mkEnableOption "SlurmDBD service"; + enable = mkEnableOption (lib.mdDoc "SlurmDBD service"); dbdHost = mkOption { type = types.str; @@ -117,7 +117,7 @@ in }; client = { - enable = mkEnableOption "slurm client daemon"; + enable = mkEnableOption (lib.mdDoc "slurm client daemon"); }; enableStools = mkOption { @@ -285,7 +285,7 @@ in Directory created from generated config files and `config.${opt.extraConfigPaths}`. ''; - description = '' + description = lib.mdDoc '' Path to directory with slurm config files. This option is set by default from the Slurm module and is meant to make the Slurm config file available to other modules. ''; diff --git a/nixos/modules/services/computing/torque/mom.nix b/nixos/modules/services/computing/torque/mom.nix index bf3679847b9..5dd41429bf8 100644 --- a/nixos/modules/services/computing/torque/mom.nix +++ b/nixos/modules/services/computing/torque/mom.nix @@ -17,7 +17,7 @@ in options = { services.torque.mom = { - enable = mkEnableOption "torque computing node"; + enable = mkEnableOption (lib.mdDoc "torque computing node"); serverNode = mkOption { type = types.str; diff --git a/nixos/modules/services/computing/torque/server.nix b/nixos/modules/services/computing/torque/server.nix index 8d923fc04d4..02f20fb37c1 100644 --- a/nixos/modules/services/computing/torque/server.nix +++ b/nixos/modules/services/computing/torque/server.nix @@ -11,7 +11,7 @@ in services.torque.server = { - enable = mkEnableOption "torque server"; + enable = mkEnableOption (lib.mdDoc "torque server"); }; diff --git a/nixos/modules/services/continuous-integration/gitlab-runner.nix b/nixos/modules/services/continuous-integration/gitlab-runner.nix index 9f076e2d7a2..fb148e7cffb 100644 --- a/nixos/modules/services/continuous-integration/gitlab-runner.nix +++ b/nixos/modules/services/continuous-integration/gitlab-runner.nix @@ -109,7 +109,7 @@ let in { options.services.gitlab-runner = { - enable = mkEnableOption "Gitlab Runner"; + enable = mkEnableOption (lib.mdDoc "Gitlab Runner"); configFile = mkOption { type = types.nullOr types.path; default = null; diff --git a/nixos/modules/services/continuous-integration/gocd-agent/default.nix b/nixos/modules/services/continuous-integration/gocd-agent/default.nix index c9e22dff152..c0d752443a1 100644 --- a/nixos/modules/services/continuous-integration/gocd-agent/default.nix +++ b/nixos/modules/services/continuous-integration/gocd-agent/default.nix @@ -8,7 +8,7 @@ let in { options = { services.gocd-agent = { - enable = mkEnableOption "gocd-agent"; + enable = mkEnableOption (lib.mdDoc "gocd-agent"); user = mkOption { default = "gocd-agent"; diff --git a/nixos/modules/services/continuous-integration/gocd-server/default.nix b/nixos/modules/services/continuous-integration/gocd-server/default.nix index 50b5a20ad7e..80e819979fb 100644 --- a/nixos/modules/services/continuous-integration/gocd-server/default.nix +++ b/nixos/modules/services/continuous-integration/gocd-server/default.nix @@ -8,7 +8,7 @@ let in { options = { services.gocd-server = { - enable = mkEnableOption "gocd-server"; + enable = mkEnableOption (lib.mdDoc "gocd-server"); user = mkOption { default = "gocd-server"; diff --git a/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix b/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix index 6f803236daa..663f3df775c 100644 --- a/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix +++ b/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix @@ -236,7 +236,7 @@ in type = types.path; internal = true; defaultText = literalMD "generated `hercules-ci-agent.toml`"; - description = '' + description = lib.mdDoc '' The fully assembled config file. ''; }; diff --git a/nixos/modules/services/databases/aerospike.nix b/nixos/modules/services/databases/aerospike.nix index 9ffedaebf66..21df4cd0577 100644 --- a/nixos/modules/services/databases/aerospike.nix +++ b/nixos/modules/services/databases/aerospike.nix @@ -39,7 +39,7 @@ in options = { services.aerospike = { - enable = mkEnableOption "Aerospike server"; + enable = mkEnableOption (lib.mdDoc "Aerospike server"); package = mkOption { default = pkgs.aerospike; diff --git a/nixos/modules/services/databases/cassandra.nix b/nixos/modules/services/databases/cassandra.nix index 38db1d2e9f7..7556dbfc7b8 100644 --- a/nixos/modules/services/databases/cassandra.nix +++ b/nixos/modules/services/databases/cassandra.nix @@ -101,9 +101,9 @@ in { options.services.cassandra = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' Apache Cassandra – Scalable and highly available database. - ''; + ''); clusterName = mkOption { type = types.str; diff --git a/nixos/modules/services/databases/clickhouse.nix b/nixos/modules/services/databases/clickhouse.nix index 53637f4171c..96607d9a783 100644 --- a/nixos/modules/services/databases/clickhouse.nix +++ b/nixos/modules/services/databases/clickhouse.nix @@ -11,7 +11,7 @@ with lib; services.clickhouse = { - enable = mkEnableOption "ClickHouse database server"; + enable = mkEnableOption (lib.mdDoc "ClickHouse database server"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/databases/cockroachdb.nix b/nixos/modules/services/databases/cockroachdb.nix index b8d7321d00f..26ccb030b3d 100644 --- a/nixos/modules/services/databases/cockroachdb.nix +++ b/nixos/modules/services/databases/cockroachdb.nix @@ -49,7 +49,7 @@ in { options = { services.cockroachdb = { - enable = mkEnableOption "CockroachDB Server"; + enable = mkEnableOption (lib.mdDoc "CockroachDB Server"); listen = addressOption "intra-cluster communication" 26257; @@ -58,7 +58,7 @@ in locality = mkOption { type = types.nullOr types.str; default = null; - description = '' + description = lib.mdDoc '' An ordered, comma-separated list of key-value pairs that describe the topography of the machine. Topography might include country, datacenter or rack designations. Data is automatically replicated to @@ -68,12 +68,12 @@ in like datacenter. The tiers and order must be the same on all nodes. Including more tiers is better than including fewer. For example: - + ``` country=us,region=us-west,datacenter=us-west-1b,rack=12 country=ca,region=ca-east,datacenter=ca-east-2,rack=4 planet=earth,province=manitoba,colo=secondary,power=3 - + ``` ''; }; diff --git a/nixos/modules/services/databases/dgraph.nix b/nixos/modules/services/databases/dgraph.nix index a6178b3d1cc..5726851a43f 100644 --- a/nixos/modules/services/databases/dgraph.nix +++ b/nixos/modules/services/databases/dgraph.nix @@ -53,7 +53,7 @@ in { options = { services.dgraph = { - enable = mkEnableOption "Dgraph native GraphQL database with a graph backend"; + enable = mkEnableOption (lib.mdDoc "Dgraph native GraphQL database with a graph backend"); package = lib.mkPackageOption pkgs "dgraph" { }; diff --git a/nixos/modules/services/databases/dragonflydb.nix b/nixos/modules/services/databases/dragonflydb.nix index e35de2019af..46a0c188c3a 100644 --- a/nixos/modules/services/databases/dragonflydb.nix +++ b/nixos/modules/services/databases/dragonflydb.nix @@ -25,7 +25,7 @@ in options = { services.dragonflydb = { - enable = mkEnableOption "DragonflyDB"; + enable = mkEnableOption (lib.mdDoc "DragonflyDB"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/databases/firebird.nix b/nixos/modules/services/databases/firebird.nix index 4aaf4ca12aa..b2c4a5dd8f6 100644 --- a/nixos/modules/services/databases/firebird.nix +++ b/nixos/modules/services/databases/firebird.nix @@ -40,7 +40,7 @@ in services.firebird = { - enable = mkEnableOption "the Firebird super server"; + enable = mkEnableOption (lib.mdDoc "the Firebird super server"); package = mkOption { default = pkgs.firebird; diff --git a/nixos/modules/services/databases/foundationdb.nix b/nixos/modules/services/databases/foundationdb.nix index 16998b99791..16d539b661e 100644 --- a/nixos/modules/services/databases/foundationdb.nix +++ b/nixos/modules/services/databases/foundationdb.nix @@ -62,7 +62,7 @@ in { options.services.foundationdb = { - enable = mkEnableOption "FoundationDB Server"; + enable = mkEnableOption (lib.mdDoc "FoundationDB Server"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/databases/hbase-standalone.nix b/nixos/modules/services/databases/hbase-standalone.nix index ca891fe8a5c..1ee73ec8d1f 100644 --- a/nixos/modules/services/databases/hbase-standalone.nix +++ b/nixos/modules/services/databases/hbase-standalone.nix @@ -41,10 +41,10 @@ in { options = { services.hbase-standalone = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' HBase master in standalone mode with embedded regionserver and zookeper. Do not use this configuration for production nor for evaluating HBase performance. - ''; + ''); package = mkOption { type = types.package; diff --git a/nixos/modules/services/databases/influxdb2.nix b/nixos/modules/services/databases/influxdb2.nix index 8eeec7816c2..92c5a5d7a40 100644 --- a/nixos/modules/services/databases/influxdb2.nix +++ b/nixos/modules/services/databases/influxdb2.nix @@ -10,7 +10,7 @@ in { options = { services.influxdb2 = { - enable = mkEnableOption "the influxdb2 server"; + enable = mkEnableOption (lib.mdDoc "the influxdb2 server"); package = mkOption { default = pkgs.influxdb2-server; diff --git a/nixos/modules/services/databases/memcached.nix b/nixos/modules/services/databases/memcached.nix index 33627e8ad34..542c80ab2e6 100644 --- a/nixos/modules/services/databases/memcached.nix +++ b/nixos/modules/services/databases/memcached.nix @@ -17,7 +17,7 @@ in options = { services.memcached = { - enable = mkEnableOption "Memcached"; + enable = mkEnableOption (lib.mdDoc "Memcached"); user = mkOption { type = types.str; @@ -37,7 +37,7 @@ in description = lib.mdDoc "The port to bind to."; }; - enableUnixSocket = mkEnableOption "unix socket at /run/memcached/memcached.sock"; + enableUnixSocket = mkEnableOption (lib.mdDoc "unix socket at /run/memcached/memcached.sock"); maxMemory = mkOption { type = types.ints.unsigned; diff --git a/nixos/modules/services/databases/monetdb.nix b/nixos/modules/services/databases/monetdb.nix index c6836128d9a..5573b530a91 100644 --- a/nixos/modules/services/databases/monetdb.nix +++ b/nixos/modules/services/databases/monetdb.nix @@ -12,7 +12,7 @@ in { options = { services.monetdb = { - enable = mkEnableOption "the MonetDB database server"; + enable = mkEnableOption (lib.mdDoc "the MonetDB database server"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/databases/mongodb.nix b/nixos/modules/services/databases/mongodb.nix index 5a52eb98b91..211133de63f 100644 --- a/nixos/modules/services/databases/mongodb.nix +++ b/nixos/modules/services/databases/mongodb.nix @@ -29,7 +29,7 @@ in services.mongodb = { - enable = mkEnableOption "the MongoDB server"; + enable = mkEnableOption (lib.mdDoc "the MongoDB server"); package = mkOption { default = pkgs.mongodb; diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix index ddb4eceb317..ec4524e9061 100644 --- a/nixos/modules/services/databases/mysql.nix +++ b/nixos/modules/services/databases/mysql.nix @@ -31,7 +31,7 @@ in services.mysql = { - enable = mkEnableOption "MySQL server"; + enable = mkEnableOption (lib.mdDoc "MySQL server"); package = mkOption { type = types.package; @@ -44,41 +44,41 @@ in user = mkOption { type = types.str; default = "mysql"; - description = '' + description = lib.mdDoc '' User account under which MySQL runs. - + ::: {.note} If left as the default value this user will automatically be created on system activation, otherwise you are responsible for ensuring the user exists before the MySQL service starts. - + ::: ''; }; group = mkOption { type = types.str; default = "mysql"; - description = '' + description = lib.mdDoc '' Group account under which MySQL runs. - + ::: {.note} If left as the default value this group will automatically be created on system activation, otherwise you are responsible for ensuring the user exists before the MySQL service starts. - + ::: ''; }; dataDir = mkOption { type = types.path; example = "/var/lib/mysql"; - description = '' + description = lib.mdDoc '' The data directory for MySQL. - - If left as the default value of /var/lib/mysql this directory will automatically be created before the MySQL + ::: {.note} + If left as the default value of `/var/lib/mysql` this directory will automatically be created before the MySQL server starts, otherwise you are responsible for ensuring the directory exists with appropriate ownership and permissions. - + ::: ''; }; @@ -107,20 +107,18 @@ in settings = mkOption { type = format.type; default = {}; - description = '' + description = lib.mdDoc '' MySQL configuration. Refer to - , - , - and + , + , + and for details on supported values. - - - MySQL configuration options such as --quick should be treated as - boolean options and provided values such as true, false, - 1, or 0. See the provided example below. - - + ::: {.note} + MySQL configuration options such as `--quick` should be treated as + boolean options and provided values such as `true`, `false`, + `1`, or `0`. See the provided example below. + ::: ''; example = literalExpression '' { diff --git a/nixos/modules/services/databases/neo4j.nix b/nixos/modules/services/databases/neo4j.nix index 833e6606d98..d78ff8390e4 100644 --- a/nixos/modules/services/databases/neo4j.nix +++ b/nixos/modules/services/databases/neo4j.nix @@ -333,9 +333,9 @@ in { enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Enable the HTTP connector for Neo4j. Setting this option to - false will stop Neo4j from listening for incoming + `false` will stop Neo4j from listening for incoming connections on the HTTPS port (7474 by default). ''; }; @@ -538,7 +538,7 @@ in { type = types.listOf types.path; internal = true; readOnly = true; - description = '' + description = lib.mdDoc '' Directories of this policy that will be created automatically when the certificates directory is left at its default value. This includes all options of type path that are left at their diff --git a/nixos/modules/services/databases/pgmanage.nix b/nixos/modules/services/databases/pgmanage.nix index 9ce2265a4de..71ce1d8eca4 100644 --- a/nixos/modules/services/databases/pgmanage.nix +++ b/nixos/modules/services/databases/pgmanage.nix @@ -44,7 +44,7 @@ let in { options.services.pgmanage = { - enable = mkEnableOption "PostgreSQL Administration for the web"; + enable = mkEnableOption (lib.mdDoc "PostgreSQL Administration for the web"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index 36de8b9e874..e84116635a3 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -40,7 +40,7 @@ in services.postgresql = { - enable = mkEnableOption "PostgreSQL Server"; + enable = mkEnableOption (lib.mdDoc "PostgreSQL Server"); package = mkOption { type = types.package; @@ -230,15 +230,15 @@ in settings = mkOption { type = with types; attrsOf (oneOf [ bool float int str ]); default = {}; - description = '' + description = lib.mdDoc '' PostgreSQL configuration. Refer to - - for an overview of postgresql.conf. + + for an overview of `postgresql.conf`. - - String values will automatically be enclosed in single quotes. Single quotes will be - escaped with two single quotes as described by the upstream documentation linked above. - + ::: {.note} + String values will automatically be enclosed in single quotes. Single quotes will be + escaped with two single quotes as described by the upstream documentation linked above. + ::: ''; example = literalExpression '' { @@ -264,7 +264,7 @@ in default = "postgres"; internal = true; readOnly = true; - description = '' + description = lib.mdDoc '' PostgreSQL superuser account to use for various operations. Internal since changing this value would lead to breakage while setting up databases. ''; diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix index b346438cfff..319cbbf965c 100644 --- a/nixos/modules/services/databases/redis.nix +++ b/nixos/modules/services/databases/redis.nix @@ -61,22 +61,22 @@ in { description = lib.mdDoc "Which Redis derivation to use."; }; - vmOverCommit = mkEnableOption '' + vmOverCommit = mkEnableOption (lib.mdDoc '' setting of vm.overcommit_memory to 1 (Suggested for Background Saving: http://redis.io/topics/faq) - ''; + ''); servers = mkOption { type = with types; attrsOf (submodule ({config, name, ...}@args: { options = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' Redis server. Note that the NixOS module for Redis disables kernel support for Transparent Huge Pages (THP), because this features causes major performance problems for Redis, e.g. (https://redis.io/topics/latency). - ''; + ''); user = mkOption { type = types.str; diff --git a/nixos/modules/services/databases/rethinkdb.nix b/nixos/modules/services/databases/rethinkdb.nix index d93f15e8636..f5391b48e89 100644 --- a/nixos/modules/services/databases/rethinkdb.nix +++ b/nixos/modules/services/databases/rethinkdb.nix @@ -15,7 +15,7 @@ in services.rethinkdb = { - enable = mkEnableOption "RethinkDB server"; + enable = mkEnableOption (lib.mdDoc "RethinkDB server"); #package = mkOption { # default = pkgs.rethinkdb; diff --git a/nixos/modules/services/databases/victoriametrics.nix b/nixos/modules/services/databases/victoriametrics.nix index f87a5862f64..638066a42db 100644 --- a/nixos/modules/services/databases/victoriametrics.nix +++ b/nixos/modules/services/databases/victoriametrics.nix @@ -2,7 +2,7 @@ let cfg = config.services.victoriametrics; in { options.services.victoriametrics = with lib; { - enable = mkEnableOption "victoriametrics"; + enable = mkEnableOption (lib.mdDoc "victoriametrics"); package = mkOption { type = types.package; default = pkgs.victoriametrics; diff --git a/nixos/modules/services/desktops/bamf.nix b/nixos/modules/services/desktops/bamf.nix index 13de3a44328..3e40a705534 100644 --- a/nixos/modules/services/desktops/bamf.nix +++ b/nixos/modules/services/desktops/bamf.nix @@ -13,7 +13,7 @@ with lib; options = { services.bamf = { - enable = mkEnableOption "bamf"; + enable = mkEnableOption (lib.mdDoc "bamf"); }; }; diff --git a/nixos/modules/services/desktops/blueman.nix b/nixos/modules/services/desktops/blueman.nix index 18ad610247e..fad2f21bce5 100644 --- a/nixos/modules/services/desktops/blueman.nix +++ b/nixos/modules/services/desktops/blueman.nix @@ -9,7 +9,7 @@ in { ###### interface options = { services.blueman = { - enable = mkEnableOption "blueman"; + enable = mkEnableOption (lib.mdDoc "blueman"); }; }; diff --git a/nixos/modules/services/desktops/flatpak.nix b/nixos/modules/services/desktops/flatpak.nix index 5fecc64b4f7..3b14ad75ab3 100644 --- a/nixos/modules/services/desktops/flatpak.nix +++ b/nixos/modules/services/desktops/flatpak.nix @@ -14,7 +14,7 @@ in { ###### interface options = { services.flatpak = { - enable = mkEnableOption "flatpak"; + enable = mkEnableOption (lib.mdDoc "flatpak"); }; }; diff --git a/nixos/modules/services/desktops/gnome/chrome-gnome-shell.nix b/nixos/modules/services/desktops/gnome/chrome-gnome-shell.nix index 15c5bfbd821..7d0ee9ed022 100644 --- a/nixos/modules/services/desktops/gnome/chrome-gnome-shell.nix +++ b/nixos/modules/services/desktops/gnome/chrome-gnome-shell.nix @@ -18,10 +18,10 @@ with lib; ###### interface options = { - services.gnome.chrome-gnome-shell.enable = mkEnableOption '' + services.gnome.chrome-gnome-shell.enable = mkEnableOption (lib.mdDoc '' Chrome GNOME Shell native host connector, a DBus service allowing to install GNOME Shell extensions from a web browser. - ''; + ''); }; diff --git a/nixos/modules/services/desktops/gnome/evolution-data-server.nix b/nixos/modules/services/desktops/gnome/evolution-data-server.nix index 65bb75c62d2..0006ba1a7ba 100644 --- a/nixos/modules/services/desktops/gnome/evolution-data-server.nix +++ b/nixos/modules/services/desktops/gnome/evolution-data-server.nix @@ -27,7 +27,7 @@ with lib; options = { services.gnome.evolution-data-server = { - enable = mkEnableOption "Evolution Data Server, a collection of services for storing addressbooks and calendars."; + enable = mkEnableOption (lib.mdDoc "Evolution Data Server, a collection of services for storing addressbooks and calendars."); plugins = mkOption { type = types.listOf types.package; default = [ ]; @@ -35,7 +35,7 @@ with lib; }; }; programs.evolution = { - enable = mkEnableOption "Evolution, a Personal information management application that provides integrated mail, calendaring and address book functionality."; + enable = mkEnableOption (lib.mdDoc "Evolution, a Personal information management application that provides integrated mail, calendaring and address book functionality."); plugins = mkOption { type = types.listOf types.package; default = [ ]; diff --git a/nixos/modules/services/desktops/gnome/glib-networking.nix b/nixos/modules/services/desktops/gnome/glib-networking.nix index 1039605391a..6b54f46f0cf 100644 --- a/nixos/modules/services/desktops/gnome/glib-networking.nix +++ b/nixos/modules/services/desktops/gnome/glib-networking.nix @@ -24,7 +24,7 @@ with lib; services.gnome.glib-networking = { - enable = mkEnableOption "network extensions for GLib"; + enable = mkEnableOption (lib.mdDoc "network extensions for GLib"); }; diff --git a/nixos/modules/services/desktops/gnome/gnome-initial-setup.nix b/nixos/modules/services/desktops/gnome/gnome-initial-setup.nix index 9e9771cf541..f24e6f1eb15 100644 --- a/nixos/modules/services/desktops/gnome/gnome-initial-setup.nix +++ b/nixos/modules/services/desktops/gnome/gnome-initial-setup.nix @@ -62,7 +62,7 @@ in services.gnome.gnome-initial-setup = { - enable = mkEnableOption "GNOME Initial Setup, a Simple, easy, and safe way to prepare a new system"; + enable = mkEnableOption (lib.mdDoc "GNOME Initial Setup, a Simple, easy, and safe way to prepare a new system"); }; diff --git a/nixos/modules/services/desktops/gnome/gnome-remote-desktop.nix b/nixos/modules/services/desktops/gnome/gnome-remote-desktop.nix index b5573d2fc21..0a5b67eb272 100644 --- a/nixos/modules/services/desktops/gnome/gnome-remote-desktop.nix +++ b/nixos/modules/services/desktops/gnome/gnome-remote-desktop.nix @@ -19,7 +19,7 @@ with lib; ###### interface options = { services.gnome.gnome-remote-desktop = { - enable = mkEnableOption "Remote Desktop support using Pipewire"; + enable = mkEnableOption (lib.mdDoc "Remote Desktop support using Pipewire"); }; }; diff --git a/nixos/modules/services/desktops/gnome/gnome-settings-daemon.nix b/nixos/modules/services/desktops/gnome/gnome-settings-daemon.nix index 9c68c9b76e9..ca739b06a5a 100644 --- a/nixos/modules/services/desktops/gnome/gnome-settings-daemon.nix +++ b/nixos/modules/services/desktops/gnome/gnome-settings-daemon.nix @@ -34,7 +34,7 @@ in services.gnome.gnome-settings-daemon = { - enable = mkEnableOption "GNOME Settings Daemon"; + enable = mkEnableOption (lib.mdDoc "GNOME Settings Daemon"); }; diff --git a/nixos/modules/services/desktops/gnome/gnome-user-share.nix b/nixos/modules/services/desktops/gnome/gnome-user-share.nix index 38256af309c..0c88d13b343 100644 --- a/nixos/modules/services/desktops/gnome/gnome-user-share.nix +++ b/nixos/modules/services/desktops/gnome/gnome-user-share.nix @@ -24,7 +24,7 @@ with lib; services.gnome.gnome-user-share = { - enable = mkEnableOption "GNOME User Share, a user-level file sharing service for GNOME"; + enable = mkEnableOption (lib.mdDoc "GNOME User Share, a user-level file sharing service for GNOME"); }; diff --git a/nixos/modules/services/desktops/gnome/tracker.nix b/nixos/modules/services/desktops/gnome/tracker.nix index 485632712f6..e6404c84a26 100644 --- a/nixos/modules/services/desktops/gnome/tracker.nix +++ b/nixos/modules/services/desktops/gnome/tracker.nix @@ -40,7 +40,7 @@ in type = types.listOf types.package; default = [ ]; internal = true; - description = '' + description = lib.mdDoc '' List of packages containing tracker3 subcommands. ''; }; diff --git a/nixos/modules/services/desktops/gvfs.nix b/nixos/modules/services/desktops/gvfs.nix index 84cd2963872..7e15b433fcc 100644 --- a/nixos/modules/services/desktops/gvfs.nix +++ b/nixos/modules/services/desktops/gvfs.nix @@ -29,7 +29,7 @@ in services.gvfs = { - enable = mkEnableOption "GVfs, a userspace virtual filesystem"; + enable = mkEnableOption (lib.mdDoc "GVfs, a userspace virtual filesystem"); # gvfs can be built with multiple configurations package = mkOption { diff --git a/nixos/modules/services/desktops/malcontent.nix b/nixos/modules/services/desktops/malcontent.nix index 1fbeb17e6ae..27b4577f4c2 100644 --- a/nixos/modules/services/desktops/malcontent.nix +++ b/nixos/modules/services/desktops/malcontent.nix @@ -12,7 +12,7 @@ with lib; services.malcontent = { - enable = mkEnableOption "Malcontent, parental control support for applications"; + enable = mkEnableOption (lib.mdDoc "Malcontent, parental control support for applications"); }; diff --git a/nixos/modules/services/desktops/neard.nix b/nixos/modules/services/desktops/neard.nix index 9b0f8d1b3a7..9130b8d3d21 100644 --- a/nixos/modules/services/desktops/neard.nix +++ b/nixos/modules/services/desktops/neard.nix @@ -7,7 +7,7 @@ with lib; ###### interface options = { services.neard = { - enable = mkEnableOption "neard, NFC daemon"; + enable = mkEnableOption (lib.mdDoc "neard, NFC daemon"); }; }; diff --git a/nixos/modules/services/desktops/pipewire/pipewire.nix b/nixos/modules/services/desktops/pipewire/pipewire.nix index ed64406ab6a..a4ef88a45ad 100644 --- a/nixos/modules/services/desktops/pipewire/pipewire.nix +++ b/nixos/modules/services/desktops/pipewire/pipewire.nix @@ -50,7 +50,7 @@ in { ###### interface options = { services.pipewire = { - enable = mkEnableOption "pipewire service"; + enable = mkEnableOption (lib.mdDoc "pipewire service"); package = mkOption { type = types.package; @@ -127,16 +127,16 @@ in { }; alsa = { - enable = mkEnableOption "ALSA support"; - support32Bit = mkEnableOption "32-bit ALSA support on 64-bit systems"; + enable = mkEnableOption (lib.mdDoc "ALSA support"); + support32Bit = mkEnableOption (lib.mdDoc "32-bit ALSA support on 64-bit systems"); }; jack = { - enable = mkEnableOption "JACK audio emulation"; + enable = mkEnableOption (lib.mdDoc "JACK audio emulation"); }; pulse = { - enable = mkEnableOption "PulseAudio server emulation"; + enable = mkEnableOption (lib.mdDoc "PulseAudio server emulation"); }; systemWide = lib.mkOption { diff --git a/nixos/modules/services/desktops/system-config-printer.nix b/nixos/modules/services/desktops/system-config-printer.nix index 55f27b0e653..caebfabf146 100644 --- a/nixos/modules/services/desktops/system-config-printer.nix +++ b/nixos/modules/services/desktops/system-config-printer.nix @@ -10,7 +10,7 @@ with lib; services.system-config-printer = { - enable = mkEnableOption "system-config-printer, a service for CUPS administration used by printing interfaces"; + enable = mkEnableOption (lib.mdDoc "system-config-printer, a service for CUPS administration used by printing interfaces"); }; diff --git a/nixos/modules/services/desktops/tumbler.nix b/nixos/modules/services/desktops/tumbler.nix index f5341df2f7a..203071ec660 100644 --- a/nixos/modules/services/desktops/tumbler.nix +++ b/nixos/modules/services/desktops/tumbler.nix @@ -28,7 +28,7 @@ in services.tumbler = { - enable = mkEnableOption "Tumbler, A D-Bus thumbnailer service"; + enable = mkEnableOption (lib.mdDoc "Tumbler, A D-Bus thumbnailer service"); }; diff --git a/nixos/modules/services/desktops/zeitgeist.nix b/nixos/modules/services/desktops/zeitgeist.nix index 297fd1d3ff2..0eb2a4c9c37 100644 --- a/nixos/modules/services/desktops/zeitgeist.nix +++ b/nixos/modules/services/desktops/zeitgeist.nix @@ -14,7 +14,7 @@ with lib; options = { services.zeitgeist = { - enable = mkEnableOption "zeitgeist"; + enable = mkEnableOption (lib.mdDoc "zeitgeist"); }; }; diff --git a/nixos/modules/services/development/blackfire.nix b/nixos/modules/services/development/blackfire.nix index 6b71e59d4bd..054cef9ae80 100644 --- a/nixos/modules/services/development/blackfire.nix +++ b/nixos/modules/services/development/blackfire.nix @@ -16,7 +16,7 @@ in { options = { services.blackfire-agent = { - enable = lib.mkEnableOption "Blackfire profiler agent"; + enable = lib.mkEnableOption (lib.mdDoc "Blackfire profiler agent"); settings = lib.mkOption { description = lib.mdDoc '' See https://blackfire.io/docs/up-and-running/configuration/agent diff --git a/nixos/modules/services/development/distccd.nix b/nixos/modules/services/development/distccd.nix index 7a8e780c3eb..a3c909eb195 100644 --- a/nixos/modules/services/development/distccd.nix +++ b/nixos/modules/services/development/distccd.nix @@ -8,7 +8,7 @@ in { options = { services.distccd = { - enable = mkEnableOption "distccd"; + enable = mkEnableOption (lib.mdDoc "distccd"); allowedClients = mkOption { type = types.listOf types.str; @@ -84,7 +84,7 @@ in }; stats = { - enable = mkEnableOption "statistics reporting via HTTP server"; + enable = mkEnableOption (lib.mdDoc "statistics reporting via HTTP server"); port = mkOption { type = types.port; default = 3633; diff --git a/nixos/modules/services/development/hoogle.nix b/nixos/modules/services/development/hoogle.nix index 399ffccabfc..88dd01fd8aa 100644 --- a/nixos/modules/services/development/hoogle.nix +++ b/nixos/modules/services/development/hoogle.nix @@ -14,7 +14,7 @@ let in { options.services.hoogle = { - enable = mkEnableOption "Haskell documentation server"; + enable = mkEnableOption (lib.mdDoc "Haskell documentation server"); port = mkOption { type = types.port; @@ -29,11 +29,11 @@ in { default = hp: []; defaultText = literalExpression "hp: []"; example = literalExpression "hp: with hp; [ text lens ]"; - description = '' + description = lib.mdDoc '' The Haskell packages to generate documentation for. The option value is a function that takes the package set specified in - the haskellPackages option as its sole parameter and + the {var}`haskellPackages` option as its sole parameter and returns a list of packages. ''; }; diff --git a/nixos/modules/services/development/jupyter/default.nix b/nixos/modules/services/development/jupyter/default.nix index 66113ce0940..9b0178d3ea6 100644 --- a/nixos/modules/services/development/jupyter/default.nix +++ b/nixos/modules/services/development/jupyter/default.nix @@ -24,7 +24,7 @@ in { meta.maintainers = with maintainers; [ aborsu ]; options.services.jupyter = { - enable = mkEnableOption "Jupyter development server"; + enable = mkEnableOption (lib.mdDoc "Jupyter development server"); ip = mkOption { type = types.str; diff --git a/nixos/modules/services/development/jupyterhub/default.nix b/nixos/modules/services/development/jupyterhub/default.nix index bd8a5f0bd25..c0c0734cac0 100644 --- a/nixos/modules/services/development/jupyterhub/default.nix +++ b/nixos/modules/services/development/jupyterhub/default.nix @@ -30,7 +30,7 @@ in { meta.maintainers = with maintainers; [ costrouc ]; options.services.jupyterhub = { - enable = mkEnableOption "Jupyterhub development server"; + enable = mkEnableOption (lib.mdDoc "Jupyterhub development server"); authentication = mkOption { type = types.str; diff --git a/nixos/modules/services/development/rstudio-server/default.nix b/nixos/modules/services/development/rstudio-server/default.nix index 74a7cd2f4e5..bf4c7727bf7 100644 --- a/nixos/modules/services/development/rstudio-server/default.nix +++ b/nixos/modules/services/development/rstudio-server/default.nix @@ -21,7 +21,7 @@ in meta.maintainers = with maintainers; [ jbedo cfhammill ]; options.services.rstudio-server = { - enable = mkEnableOption "RStudio server"; + enable = mkEnableOption (lib.mdDoc "RStudio server"); serverWorkingDir = mkOption { type = types.str; diff --git a/nixos/modules/services/development/zammad.nix b/nixos/modules/services/development/zammad.nix index e81eef3c0a5..7de11b08b7e 100644 --- a/nixos/modules/services/development/zammad.nix +++ b/nixos/modules/services/development/zammad.nix @@ -28,7 +28,7 @@ in options = { services.zammad = { - enable = mkEnableOption "Zammad, a web-based, open source user support/ticketing solution."; + enable = mkEnableOption (lib.mdDoc "Zammad, a web-based, open source user support/ticketing solution."); package = mkOption { type = types.package; @@ -137,9 +137,9 @@ in { } ''; - description = '' - The database.yml configuration file as key value set. - See + description = lib.mdDoc '' + The {file}`database.yml` configuration file as key value set. + See \ for list of configuration parameters. ''; }; @@ -149,20 +149,20 @@ in type = types.nullOr types.path; default = null; example = "/run/keys/secret_key_base"; - description = '' + description = lib.mdDoc '' The path to a file containing the - secret_key_base secret. + `secret_key_base` secret. - Zammad uses secret_key_base to encrypt + Zammad uses `secret_key_base` to encrypt the cookie store, which contains session data, and to digest user auth tokens. Needs to be a 64 byte long string of hexadecimal characters. You can generate one by running - - $ openssl rand -hex 64 >/path/to/secret_key_base_file - + ``` + openssl rand -hex 64 >/path/to/secret_key_base_file + ``` This should be a string, not a nix path, since nix paths are copied into the world-readable nix store. diff --git a/nixos/modules/services/display-managers/greetd.nix b/nixos/modules/services/display-managers/greetd.nix index a81fcbf19d1..fa3f8fdf4f1 100644 --- a/nixos/modules/services/display-managers/greetd.nix +++ b/nixos/modules/services/display-managers/greetd.nix @@ -8,7 +8,7 @@ let in { options.services.greetd = { - enable = mkEnableOption "greetd"; + enable = mkEnableOption (lib.mdDoc "greetd"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/editors/emacs.nix b/nixos/modules/services/editors/emacs.nix index 0d9949d2ba5..5ae28cd9bbb 100644 --- a/nixos/modules/services/editors/emacs.nix +++ b/nixos/modules/services/editors/emacs.nix @@ -41,24 +41,24 @@ in enable = mkOption { type = types.bool; default = false; - description = '' - Whether to enable a user service for the Emacs daemon. Use emacsclient to connect to the - daemon. If true, services.emacs.install is - considered true, whatever its value. + description = lib.mdDoc '' + Whether to enable a user service for the Emacs daemon. Use `emacsclient` to connect to the + daemon. If `true`, {var}`services.emacs.install` is + considered `true`, whatever its value. ''; }; install = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to install a user service for the Emacs daemon. Once the service is started, use emacsclient to connect to the daemon. The service must be manually started for each user with "systemctl --user start emacs" or globally through - services.emacs.enable. + {var}`services.emacs.enable`. ''; }; diff --git a/nixos/modules/services/editors/haste.nix b/nixos/modules/services/editors/haste.nix index 2208dccbc03..a46415d4363 100644 --- a/nixos/modules/services/editors/haste.nix +++ b/nixos/modules/services/editors/haste.nix @@ -10,8 +10,8 @@ let in { options.services.haste-server = { - enable = mkEnableOption "haste-server"; - openFirewall = mkEnableOption "firewall passthrough for haste-server"; + enable = mkEnableOption (lib.mdDoc "haste-server"); + openFirewall = mkEnableOption (lib.mdDoc "firewall passthrough for haste-server"); settings = mkOption { description = lib.mdDoc '' diff --git a/nixos/modules/services/editors/infinoted.nix b/nixos/modules/services/editors/infinoted.nix index c91197ea57b..de098999401 100644 --- a/nixos/modules/services/editors/infinoted.nix +++ b/nixos/modules/services/editors/infinoted.nix @@ -6,7 +6,7 @@ let cfg = config.services.infinoted; in { options.services.infinoted = { - enable = mkEnableOption "infinoted"; + enable = mkEnableOption (lib.mdDoc "infinoted"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/finance/odoo.nix b/nixos/modules/services/finance/odoo.nix index 78c54a9e056..fee9af574b5 100644 --- a/nixos/modules/services/finance/odoo.nix +++ b/nixos/modules/services/finance/odoo.nix @@ -9,7 +9,7 @@ in { options = { services.odoo = { - enable = mkEnableOption "odoo"; + enable = mkEnableOption (lib.mdDoc "odoo"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/games/asf.nix b/nixos/modules/services/games/asf.nix index 592ab4bedcf..10847e8f11f 100644 --- a/nixos/modules/services/games/asf.nix +++ b/nixos/modules/services/games/asf.nix @@ -44,7 +44,7 @@ in type = types.submodule { options = { enable = mkEnableOption - "Wheter to start the web-ui. This is the preferred way of configuring things such as the steam guard token"; + (lib.mdDoc "Wheter to start the web-ui. This is the preferred way of configuring things such as the steam guard token"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/games/factorio.nix b/nixos/modules/services/games/factorio.nix index 893afa97722..f54c265c34b 100644 --- a/nixos/modules/services/games/factorio.nix +++ b/nixos/modules/services/games/factorio.nix @@ -44,7 +44,7 @@ in { options = { services.factorio = { - enable = mkEnableOption name; + enable = mkEnableOption (lib.mdDoc name); port = mkOption { type = types.int; default = 34197; diff --git a/nixos/modules/services/games/freeciv.nix b/nixos/modules/services/games/freeciv.nix index 02af9fda7af..8b340bb161a 100644 --- a/nixos/modules/services/games/freeciv.nix +++ b/nixos/modules/services/games/freeciv.nix @@ -25,7 +25,7 @@ in { options = { services.freeciv = { - enable = mkEnableOption ''freeciv''; + enable = mkEnableOption (lib.mdDoc ''freeciv''); settings = mkOption { description = lib.mdDoc '' Parameters of freeciv-server. @@ -38,7 +38,7 @@ in default = "none"; description = lib.mdDoc "Announce game in LAN using given protocol."; }; - options.auth = mkEnableOption "server authentication"; + options.auth = mkEnableOption (lib.mdDoc "server authentication"); options.Database = mkOption { type = types.nullOr types.str; apply = pkgs.writeText "auth.conf"; @@ -54,9 +54,9 @@ in default = 0; description = lib.mdDoc "Set debug log level."; }; - options.exit-on-end = mkEnableOption "exit instead of restarting when a game ends."; - options.Guests = mkEnableOption "guests to login if auth is enabled"; - options.Newusers = mkEnableOption "new users to login if auth is enabled"; + options.exit-on-end = mkEnableOption (lib.mdDoc "exit instead of restarting when a game ends."); + options.Guests = mkEnableOption (lib.mdDoc "guests to login if auth is enabled"); + options.Newusers = mkEnableOption (lib.mdDoc "new users to login if auth is enabled"); options.port = mkOption { type = types.port; default = 5556; @@ -86,7 +86,7 @@ in }; }; }; - openFirewall = mkEnableOption "opening the firewall for the port listening for clients"; + openFirewall = mkEnableOption (lib.mdDoc "opening the firewall for the port listening for clients"); }; }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/games/openarena.nix b/nixos/modules/services/games/openarena.nix index e38bc8f205a..89e30d7c12a 100644 --- a/nixos/modules/services/games/openarena.nix +++ b/nixos/modules/services/games/openarena.nix @@ -8,7 +8,7 @@ in { options = { services.openarena = { - enable = mkEnableOption "OpenArena"; + enable = mkEnableOption (lib.mdDoc "OpenArena"); openPorts = mkOption { type = types.bool; diff --git a/nixos/modules/services/games/quake3-server.nix b/nixos/modules/services/games/quake3-server.nix index ee1bb9aad47..2d2148237da 100644 --- a/nixos/modules/services/games/quake3-server.nix +++ b/nixos/modules/services/games/quake3-server.nix @@ -37,7 +37,7 @@ let in { options = { services.quake3-server = { - enable = mkEnableOption "Quake 3 dedicated server"; + enable = mkEnableOption (lib.mdDoc "Quake 3 dedicated server"); port = mkOption { type = types.port; diff --git a/nixos/modules/services/games/teeworlds.nix b/nixos/modules/services/games/teeworlds.nix index 6ddd0bee60c..083ab3ba94e 100644 --- a/nixos/modules/services/games/teeworlds.nix +++ b/nixos/modules/services/games/teeworlds.nix @@ -20,7 +20,7 @@ in { options = { services.teeworlds = { - enable = mkEnableOption "Teeworlds Server"; + enable = mkEnableOption (lib.mdDoc "Teeworlds Server"); openPorts = mkOption { type = types.bool; @@ -80,8 +80,8 @@ in extraOptions = mkOption { type = types.listOf types.str; default = []; - description = '' - Extra configuration lines for the teeworlds.cfg. See Teeworlds Documentation. + description = lib.mdDoc '' + Extra configuration lines for the {file}`teeworlds.cfg`. See [Teeworlds Documentation](https://www.teeworlds.com/?page=docs&wiki=server_settings). ''; example = [ "sv_map dm1" "sv_gametype dm" ]; }; diff --git a/nixos/modules/services/hardware/acpid.nix b/nixos/modules/services/hardware/acpid.nix index fef2c14b9dc..821f4ef205f 100644 --- a/nixos/modules/services/hardware/acpid.nix +++ b/nixos/modules/services/hardware/acpid.nix @@ -48,7 +48,7 @@ in services.acpid = { - enable = mkEnableOption "the ACPI daemon"; + enable = mkEnableOption (lib.mdDoc "the ACPI daemon"); logEvents = mkOption { type = types.bool; @@ -72,12 +72,12 @@ in }; }); - description = '' + description = lib.mdDoc '' Event handlers. - - Handler can be a single command. - + ::: {.note} + Handler can be a single command. + ::: ''; default = {}; example = { diff --git a/nixos/modules/services/hardware/actkbd.nix b/nixos/modules/services/hardware/actkbd.nix index 3ad2998e823..1718d179bf5 100644 --- a/nixos/modules/services/hardware/actkbd.nix +++ b/nixos/modules/services/hardware/actkbd.nix @@ -57,13 +57,13 @@ in enable = mkOption { type = types.bool; default = false; - description = '' - Whether to enable the actkbd key mapping daemon. + description = lib.mdDoc '' + Whether to enable the {command}`actkbd` key mapping daemon. - Turning this on will start an actkbd + Turning this on will start an {command}`actkbd` instance for every evdev input that has at least one key (which is okay even for systems with tiny memory footprint, - since actkbd normally uses <100 bytes of memory per + since actkbd normally uses \<100 bytes of memory per instance). This allows binding keys globally without the need for e.g. diff --git a/nixos/modules/services/hardware/argonone.nix b/nixos/modules/services/hardware/argonone.nix index 61656237d6f..dc90e09e985 100644 --- a/nixos/modules/services/hardware/argonone.nix +++ b/nixos/modules/services/hardware/argonone.nix @@ -5,7 +5,7 @@ let in { options.services.hardware.argonone = { - enable = lib.mkEnableOption "the driver for Argon One Raspberry Pi case fan and power button"; + enable = lib.mkEnableOption (lib.mdDoc "the driver for Argon One Raspberry Pi case fan and power button"); package = lib.mkOption { type = lib.types.package; default = pkgs.argononed; diff --git a/nixos/modules/services/hardware/auto-cpufreq.nix b/nixos/modules/services/hardware/auto-cpufreq.nix index f846476b30b..9698e72eb31 100644 --- a/nixos/modules/services/hardware/auto-cpufreq.nix +++ b/nixos/modules/services/hardware/auto-cpufreq.nix @@ -5,7 +5,7 @@ let in { options = { services.auto-cpufreq = { - enable = mkEnableOption "auto-cpufreq daemon"; + enable = mkEnableOption (lib.mdDoc "auto-cpufreq daemon"); }; }; diff --git a/nixos/modules/services/hardware/bluetooth.nix b/nixos/modules/services/hardware/bluetooth.nix index a1e980dbec5..8b90c1913bc 100644 --- a/nixos/modules/services/hardware/bluetooth.nix +++ b/nixos/modules/services/hardware/bluetooth.nix @@ -36,9 +36,9 @@ in options = { hardware.bluetooth = { - enable = mkEnableOption "support for Bluetooth"; + enable = mkEnableOption (lib.mdDoc "support for Bluetooth"); - hsphfpd.enable = mkEnableOption "support for hsphfpd[-prototype] implementation"; + hsphfpd.enable = mkEnableOption (lib.mdDoc "support for hsphfpd[-prototype] implementation"); powerOnBoot = mkOption { type = types.bool; @@ -51,13 +51,13 @@ in default = pkgs.bluez; defaultText = literalExpression "pkgs.bluez"; example = literalExpression "pkgs.bluezFull"; - description = '' + description = lib.mdDoc '' Which BlueZ package to use. - - Use the pkgs.bluezFull package to enable all - bluez plugins. - + ::: {.note} + Use the `pkgs.bluezFull` package to enable all + bluez plugins. + ::: ''; }; diff --git a/nixos/modules/services/hardware/ddccontrol.nix b/nixos/modules/services/hardware/ddccontrol.nix index f0b5a9c8196..0f1e8bf0d26 100644 --- a/nixos/modules/services/hardware/ddccontrol.nix +++ b/nixos/modules/services/hardware/ddccontrol.nix @@ -13,7 +13,7 @@ in options = { services.ddccontrol = { - enable = lib.mkEnableOption "ddccontrol for controlling displays"; + enable = lib.mkEnableOption (lib.mdDoc "ddccontrol for controlling displays"); }; }; diff --git a/nixos/modules/services/hardware/fancontrol.nix b/nixos/modules/services/hardware/fancontrol.nix index 65c0c60ed3b..e7eb8ebf92b 100644 --- a/nixos/modules/services/hardware/fancontrol.nix +++ b/nixos/modules/services/hardware/fancontrol.nix @@ -9,7 +9,7 @@ let in { options.hardware.fancontrol = { - enable = mkEnableOption "software fan control (requires fancontrol.config)"; + enable = mkEnableOption (lib.mdDoc "software fan control (requires fancontrol.config)"); config = mkOption { type = types.lines; diff --git a/nixos/modules/services/hardware/irqbalance.nix b/nixos/modules/services/hardware/irqbalance.nix index c79e0eb83ec..8ba0a73d895 100644 --- a/nixos/modules/services/hardware/irqbalance.nix +++ b/nixos/modules/services/hardware/irqbalance.nix @@ -9,7 +9,7 @@ let in { - options.services.irqbalance.enable = mkEnableOption "irqbalance daemon"; + options.services.irqbalance.enable = mkEnableOption (lib.mdDoc "irqbalance daemon"); config = mkIf cfg.enable { diff --git a/nixos/modules/services/hardware/joycond.nix b/nixos/modules/services/hardware/joycond.nix index c3a71edaa2f..f4da00762a4 100644 --- a/nixos/modules/services/hardware/joycond.nix +++ b/nixos/modules/services/hardware/joycond.nix @@ -9,7 +9,7 @@ with lib; { options.services.joycond = { - enable = mkEnableOption "support for Nintendo Pro Controllers and Joycons"; + enable = mkEnableOption (lib.mdDoc "support for Nintendo Pro Controllers and Joycons"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/hardware/kanata.nix b/nixos/modules/services/hardware/kanata.nix index ca4bb7a7f1f..84265eb8f94 100644 --- a/nixos/modules/services/hardware/kanata.nix +++ b/nixos/modules/services/hardware/kanata.nix @@ -176,7 +176,7 @@ let in { options.services.kanata = { - enable = mkEnableOption "kanata"; + enable = mkEnableOption (lib.mdDoc "kanata"); package = mkOption { type = types.package; default = pkgs.kanata; diff --git a/nixos/modules/services/hardware/lcd.nix b/nixos/modules/services/hardware/lcd.nix index c817225c1f2..8d682d137f4 100644 --- a/nixos/modules/services/hardware/lcd.nix +++ b/nixos/modules/services/hardware/lcd.nix @@ -61,20 +61,20 @@ in with lib; { usbPermissions = mkOption { type = bool; default = false; - description = '' + description = lib.mdDoc '' Set group-write permissions on a USB device. A USB connected LCD panel will most likely require having its permissions modified for lcdd to write to it. Enabling this option sets group-write permissions on the device identified by - and - . In order to find the - values, you can run the lsusb command. Example + {option}`services.hardware.lcd.usbVid` and + {option}`services.hardware.lcd.usbPid`. In order to find the + values, you can run the {command}`lsusb` command. Example output: - + ``` Bus 005 Device 002: ID 0403:c630 Future Technology Devices International, Ltd lcd2usb interface - + ``` In this case the vendor id is 0403 and the product id is c630. ''; diff --git a/nixos/modules/services/hardware/lirc.nix b/nixos/modules/services/hardware/lirc.nix index dfdd768c354..acc43cd4186 100644 --- a/nixos/modules/services/hardware/lirc.nix +++ b/nixos/modules/services/hardware/lirc.nix @@ -11,7 +11,7 @@ in { options = { services.lirc = { - enable = mkEnableOption "LIRC daemon"; + enable = mkEnableOption (lib.mdDoc "LIRC daemon"); options = mkOption { type = types.lines; diff --git a/nixos/modules/services/hardware/pcscd.nix b/nixos/modules/services/hardware/pcscd.nix index 22e4ea49849..44d0d3b04a3 100644 --- a/nixos/modules/services/hardware/pcscd.nix +++ b/nixos/modules/services/hardware/pcscd.nix @@ -16,7 +16,7 @@ in ###### interface options.services.pcscd = { - enable = mkEnableOption "PCSC-Lite daemon"; + enable = mkEnableOption (lib.mdDoc "PCSC-Lite daemon"); plugins = mkOption { type = types.listOf types.package; diff --git a/nixos/modules/services/hardware/rasdaemon.nix b/nixos/modules/services/hardware/rasdaemon.nix index 7048a56cb7f..a1334684b7d 100644 --- a/nixos/modules/services/hardware/rasdaemon.nix +++ b/nixos/modules/services/hardware/rasdaemon.nix @@ -10,7 +10,7 @@ in { options.hardware.rasdaemon = { - enable = mkEnableOption "RAS logging daemon"; + enable = mkEnableOption (lib.mdDoc "RAS logging daemon"); record = mkOption { type = types.bool; @@ -76,7 +76,7 @@ in example = [ "i7core_edac" ]; }; - testing = mkEnableOption "error injection infrastructure"; + testing = mkEnableOption (lib.mdDoc "error injection infrastructure"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/hardware/ratbagd.nix b/nixos/modules/services/hardware/ratbagd.nix index 01a8276750f..c939d5e40a2 100644 --- a/nixos/modules/services/hardware/ratbagd.nix +++ b/nixos/modules/services/hardware/ratbagd.nix @@ -10,7 +10,7 @@ in options = { services.ratbagd = { - enable = mkEnableOption "ratbagd for configuring gaming mice"; + enable = mkEnableOption (lib.mdDoc "ratbagd for configuring gaming mice"); }; }; diff --git a/nixos/modules/services/hardware/sane.nix b/nixos/modules/services/hardware/sane.nix index aaf19c1cc0a..5455cf56e8a 100644 --- a/nixos/modules/services/hardware/sane.nix +++ b/nixos/modules/services/hardware/sane.nix @@ -48,12 +48,12 @@ in hardware.sane.enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Enable support for SANE scanners. - - Users in the "scanner" group will gain access to the scanner, or the "lp" group if it's also a printer. - + ::: {.note} + Users in the "scanner" group will gain access to the scanner, or the "lp" group if it's also a printer. + ::: ''; }; @@ -66,12 +66,12 @@ in hardware.sane.extraBackends = mkOption { type = types.listOf types.path; default = []; - description = '' + description = lib.mdDoc '' Packages providing extra SANE backends to enable. - - The example contains the package for HP scanners. - + ::: {.note} + The example contains the package for HP scanners. + ::: ''; example = literalExpression "[ pkgs.hplipWithPlugin ]"; }; @@ -89,7 +89,7 @@ in hardware.sane.configDir = mkOption { type = types.str; internal = true; - description = "The value of SANE_CONFIG_DIR."; + description = lib.mdDoc "The value of SANE_CONFIG_DIR."; }; hardware.sane.netConf = mkOption { diff --git a/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix b/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix index f01446c411e..e737a4ce20d 100644 --- a/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix +++ b/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix @@ -68,8 +68,8 @@ in options = { hardware.sane.brscan4.enable = - mkEnableOption "Brother's brscan4 scan backend" // { - description = '' + mkEnableOption (lib.mdDoc "Brother's brscan4 scan backend") // { + description = lib.mdDoc '' When enabled, will automatically register the "brscan4" sane backend and bring configuration files to their expected location. ''; diff --git a/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix b/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix index 506cb8167ea..d29e0f542f5 100644 --- a/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix +++ b/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix @@ -68,7 +68,7 @@ in options = { hardware.sane.brscan5.enable = - mkEnableOption "the Brother brscan5 sane backend"; + mkEnableOption (lib.mdDoc "the Brother brscan5 sane backend"); hardware.sane.brscan5.netDevices = mkOption { default = {}; diff --git a/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix b/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix index d71a17f5ea6..5b05694abc0 100644 --- a/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix +++ b/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix @@ -6,8 +6,8 @@ with lib; options = { hardware.sane.dsseries.enable = - mkEnableOption "Brother DSSeries scan backend" // { - description = '' + mkEnableOption (lib.mdDoc "Brother DSSeries scan backend") // { + description = lib.mdDoc '' When enabled, will automatically register the "dsseries" SANE backend. This supports the Brother DSmobile scanner series, including the diff --git a/nixos/modules/services/hardware/spacenavd.nix b/nixos/modules/services/hardware/spacenavd.nix index 69ca6f102ef..36f13243937 100644 --- a/nixos/modules/services/hardware/spacenavd.nix +++ b/nixos/modules/services/hardware/spacenavd.nix @@ -8,7 +8,7 @@ in { options = { hardware.spacenavd = { - enable = mkEnableOption "spacenavd to support 3DConnexion devices"; + enable = mkEnableOption (lib.mdDoc "spacenavd to support 3DConnexion devices"); }; }; diff --git a/nixos/modules/services/hardware/thermald.nix b/nixos/modules/services/hardware/thermald.nix index b433f46f286..6b694ede588 100644 --- a/nixos/modules/services/hardware/thermald.nix +++ b/nixos/modules/services/hardware/thermald.nix @@ -9,7 +9,7 @@ in ###### interface options = { services.thermald = { - enable = mkEnableOption "thermald, the temperature management daemon"; + enable = mkEnableOption (lib.mdDoc "thermald, the temperature management daemon"); debug = mkOption { type = types.bool; diff --git a/nixos/modules/services/hardware/throttled.nix b/nixos/modules/services/hardware/throttled.nix index 559b29627cb..99735ff6519 100644 --- a/nixos/modules/services/hardware/throttled.nix +++ b/nixos/modules/services/hardware/throttled.nix @@ -7,7 +7,7 @@ let in { options = { services.throttled = { - enable = mkEnableOption "fix for Intel CPU throttling"; + enable = mkEnableOption (lib.mdDoc "fix for Intel CPU throttling"); extraConfig = mkOption { type = types.str; diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix index 1723cb50848..fa9d06b441a 100644 --- a/nixos/modules/services/hardware/udev.nix +++ b/nixos/modules/services/hardware/udev.nix @@ -222,8 +222,8 @@ in path = mkOption { type = types.listOf types.path; default = []; - description = '' - Packages added to the PATH environment variable when + description = lib.mdDoc '' + Packages added to the {env}`PATH` environment variable when executing programs from Udev rules. ''; }; @@ -300,13 +300,13 @@ in type = types.listOf types.path; default = []; visible = false; - description = '' - This will only be used when systemd is used in stage 1. + description = lib.mdDoc '' + *This will only be used when systemd is used in stage 1.* - List of packages containing udev rules that will be copied to stage 1. + List of packages containing {command}`udev` rules that will be copied to stage 1. All files found in - «pkg»/etc/udev/rules.d and - «pkg»/lib/udev/rules.d + {file}`«pkg»/etc/udev/rules.d` and + {file}`«pkg»/lib/udev/rules.d` will be included. ''; }; @@ -315,8 +315,8 @@ in type = types.listOf types.path; default = []; visible = false; - description = '' - This will only be used when systemd is used in stage 1. + description = lib.mdDoc '' + *This will only be used when systemd is used in stage 1.* Packages to search for binaries that are referenced by the udev rules in stage 1. This list always contains /bin of the initrd. diff --git a/nixos/modules/services/hardware/udisks2.nix b/nixos/modules/services/hardware/udisks2.nix index 988e975d7e6..70667dc6d3b 100644 --- a/nixos/modules/services/hardware/udisks2.nix +++ b/nixos/modules/services/hardware/udisks2.nix @@ -19,7 +19,7 @@ in services.udisks2 = { - enable = mkEnableOption "udisks2, a DBus service that allows applications to query and manipulate storage devices."; + enable = mkEnableOption (lib.mdDoc "udisks2, a DBus service that allows applications to query and manipulate storage devices."); settings = mkOption rec { type = types.attrsOf settingsFormat.type; diff --git a/nixos/modules/services/hardware/undervolt.nix b/nixos/modules/services/hardware/undervolt.nix index 2bf37b41126..c49d944cdc1 100644 --- a/nixos/modules/services/hardware/undervolt.nix +++ b/nixos/modules/services/hardware/undervolt.nix @@ -33,11 +33,11 @@ let in { options.services.undervolt = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' Undervolting service for Intel CPUs. Warning: This service is not endorsed by Intel and may permanently damage your hardware. Use at your own risk! - ''; + ''); verbose = mkOption { type = types.bool; diff --git a/nixos/modules/services/hardware/upower.nix b/nixos/modules/services/hardware/upower.nix index 54208158b1a..aacc8a63dbe 100644 --- a/nixos/modules/services/hardware/upower.nix +++ b/nixos/modules/services/hardware/upower.nix @@ -39,7 +39,7 @@ in enableWattsUpPro = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Enable the Watts Up Pro device. The Watts Up Pro contains a generic FTDI USB device without a specific @@ -49,10 +49,8 @@ in The generic FTDI device is known to also be used on: - - Sparkfun FT232 breakout board - Parallax Propeller - + - Sparkfun FT232 breakout board + - Parallax Propeller ''; }; diff --git a/nixos/modules/services/hardware/usbrelayd.nix b/nixos/modules/services/hardware/usbrelayd.nix index 471657190bb..d45edb149c0 100644 --- a/nixos/modules/services/hardware/usbrelayd.nix +++ b/nixos/modules/services/hardware/usbrelayd.nix @@ -5,7 +5,7 @@ let in { options.services.usbrelayd = with types; { - enable = mkEnableOption "USB Relay MQTT daemon"; + enable = mkEnableOption (lib.mdDoc "USB Relay MQTT daemon"); broker = mkOption { type = str; diff --git a/nixos/modules/services/hardware/vdr.nix b/nixos/modules/services/hardware/vdr.nix index 4fc2905c096..de63ed893b0 100644 --- a/nixos/modules/services/hardware/vdr.nix +++ b/nixos/modules/services/hardware/vdr.nix @@ -12,7 +12,7 @@ in { options = { services.vdr = { - enable = mkEnableOption "VDR. Please put config into ${libDir}"; + enable = mkEnableOption (lib.mdDoc "VDR. Please put config into ${libDir}"); package = mkOption { type = types.package; @@ -34,7 +34,7 @@ in { description = lib.mdDoc "Additional command line arguments to pass to VDR."; }; - enableLirc = mkEnableOption "LIRC"; + enableLirc = mkEnableOption (lib.mdDoc "LIRC"); }; }; diff --git a/nixos/modules/services/home-automation/home-assistant.nix b/nixos/modules/services/home-automation/home-assistant.nix index c435491e71a..ab29ab80126 100644 --- a/nixos/modules/services/home-automation/home-assistant.nix +++ b/nixos/modules/services/home-automation/home-assistant.nix @@ -77,7 +77,7 @@ in { options.services.home-assistant = { # Running home-assistant on NixOS is considered an installation method that is unsupported by the upstream project. # https://github.com/home-assistant/architecture/blob/master/adr/0012-define-supported-installation-method.md#decision - enable = mkEnableOption "Home Assistant. Please note that this installation method is unsupported upstream"; + enable = mkEnableOption (lib.mdDoc "Home Assistant. Please note that this installation method is unsupported upstream"); configDir = mkOption { default = "/var/lib/hass"; diff --git a/nixos/modules/services/home-automation/zigbee2mqtt.nix b/nixos/modules/services/home-automation/zigbee2mqtt.nix index 48474ab3fac..691ca62208e 100644 --- a/nixos/modules/services/home-automation/zigbee2mqtt.nix +++ b/nixos/modules/services/home-automation/zigbee2mqtt.nix @@ -18,7 +18,7 @@ in ]; options.services.zigbee2mqtt = { - enable = mkEnableOption "enable zigbee2mqtt service"; + enable = mkEnableOption (lib.mdDoc "enable zigbee2mqtt service"); package = mkOption { description = lib.mdDoc "Zigbee2mqtt package to use"; diff --git a/nixos/modules/services/logging/awstats.nix b/nixos/modules/services/logging/awstats.nix index ad87c3bd907..708775bfcf0 100644 --- a/nixos/modules/services/logging/awstats.nix +++ b/nixos/modules/services/logging/awstats.nix @@ -25,26 +25,26 @@ let logFile = mkOption { type = types.str; example = "/var/log/nginx/access.log"; - description = '' + description = lib.mdDoc '' The log file to be scanned. For mail, set this to - + ``` journalctl $OLD_CURSOR -u postfix.service | ''${pkgs.perl}/bin/perl ''${pkgs.awstats.out}/share/awstats/tools/maillogconvert.pl standard | - + ``` ''; }; logFormat = mkOption { type = types.str; default = "1"; - description = '' + description = lib.mdDoc '' The log format being used. For mail, set this to - + ``` %time2 %email %email_r %host %host_r %method %url %code %bytesd - + ``` ''; }; @@ -69,7 +69,7 @@ let }; webService = { - enable = mkEnableOption "awstats web service"; + enable = mkEnableOption (lib.mdDoc "awstats web service"); hostname = mkOption { type = types.str; @@ -95,7 +95,7 @@ in ]; options.services.awstats = { - enable = mkEnableOption "awstats"; + enable = mkEnableOption (lib.mdDoc "awstats"); dataDir = mkOption { type = types.path; diff --git a/nixos/modules/services/logging/filebeat.nix b/nixos/modules/services/logging/filebeat.nix index 3dc9df372ac..5b5e7fd5ae8 100644 --- a/nixos/modules/services/logging/filebeat.nix +++ b/nixos/modules/services/logging/filebeat.nix @@ -18,7 +18,7 @@ in services.filebeat = { - enable = mkEnableOption "filebeat"; + enable = mkEnableOption (lib.mdDoc "filebeat"); package = mkOption { type = types.package; @@ -159,27 +159,27 @@ in type = types.listOf json.type; default = []; internal = true; - description = '' + description = lib.mdDoc '' Inputs specify how Filebeat locates and processes - input data. Use instead. + input data. Use [](#opt-services.filebeat.inputs) instead. - See . + See . ''; }; modules = mkOption { type = types.listOf json.type; default = []; internal = true; - description = '' + description = lib.mdDoc '' Filebeat modules provide a quick way to get started processing common log formats. They contain default configurations, Elasticsearch ingest pipeline definitions, and Kibana dashboards to help you implement and deploy a log monitoring solution. - Use instead. + Use [](#opt-services.filebeat.modules) instead. - See . + See . ''; }; }; diff --git a/nixos/modules/services/logging/graylog.nix b/nixos/modules/services/logging/graylog.nix index 9f7160b3e87..70c3ca50888 100644 --- a/nixos/modules/services/logging/graylog.nix +++ b/nixos/modules/services/logging/graylog.nix @@ -33,7 +33,7 @@ in services.graylog = { - enable = mkEnableOption "Graylog"; + enable = mkEnableOption (lib.mdDoc "Graylog"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/logging/heartbeat.nix b/nixos/modules/services/logging/heartbeat.nix index 72fbf41739d..a9ae11ec66e 100644 --- a/nixos/modules/services/logging/heartbeat.nix +++ b/nixos/modules/services/logging/heartbeat.nix @@ -18,7 +18,7 @@ in services.heartbeat = { - enable = mkEnableOption "heartbeat"; + enable = mkEnableOption (lib.mdDoc "heartbeat"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/logging/journalbeat.nix b/nixos/modules/services/logging/journalbeat.nix index a38283ae1e4..e761380552d 100644 --- a/nixos/modules/services/logging/journalbeat.nix +++ b/nixos/modules/services/logging/journalbeat.nix @@ -18,7 +18,7 @@ in services.journalbeat = { - enable = mkEnableOption "journalbeat"; + enable = mkEnableOption (lib.mdDoc "journalbeat"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/logging/logrotate.nix b/nixos/modules/services/logging/logrotate.nix index 3ea130a891d..5ea54a4cf92 100644 --- a/nixos/modules/services/logging/logrotate.nix +++ b/nixos/modules/services/logging/logrotate.nix @@ -205,7 +205,7 @@ in options = { services.logrotate = { - enable = mkEnableOption "the logrotate systemd service" // { + enable = mkEnableOption (lib.mdDoc "the logrotate systemd service") // { default = foldr (n: a: a || n.enable) false (attrValues cfg.settings); defaultText = literalExpression "cfg.settings != {}"; }; @@ -222,7 +222,7 @@ in freeformType = with types; attrsOf (nullOr (oneOf [ int bool str ])); options = { - enable = mkEnableOption "setting individual kill switch" // { + enable = mkEnableOption (lib.mdDoc "setting individual kill switch") // { default = true; }; @@ -316,11 +316,11 @@ in paths = mkOption { type = with types; attrsOf (submodule pathOpts); default = { }; - description = '' + description = lib.mdDoc '' Attribute set of paths to rotate. The order each block appears in the generated configuration file - can be controlled by the priority option + can be controlled by the [priority](#opt-services.logrotate.paths._name_.priority) option using the same semantics as `lib.mkOrder`. Smaller values have a greater priority. - This setting has been deprecated in favor of logrotate settings. + This setting has been deprecated in favor of [logrotate settings](#opt-services.logrotate.settings). ''; example = literalExpression '' { diff --git a/nixos/modules/services/logging/promtail.nix b/nixos/modules/services/logging/promtail.nix index bdf98322fa4..9db82fd42b2 100644 --- a/nixos/modules/services/logging/promtail.nix +++ b/nixos/modules/services/logging/promtail.nix @@ -12,7 +12,7 @@ let positionsFile = cfg.configuration.positions.filename; in { options.services.promtail = with types; { - enable = mkEnableOption "the Promtail ingresser"; + enable = mkEnableOption (lib.mdDoc "the Promtail ingresser"); configuration = mkOption { diff --git a/nixos/modules/services/logging/rsyslogd.nix b/nixos/modules/services/logging/rsyslogd.nix index 21d6482d9ff..207d416c1a8 100644 --- a/nixos/modules/services/logging/rsyslogd.nix +++ b/nixos/modules/services/logging/rsyslogd.nix @@ -48,10 +48,10 @@ in defaultConfig = mkOption { type = types.lines; default = defaultConf; - description = '' - The default syslog.conf file configures a + description = lib.mdDoc '' + The default {file}`syslog.conf` file configures a fairly standard setup of log files, which can be extended by - means of extraConfig. + means of {var}`extraConfig`. ''; }; @@ -59,9 +59,9 @@ in type = types.lines; default = ""; example = "news.* -/var/log/news"; - description = '' - Additional text appended to syslog.conf, - i.e. the contents of defaultConfig. + description = lib.mdDoc '' + Additional text appended to {file}`syslog.conf`, + i.e. the contents of {var}`defaultConfig`. ''; }; diff --git a/nixos/modules/services/logging/syslogd.nix b/nixos/modules/services/logging/syslogd.nix index a51bf08e5d2..43969402588 100644 --- a/nixos/modules/services/logging/syslogd.nix +++ b/nixos/modules/services/logging/syslogd.nix @@ -57,10 +57,10 @@ in defaultConfig = mkOption { type = types.lines; default = defaultConf; - description = '' - The default syslog.conf file configures a + description = lib.mdDoc '' + The default {file}`syslog.conf` file configures a fairly standard setup of log files, which can be extended by - means of extraConfig. + means of {var}`extraConfig`. ''; }; @@ -76,9 +76,9 @@ in type = types.lines; default = ""; example = "news.* -/var/log/news"; - description = '' - Additional text appended to syslog.conf, - i.e. the contents of defaultConfig. + description = lib.mdDoc '' + Additional text appended to {file}`syslog.conf`, + i.e. the contents of {var}`defaultConfig`. ''; }; diff --git a/nixos/modules/services/logging/vector.nix b/nixos/modules/services/logging/vector.nix index 93d8550c31b..c4bd4fe809e 100644 --- a/nixos/modules/services/logging/vector.nix +++ b/nixos/modules/services/logging/vector.nix @@ -6,7 +6,7 @@ let cfg = config.services.vector; in { options.services.vector = { - enable = mkEnableOption "Vector"; + enable = mkEnableOption (lib.mdDoc "Vector"); journaldAccess = mkOption { type = types.bool; diff --git a/nixos/modules/services/mail/davmail.nix b/nixos/modules/services/mail/davmail.nix index a01d8758c0e..483f591a726 100644 --- a/nixos/modules/services/mail/davmail.nix +++ b/nixos/modules/services/mail/davmail.nix @@ -25,7 +25,7 @@ in { options.services.davmail = { - enable = mkEnableOption "davmail, an MS Exchange gateway"; + enable = mkEnableOption (lib.mdDoc "davmail, an MS Exchange gateway"); url = mkOption { type = types.str; diff --git a/nixos/modules/services/mail/dkimproxy-out.nix b/nixos/modules/services/mail/dkimproxy-out.nix index aa465891db2..6f9cbc4e9d4 100644 --- a/nixos/modules/services/mail/dkimproxy-out.nix +++ b/nixos/modules/services/mail/dkimproxy-out.nix @@ -45,7 +45,7 @@ in type = types.str; example = "selector1"; description = - '' + lib.mdDoc '' The selector to use for DKIM key identification. For example, if 'selector1' is used here, then for each domain diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix index 4caf8dbfd2b..f6a167572f7 100644 --- a/nixos/modules/services/mail/dovecot.nix +++ b/nixos/modules/services/mail/dovecot.nix @@ -169,13 +169,13 @@ in ]; options.services.dovecot2 = { - enable = mkEnableOption "the dovecot 2.x POP3/IMAP server"; + enable = mkEnableOption (lib.mdDoc "the dovecot 2.x POP3/IMAP server"); - enablePop3 = mkEnableOption "starting the POP3 listener (when Dovecot is enabled)."; + enablePop3 = mkEnableOption (lib.mdDoc "starting the POP3 listener (when Dovecot is enabled)."); - enableImap = mkEnableOption "starting the IMAP listener (when Dovecot is enabled)." // { default = true; }; + enableImap = mkEnableOption (lib.mdDoc "starting the IMAP listener (when Dovecot is enabled).") // { default = true; }; - enableLmtp = mkEnableOption "starting the LMTP listener (when Dovecot is enabled)."; + enableLmtp = mkEnableOption (lib.mdDoc "starting the LMTP listener (when Dovecot is enabled)."); protocols = mkOption { type = types.listOf types.str; @@ -267,9 +267,9 @@ in description = lib.mdDoc "Default group to store mail for virtual users."; }; - createMailUser = mkEnableOption ''automatically creating the user - given in and the group - given in .'' // { default = true; }; + createMailUser = mkEnableOption (lib.mdDoc ''automatically creating the user + given in {option}`services.dovecot.user` and the group + given in {option}`services.dovecot.group`.'') // { default = true; }; modules = mkOption { type = types.listOf types.package; @@ -300,9 +300,9 @@ in description = lib.mdDoc "Path to the server's private key."; }; - enablePAM = mkEnableOption "creating a own Dovecot PAM service and configure PAM user logins." // { default = true; }; + enablePAM = mkEnableOption (lib.mdDoc "creating a own Dovecot PAM service and configure PAM user logins.") // { default = true; }; - enableDHE = mkEnableOption "enable ssl_dh and generation of primes for the key exchange." // { default = true; }; + enableDHE = mkEnableOption (lib.mdDoc "enable ssl_dh and generation of primes for the key exchange.") // { default = true; }; sieveScripts = mkOption { type = types.attrsOf types.path; @@ -310,7 +310,7 @@ in description = lib.mdDoc "Sieve scripts to be executed. Key is a sequence, e.g. 'before2', 'after' etc."; }; - showPAMFailure = mkEnableOption "showing the PAM failure message on authentication error (useful for OTPW)."; + showPAMFailure = mkEnableOption (lib.mdDoc "showing the PAM failure message on authentication error (useful for OTPW)."); mailboxes = mkOption { type = with types; coercedTo @@ -326,7 +326,7 @@ in description = lib.mdDoc "Configure mailboxes and auto create or subscribe them."; }; - enableQuota = mkEnableOption "the dovecot quota service."; + enableQuota = mkEnableOption (lib.mdDoc "the dovecot quota service."); quotaPort = mkOption { type = types.str; diff --git a/nixos/modules/services/mail/maddy.nix b/nixos/modules/services/mail/maddy.nix index 2f9abd3ed1f..eeb113e204c 100644 --- a/nixos/modules/services/mail/maddy.nix +++ b/nixos/modules/services/mail/maddy.nix @@ -139,33 +139,33 @@ in { options = { services.maddy = { - enable = mkEnableOption "Maddy, a free an open source mail server"; + enable = mkEnableOption (lib.mdDoc "Maddy, a free an open source mail server"); user = mkOption { default = "maddy"; type = with types; uniq string; - description = '' + description = lib.mdDoc '' User account under which maddy runs. - + ::: {.note} If left as the default value this user will automatically be created on system activation, otherwise the sysadmin is responsible for ensuring the user exists before the maddy service starts. - + ::: ''; }; group = mkOption { default = "maddy"; type = with types; uniq string; - description = '' + description = lib.mdDoc '' Group account under which maddy runs. - + ::: {.note} If left as the default value this group will automatically be created on system activation, otherwise the sysadmin is responsible for ensuring the group exists before the maddy service starts. - + ::: ''; }; @@ -203,14 +203,15 @@ in { config = mkOption { type = with types; nullOr lines; default = defaultConfig; - description = '' + description = lib.mdDoc '' Server configuration, see - https://maddy.email for + [https://maddy.email](https://maddy.email) for more information. The default configuration of this module will setup minimal maddy instance for mail transfer without TLS encryption. - + + ::: {.note} This should not be used in a production environment. - + ::: ''; }; diff --git a/nixos/modules/services/mail/mail.nix b/nixos/modules/services/mail/mail.nix index fcc7ff6db91..8e1424595b5 100644 --- a/nixos/modules/services/mail/mail.nix +++ b/nixos/modules/services/mail/mail.nix @@ -14,7 +14,7 @@ with lib; type = types.nullOr options.security.wrappers.type.nestedTypes.elemType; default = null; internal = true; - description = '' + description = lib.mdDoc '' Configuration for the sendmail setuid wapper. ''; }; diff --git a/nixos/modules/services/mail/mailcatcher.nix b/nixos/modules/services/mail/mailcatcher.nix index 01f3a9776bb..d0f4550c192 100644 --- a/nixos/modules/services/mail/mailcatcher.nix +++ b/nixos/modules/services/mail/mailcatcher.nix @@ -11,7 +11,7 @@ in options = { services.mailcatcher = { - enable = mkEnableOption "MailCatcher"; + enable = mkEnableOption (lib.mdDoc "MailCatcher"); http.ip = mkOption { type = types.str; diff --git a/nixos/modules/services/mail/mailhog.nix b/nixos/modules/services/mail/mailhog.nix index defc58b8068..7ae62de291b 100644 --- a/nixos/modules/services/mail/mailhog.nix +++ b/nixos/modules/services/mail/mailhog.nix @@ -27,7 +27,7 @@ in options = { services.mailhog = { - enable = mkEnableOption "MailHog"; + enable = mkEnableOption (lib.mdDoc "MailHog"); storage = mkOption { type = types.enum [ "maildir" "memory" ]; diff --git a/nixos/modules/services/mail/mailman.nix b/nixos/modules/services/mail/mailman.nix index c76d40a68c3..7ae0a33332e 100644 --- a/nixos/modules/services/mail/mailman.nix +++ b/nixos/modules/services/mail/mailman.nix @@ -94,7 +94,7 @@ in { }; ldap = { - enable = mkEnableOption "LDAP auth"; + enable = mkEnableOption (lib.mdDoc "LDAP auth"); serverUri = mkOption { type = types.str; example = "ldaps://ldap.host"; @@ -262,7 +262,7 @@ in { }; serve = { - enable = mkEnableOption "Automatic nginx and uwsgi setup for mailman-web"; + enable = mkEnableOption (lib.mdDoc "Automatic nginx and uwsgi setup for mailman-web"); }; extraPythonPackages = mkOption { @@ -278,7 +278,7 @@ in { }; hyperkitty = { - enable = mkEnableOption "the Hyperkitty archiver for Mailman"; + enable = mkEnableOption (lib.mdDoc "the Hyperkitty archiver for Mailman"); baseUrl = mkOption { type = types.str; diff --git a/nixos/modules/services/mail/offlineimap.nix b/nixos/modules/services/mail/offlineimap.nix index 17c09df8f92..64fa09e8361 100644 --- a/nixos/modules/services/mail/offlineimap.nix +++ b/nixos/modules/services/mail/offlineimap.nix @@ -7,18 +7,18 @@ let in { options.services.offlineimap = { - enable = mkEnableOption "OfflineIMAP, a software to dispose your mailbox(es) as a local Maildir(s)"; + enable = mkEnableOption (lib.mdDoc "OfflineIMAP, a software to dispose your mailbox(es) as a local Maildir(s)"); install = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to install a user service for Offlineimap. Once the service is started, emails will be fetched automatically. The service must be manually started for each user with "systemctl --user start offlineimap" or globally through - services.offlineimap.enable. + {var}`services.offlineimap.enable`. ''; }; diff --git a/nixos/modules/services/mail/pfix-srsd.nix b/nixos/modules/services/mail/pfix-srsd.nix index d46447a480a..237f36945e4 100644 --- a/nixos/modules/services/mail/pfix-srsd.nix +++ b/nixos/modules/services/mail/pfix-srsd.nix @@ -22,10 +22,10 @@ with lib; }; secretsFile = mkOption { - description = '' + description = lib.mdDoc '' The secret data used to encode the SRS address. to generate, use a command like: - for n in $(seq 5); do dd if=/dev/urandom count=1 bs=1024 status=none | sha256sum | sed 's/ -$//' | sed 's/^/ /'; done + `for n in $(seq 5); do dd if=/dev/urandom count=1 bs=1024 status=none | sha256sum | sed 's/ -$//' | sed 's/^/ /'; done` ''; type = types.path; default = "/var/lib/pfix-srsd/secrets"; diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix index 3dc54038661..5461e89a801 100644 --- a/nixos/modules/services/mail/postfix.nix +++ b/nixos/modules/services/mail/postfix.nix @@ -70,7 +70,7 @@ let privileged = mkOption { type = types.bool; example = true; - description = ""; + description = lib.mdDoc ""; }; chroot = mkOption { @@ -140,8 +140,8 @@ let type = types.listOf types.str; default = []; internal = true; - description = '' - The raw configuration line for the master.cf. + description = lib.mdDoc '' + The raw configuration line for the {file}`master.cf`. ''; }; }; diff --git a/nixos/modules/services/mail/postgrey.nix b/nixos/modules/services/mail/postgrey.nix index 301bc69e1ca..fdfa08946dd 100644 --- a/nixos/modules/services/mail/postgrey.nix +++ b/nixos/modules/services/mail/postgrey.nix @@ -15,12 +15,12 @@ with lib; let type = nullOr str; default = null; example = "127.0.0.1"; - description = "The address to bind to. Localhost if null"; + description = lib.mdDoc "The address to bind to. Localhost if null"; }; port = mkOption { type = natural'; default = 10030; - description = "Tcp port to bind to"; + description = lib.mdDoc "Tcp port to bind to"; }; }; }; @@ -30,13 +30,13 @@ with lib; let path = mkOption { type = path; default = "/run/postgrey.sock"; - description = "Path of the unix socket"; + description = lib.mdDoc "Path of the unix socket"; }; mode = mkOption { type = str; default = "0777"; - description = "Mode of the unix socket"; + description = lib.mdDoc "Mode of the unix socket"; }; }; }; diff --git a/nixos/modules/services/mail/public-inbox.nix b/nixos/modules/services/mail/public-inbox.nix index 89c1be6bbf0..ab7ff5f726a 100644 --- a/nixos/modules/services/mail/public-inbox.nix +++ b/nixos/modules/services/mail/public-inbox.nix @@ -143,7 +143,7 @@ in { options.services.public-inbox = { - enable = mkEnableOption "the public-inbox mail archiver"; + enable = mkEnableOption (lib.mdDoc "the public-inbox mail archiver"); package = mkOption { type = types.package; default = pkgs.public-inbox; @@ -218,10 +218,10 @@ in })); }; imap = { - enable = mkEnableOption "the public-inbox IMAP server"; + enable = mkEnableOption (lib.mdDoc "the public-inbox IMAP server"); } // publicInboxDaemonOptions "imap" 993; http = { - enable = mkEnableOption "the public-inbox HTTP server"; + enable = mkEnableOption (lib.mdDoc "the public-inbox HTTP server"); mounts = mkOption { type = with types; listOf str; default = [ "/" ]; @@ -247,16 +247,16 @@ in }; }; mda = { - enable = mkEnableOption "the public-inbox Mail Delivery Agent"; + enable = mkEnableOption (lib.mdDoc "the public-inbox Mail Delivery Agent"); args = mkOption { type = with types; listOf str; default = []; description = lib.mdDoc "Command-line arguments to pass to {manpage}`public-inbox-mda(1)`."; }; }; - postfix.enable = mkEnableOption "the integration into Postfix"; + postfix.enable = mkEnableOption (lib.mdDoc "the integration into Postfix"); nntp = { - enable = mkEnableOption "the public-inbox NNTP server"; + enable = mkEnableOption (lib.mdDoc "the public-inbox NNTP server"); } // publicInboxDaemonOptions "nntp" 563; spamAssassinRules = mkOption { type = with types; nullOr path; @@ -339,7 +339,7 @@ in }; }; }; - openFirewall = mkEnableOption "opening the firewall when using a port option"; + openFirewall = mkEnableOption (lib.mdDoc "opening the firewall when using a port option"); }; config = mkIf cfg.enable { assertions = [ diff --git a/nixos/modules/services/mail/rspamd.nix b/nixos/modules/services/mail/rspamd.nix index ed4d7a50441..f9be9024dd4 100644 --- a/nixos/modules/services/mail/rspamd.nix +++ b/nixos/modules/services/mail/rspamd.nix @@ -13,24 +13,24 @@ let socket = mkOption { type = types.str; example = "localhost:11333"; - description = '' + description = lib.mdDoc '' Socket for this worker to listen on in a format acceptable by rspamd. ''; }; mode = mkOption { type = types.str; default = "0644"; - description = "Mode to set on unix socket"; + description = lib.mdDoc "Mode to set on unix socket"; }; owner = mkOption { type = types.str; default = "${cfg.user}"; - description = "Owner to set on unix socket"; + description = lib.mdDoc "Owner to set on unix socket"; }; group = mkOption { type = types.str; default = "${cfg.group}"; - description = "Group to set on unix socket"; + description = lib.mdDoc "Group to set on unix socket"; }; rawEntry = mkOption { type = types.str; @@ -227,7 +227,7 @@ in services.rspamd = { - enable = mkEnableOption "rspamd, the Rapid spam filtering system"; + enable = mkEnableOption (lib.mdDoc "rspamd, the Rapid spam filtering system"); debug = mkOption { type = types.bool; diff --git a/nixos/modules/services/mail/schleuder.nix b/nixos/modules/services/mail/schleuder.nix index 80b37ac129d..2991418dd80 100644 --- a/nixos/modules/services/mail/schleuder.nix +++ b/nixos/modules/services/mail/schleuder.nix @@ -18,8 +18,8 @@ let in { options.services.schleuder = { - enable = lib.mkEnableOption "Schleuder secure remailer"; - enablePostfix = lib.mkEnableOption "automatic postfix integration" // { default = true; }; + enable = lib.mkEnableOption (lib.mdDoc "Schleuder secure remailer"); + enablePostfix = lib.mkEnableOption (lib.mdDoc "automatic postfix integration") // { default = true; }; lists = lib.mkOption { description = lib.mdDoc '' List of list addresses that should be handled by Schleuder. diff --git a/nixos/modules/services/mail/spamassassin.nix b/nixos/modules/services/mail/spamassassin.nix index 153e3c00084..49d1d931598 100644 --- a/nixos/modules/services/mail/spamassassin.nix +++ b/nixos/modules/services/mail/spamassassin.nix @@ -12,7 +12,7 @@ in options = { services.spamassassin = { - enable = mkEnableOption "the SpamAssassin daemon"; + enable = mkEnableOption (lib.mdDoc "the SpamAssassin daemon"); debug = mkOption { type = types.bool; @@ -22,23 +22,26 @@ in config = mkOption { type = types.lines; - description = '' + description = lib.mdDoc '' The SpamAssassin local.cf config If you are using this configuration: - add_header all Status _YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_ + + add_header all Status _YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_ Then you can Use this sieve filter: - require ["fileinto", "reject", "envelope"]; - if header :contains "X-Spam-Flag" "YES" { - fileinto "spam"; - } + require ["fileinto", "reject", "envelope"]; + + if header :contains "X-Spam-Flag" "YES" { + fileinto "spam"; + } Or this procmail filter: - :0: - * ^X-Spam-Flag: YES - /var/vpopmail/domains/lastlog.de/js/.maildir/.spam/new + + :0: + * ^X-Spam-Flag: YES + /var/vpopmail/domains/lastlog.de/js/.maildir/.spam/new To filter your messages based on the additional mail headers added by spamassassin. ''; diff --git a/nixos/modules/services/mail/sympa.nix b/nixos/modules/services/mail/sympa.nix index 0014701d583..7a5047b2bea 100644 --- a/nixos/modules/services/mail/sympa.nix +++ b/nixos/modules/services/mail/sympa.nix @@ -80,7 +80,7 @@ in ###### interface options.services.sympa = with types; { - enable = mkEnableOption "Sympa mailing list manager"; + enable = mkEnableOption (lib.mdDoc "Sympa mailing list manager"); lang = mkOption { type = str; @@ -239,10 +239,10 @@ in server = mkOption { type = enum [ "nginx" "none" ]; default = "nginx"; - description = '' + description = lib.mdDoc '' The webserver used for the Sympa web interface. Set it to `none` if you want to configure it yourself. Further nginx configuration can be done by adapting - . + {option}`services.nginx.virtualHosts.«name»`. ''; }; diff --git a/nixos/modules/services/matrix/appservice-discord.nix b/nixos/modules/services/matrix/appservice-discord.nix index c72a2123a92..89b4bc98f49 100644 --- a/nixos/modules/services/matrix/appservice-discord.nix +++ b/nixos/modules/services/matrix/appservice-discord.nix @@ -14,7 +14,7 @@ let in { options = { services.matrix-appservice-discord = { - enable = mkEnableOption "a bridge between Matrix and Discord"; + enable = mkEnableOption (lib.mdDoc "a bridge between Matrix and Discord"); settings = mkOption rec { # TODO: switch to types.config.json as prescribed by RFC42 once it's implemented diff --git a/nixos/modules/services/matrix/appservice-irc.nix b/nixos/modules/services/matrix/appservice-irc.nix index b24edba96d9..388553d4182 100644 --- a/nixos/modules/services/matrix/appservice-irc.nix +++ b/nixos/modules/services/matrix/appservice-irc.nix @@ -28,7 +28,7 @@ let registrationFile = "/var/lib/matrix-appservice-irc/registration.yml"; in { options.services.matrix-appservice-irc = with types; { - enable = mkEnableOption "the Matrix/IRC bridge"; + enable = mkEnableOption (lib.mdDoc "the Matrix/IRC bridge"); port = mkOption { type = port; diff --git a/nixos/modules/services/matrix/conduit.nix b/nixos/modules/services/matrix/conduit.nix index 29040c38500..812d463e9e8 100644 --- a/nixos/modules/services/matrix/conduit.nix +++ b/nixos/modules/services/matrix/conduit.nix @@ -11,7 +11,7 @@ in { meta.maintainers = with maintainers; [ pstn piegames ]; options.services.matrix-conduit = { - enable = mkEnableOption "matrix-conduit"; + enable = mkEnableOption (lib.mdDoc "matrix-conduit"); extraEnvironment = mkOption { type = types.attrsOf types.str; diff --git a/nixos/modules/services/matrix/dendrite.nix b/nixos/modules/services/matrix/dendrite.nix index b336c5fd0f9..9279af246f4 100644 --- a/nixos/modules/services/matrix/dendrite.nix +++ b/nixos/modules/services/matrix/dendrite.nix @@ -7,7 +7,7 @@ let in { options.services.dendrite = { - enable = lib.mkEnableOption "matrix.org dendrite"; + enable = lib.mkEnableOption (lib.mdDoc "matrix.org dendrite"); httpPort = lib.mkOption { type = lib.types.nullOr lib.types.port; default = 8008; @@ -50,26 +50,26 @@ in type = lib.types.nullOr lib.types.path; example = "/var/lib/dendrite/registration_secret"; default = null; - description = '' - Environment file as defined in systemd.exec5. + description = lib.mdDoc '' + Environment file as defined in {manpage}`systemd.exec(5)`. Secrets may be passed to the service without adding them to the world-readable Nix store, by specifying placeholder variables as the option value in Nix and setting these variables accordingly in the environment file. Currently only used for the registration secret to allow secure registration when client_api.registration_disabled is true. - + ``` # snippet of dendrite-related config services.dendrite.settings.client_api.registration_shared_secret = "$REGISTRATION_SHARED_SECRET"; - + ``` - + ``` # content of the environment file REGISTRATION_SHARED_SECRET=verysecretpassword - + ``` Note that this file needs to be available on the host on which - dendrite is running. + `dendrite` is running. ''; }; loadCredential = lib.mkOption { diff --git a/nixos/modules/services/matrix/mautrix-facebook.nix b/nixos/modules/services/matrix/mautrix-facebook.nix index 8153c9d7c0b..18c91f649b1 100644 --- a/nixos/modules/services/matrix/mautrix-facebook.nix +++ b/nixos/modules/services/matrix/mautrix-facebook.nix @@ -17,7 +17,7 @@ let in { options = { services.mautrix-facebook = { - enable = mkEnableOption "Mautrix-Facebook, a Matrix-Facebook hybrid puppeting/relaybot bridge"; + enable = mkEnableOption (lib.mdDoc "Mautrix-Facebook, a Matrix-Facebook hybrid puppeting/relaybot bridge"); settings = mkOption rec { apply = recursiveUpdate default; diff --git a/nixos/modules/services/matrix/mautrix-telegram.nix b/nixos/modules/services/matrix/mautrix-telegram.nix index 196100a531a..be220e05a52 100644 --- a/nixos/modules/services/matrix/mautrix-telegram.nix +++ b/nixos/modules/services/matrix/mautrix-telegram.nix @@ -13,7 +13,7 @@ let in { options = { services.mautrix-telegram = { - enable = mkEnableOption "Mautrix-Telegram, a Matrix-Telegram hybrid puppeting/relaybot bridge"; + enable = mkEnableOption (lib.mdDoc "Mautrix-Telegram, a Matrix-Telegram hybrid puppeting/relaybot bridge"); settings = mkOption rec { apply = recursiveUpdate default; diff --git a/nixos/modules/services/matrix/mjolnir.nix b/nixos/modules/services/matrix/mjolnir.nix index abbbb4030e5..cbf7b93329d 100644 --- a/nixos/modules/services/matrix/mjolnir.nix +++ b/nixos/modules/services/matrix/mjolnir.nix @@ -65,7 +65,7 @@ let in { options.services.mjolnir = { - enable = mkEnableOption "Mjolnir, a moderation tool for Matrix"; + enable = mkEnableOption (lib.mdDoc "Mjolnir, a moderation tool for Matrix"); homeserverUrl = mkOption { type = types.str; @@ -95,10 +95,10 @@ in default = { }; type = types.submodule { options = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' If true, accessToken is ignored and the username/password below will be used instead. The access token of the bot will be stored in the dataPath. - ''; + ''); username = mkOption { type = types.str; diff --git a/nixos/modules/services/matrix/synapse.nix b/nixos/modules/services/matrix/synapse.nix index 34d4e6c4204..86662055222 100644 --- a/nixos/modules/services/matrix/synapse.nix +++ b/nixos/modules/services/matrix/synapse.nix @@ -138,7 +138,7 @@ in { options = { services.matrix-synapse = { - enable = mkEnableOption "matrix.org synapse"; + enable = mkEnableOption (lib.mdDoc "matrix.org synapse"); configFile = mkOption { type = types.path; diff --git a/nixos/modules/services/misc/airsonic.nix b/nixos/modules/services/misc/airsonic.nix index 01e330929ca..e4448d70a0e 100644 --- a/nixos/modules/services/misc/airsonic.nix +++ b/nixos/modules/services/misc/airsonic.nix @@ -9,7 +9,7 @@ in { options = { services.airsonic = { - enable = mkEnableOption "Airsonic, the Free and Open Source media streaming server (fork of Subsonic and Libresonic)"; + enable = mkEnableOption (lib.mdDoc "Airsonic, the Free and Open Source media streaming server (fork of Subsonic and Libresonic)"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/ananicy.nix b/nixos/modules/services/misc/ananicy.nix index bf33b2c0602..d2287fba6af 100644 --- a/nixos/modules/services/misc/ananicy.nix +++ b/nixos/modules/services/misc/ananicy.nix @@ -11,7 +11,7 @@ in { options = { services.ananicy = { - enable = mkEnableOption "Ananicy, an auto nice daemon"; + enable = mkEnableOption (lib.mdDoc "Ananicy, an auto nice daemon"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/misc/ankisyncd.nix b/nixos/modules/services/misc/ankisyncd.nix index fe71b528b6a..907bd348d7e 100644 --- a/nixos/modules/services/misc/ankisyncd.nix +++ b/nixos/modules/services/misc/ankisyncd.nix @@ -28,7 +28,7 @@ let in { options.services.ankisyncd = { - enable = mkEnableOption "ankisyncd"; + enable = mkEnableOption (lib.mdDoc "ankisyncd"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/misc/autorandr.nix b/nixos/modules/services/misc/autorandr.nix index 06f24d7c7e7..365fdd5fcc3 100644 --- a/nixos/modules/services/misc/autorandr.nix +++ b/nixos/modules/services/misc/autorandr.nix @@ -149,15 +149,15 @@ let }; }; }); - description = '' + description = lib.mdDoc '' Output scale configuration. Either configure by pixels or a scaling factor. When using pixel method the - xrandr1 + {manpage}`xrandr(1)` option - --scale-from + `--scale-from` will be used; when using factor method the option - --scale + `--scale` will be used. This option is a shortcut version of the transform option and they are mutually @@ -242,7 +242,7 @@ in { options = { services.autorandr = { - enable = mkEnableOption "handling of hotplug and sleep events by autorandr"; + enable = mkEnableOption (lib.mdDoc "handling of hotplug and sleep events by autorandr"); defaultTarget = mkOption { default = "default"; diff --git a/nixos/modules/services/misc/bazarr.nix b/nixos/modules/services/misc/bazarr.nix index 8c0b4b88e5d..07c93505359 100644 --- a/nixos/modules/services/misc/bazarr.nix +++ b/nixos/modules/services/misc/bazarr.nix @@ -8,7 +8,7 @@ in { options = { services.bazarr = { - enable = mkEnableOption "bazarr, a subtitle manager for Sonarr and Radarr"; + enable = mkEnableOption (lib.mdDoc "bazarr, a subtitle manager for Sonarr and Radarr"); openFirewall = mkOption { type = types.bool; diff --git a/nixos/modules/services/misc/beanstalkd.nix b/nixos/modules/services/misc/beanstalkd.nix index 498e287ac7d..5d34355aebf 100644 --- a/nixos/modules/services/misc/beanstalkd.nix +++ b/nixos/modules/services/misc/beanstalkd.nix @@ -12,7 +12,7 @@ in options = { services.beanstalkd = { - enable = mkEnableOption "the Beanstalk work queue"; + enable = mkEnableOption (lib.mdDoc "the Beanstalk work queue"); listen = { port = mkOption { diff --git a/nixos/modules/services/misc/bepasty.nix b/nixos/modules/services/misc/bepasty.nix index 8d18ef7f194..70d07629493 100644 --- a/nixos/modules/services/misc/bepasty.nix +++ b/nixos/modules/services/misc/bepasty.nix @@ -13,7 +13,7 @@ let in { options.services.bepasty = { - enable = mkEnableOption "Bepasty servers"; + enable = mkEnableOption (lib.mdDoc "Bepasty servers"); servers = mkOption { default = {}; diff --git a/nixos/modules/services/misc/calibre-server.nix b/nixos/modules/services/misc/calibre-server.nix index d75c33bab51..77c60381a31 100644 --- a/nixos/modules/services/misc/calibre-server.nix +++ b/nixos/modules/services/misc/calibre-server.nix @@ -23,7 +23,7 @@ in options = { services.calibre-server = { - enable = mkEnableOption "calibre-server"; + enable = mkEnableOption (lib.mdDoc "calibre-server"); libraries = mkOption { description = lib.mdDoc '' diff --git a/nixos/modules/services/misc/cfdyndns.nix b/nixos/modules/services/misc/cfdyndns.nix index 74d7a0b2c62..9cd8b188ffa 100644 --- a/nixos/modules/services/misc/cfdyndns.nix +++ b/nixos/modules/services/misc/cfdyndns.nix @@ -14,7 +14,7 @@ in options = { services.cfdyndns = { - enable = mkEnableOption "Cloudflare Dynamic DNS Client"; + enable = mkEnableOption (lib.mdDoc "Cloudflare Dynamic DNS Client"); email = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/cgminer.nix b/nixos/modules/services/misc/cgminer.nix index a67986d3011..fced106cb32 100644 --- a/nixos/modules/services/misc/cgminer.nix +++ b/nixos/modules/services/misc/cgminer.nix @@ -31,7 +31,7 @@ in services.cgminer = { - enable = mkEnableOption "cgminer, an ASIC/FPGA/GPU miner for bitcoin and litecoin"; + enable = mkEnableOption (lib.mdDoc "cgminer, an ASIC/FPGA/GPU miner for bitcoin and litecoin"); package = mkOption { default = pkgs.cgminer; diff --git a/nixos/modules/services/misc/clipcat.nix b/nixos/modules/services/misc/clipcat.nix index 0c067d23d32..0129de3a9ef 100644 --- a/nixos/modules/services/misc/clipcat.nix +++ b/nixos/modules/services/misc/clipcat.nix @@ -7,7 +7,7 @@ let in { options.services.clipcat= { - enable = mkEnableOption "Clipcat clipboard daemon"; + enable = mkEnableOption (lib.mdDoc "Clipcat clipboard daemon"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/misc/clipmenu.nix b/nixos/modules/services/misc/clipmenu.nix index a31879284e4..1cc8c4c47f7 100644 --- a/nixos/modules/services/misc/clipmenu.nix +++ b/nixos/modules/services/misc/clipmenu.nix @@ -7,7 +7,7 @@ let in { options.services.clipmenu = { - enable = mkEnableOption "clipmenu, the clipboard management daemon"; + enable = mkEnableOption (lib.mdDoc "clipmenu, the clipboard management daemon"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/misc/confd.nix b/nixos/modules/services/misc/confd.nix index 87a9a25d491..17c1be57ccb 100755 --- a/nixos/modules/services/misc/confd.nix +++ b/nixos/modules/services/misc/confd.nix @@ -17,7 +17,7 @@ let in { options.services.confd = { - enable = mkEnableOption "confd service"; + enable = mkEnableOption (lib.mdDoc "confd service"); backend = mkOption { description = lib.mdDoc "Confd config storage backend to use."; diff --git a/nixos/modules/services/misc/devmon.nix b/nixos/modules/services/misc/devmon.nix index e4a3348646b..bd0b738b701 100644 --- a/nixos/modules/services/misc/devmon.nix +++ b/nixos/modules/services/misc/devmon.nix @@ -8,7 +8,7 @@ let in { options = { services.devmon = { - enable = mkEnableOption "devmon, an automatic device mounting daemon"; + enable = mkEnableOption (lib.mdDoc "devmon, an automatic device mounting daemon"); }; }; diff --git a/nixos/modules/services/misc/disnix.nix b/nixos/modules/services/misc/disnix.nix index 08e0a321a23..1cdfeef57ce 100644 --- a/nixos/modules/services/misc/disnix.nix +++ b/nixos/modules/services/misc/disnix.nix @@ -17,7 +17,7 @@ in services.disnix = { - enable = mkEnableOption "Disnix"; + enable = mkEnableOption (lib.mdDoc "Disnix"); enableMultiUser = mkOption { type = types.bool; @@ -25,7 +25,7 @@ in description = lib.mdDoc "Whether to support multi-user mode by enabling the Disnix D-Bus service"; }; - useWebServiceInterface = mkEnableOption "the DisnixWebService interface running on Apache Tomcat"; + useWebServiceInterface = mkEnableOption (lib.mdDoc "the DisnixWebService interface running on Apache Tomcat"); package = mkOption { type = types.path; @@ -34,7 +34,7 @@ in defaultText = literalExpression "pkgs.disnix"; }; - enableProfilePath = mkEnableOption "exposing the Disnix profiles in the system's PATH"; + enableProfilePath = mkEnableOption (lib.mdDoc "exposing the Disnix profiles in the system's PATH"); profiles = mkOption { type = types.listOf types.str; diff --git a/nixos/modules/services/misc/docker-registry.nix b/nixos/modules/services/misc/docker-registry.nix index 7a9907fd351..98edb413f3c 100644 --- a/nixos/modules/services/misc/docker-registry.nix +++ b/nixos/modules/services/misc/docker-registry.nix @@ -47,7 +47,7 @@ let in { options.services.dockerRegistry = { - enable = mkEnableOption "Docker Registry"; + enable = mkEnableOption (lib.mdDoc "Docker Registry"); listenAddress = mkOption { description = lib.mdDoc "Docker registry host or ip to bind to."; @@ -76,7 +76,7 @@ in { description = lib.mdDoc "Enable delete for manifests and blobs."; }; - enableRedisCache = mkEnableOption "redis as blob cache"; + enableRedisCache = mkEnableOption (lib.mdDoc "redis as blob cache"); redisUrl = mkOption { type = types.str; @@ -98,7 +98,7 @@ in { type = types.attrs; }; - enableGarbageCollect = mkEnableOption "garbage collect"; + enableGarbageCollect = mkEnableOption (lib.mdDoc "garbage collect"); garbageCollectDates = mkOption { default = "daily"; diff --git a/nixos/modules/services/misc/domoticz.nix b/nixos/modules/services/misc/domoticz.nix index d01158b327a..3358b4de466 100644 --- a/nixos/modules/services/misc/domoticz.nix +++ b/nixos/modules/services/misc/domoticz.nix @@ -12,7 +12,7 @@ in { options = { services.domoticz = { - enable = mkEnableOption pkgDesc; + enable = mkEnableOption (lib.mdDoc pkgDesc); bind = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/duckling.nix b/nixos/modules/services/misc/duckling.nix index 55a87fccf8e..4d06ca7fa66 100644 --- a/nixos/modules/services/misc/duckling.nix +++ b/nixos/modules/services/misc/duckling.nix @@ -7,7 +7,7 @@ let in { options = { services.duckling = { - enable = mkEnableOption "duckling"; + enable = mkEnableOption (lib.mdDoc "duckling"); port = mkOption { type = types.port; diff --git a/nixos/modules/services/misc/dwm-status.nix b/nixos/modules/services/misc/dwm-status.nix index 92705e5515e..de3e28c41d2 100644 --- a/nixos/modules/services/misc/dwm-status.nix +++ b/nixos/modules/services/misc/dwm-status.nix @@ -22,7 +22,7 @@ in services.dwm-status = { - enable = mkEnableOption "dwm-status user service"; + enable = mkEnableOption (lib.mdDoc "dwm-status user service"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/misc/etesync-dav.nix b/nixos/modules/services/misc/etesync-dav.nix index 6a755be8500..9d99d548d95 100644 --- a/nixos/modules/services/misc/etesync-dav.nix +++ b/nixos/modules/services/misc/etesync-dav.nix @@ -7,7 +7,7 @@ let in { options.services.etesync-dav = { - enable = mkEnableOption "etesync-dav"; + enable = mkEnableOption (lib.mdDoc "etesync-dav"); host = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/felix.nix b/nixos/modules/services/misc/felix.nix index 7654ad28440..306d4cf0d7c 100644 --- a/nixos/modules/services/misc/felix.nix +++ b/nixos/modules/services/misc/felix.nix @@ -17,7 +17,7 @@ in services.felix = { - enable = mkEnableOption "the Apache Felix OSGi service"; + enable = mkEnableOption (lib.mdDoc "the Apache Felix OSGi service"); bundles = mkOption { type = types.listOf types.package; diff --git a/nixos/modules/services/misc/freeswitch.nix b/nixos/modules/services/misc/freeswitch.nix index 88949bf9800..b8b81e58694 100644 --- a/nixos/modules/services/misc/freeswitch.nix +++ b/nixos/modules/services/misc/freeswitch.nix @@ -18,7 +18,7 @@ let in { options = { services.freeswitch = { - enable = mkEnableOption "FreeSWITCH"; + enable = mkEnableOption (lib.mdDoc "FreeSWITCH"); enableReload = mkOption { default = false; type = types.bool; diff --git a/nixos/modules/services/misc/fstrim.nix b/nixos/modules/services/misc/fstrim.nix index 83e7ca359b2..36b5f9c8cca 100644 --- a/nixos/modules/services/misc/fstrim.nix +++ b/nixos/modules/services/misc/fstrim.nix @@ -11,7 +11,7 @@ in { options = { services.fstrim = { - enable = mkEnableOption "periodic SSD TRIM of mounted partitions in background"; + enable = mkEnableOption (lib.mdDoc "periodic SSD TRIM of mounted partitions in background"); interval = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/gammu-smsd.nix b/nixos/modules/services/misc/gammu-smsd.nix index daa0e22e327..72e83a249c8 100644 --- a/nixos/modules/services/misc/gammu-smsd.nix +++ b/nixos/modules/services/misc/gammu-smsd.nix @@ -53,7 +53,7 @@ in { options = { services.gammu-smsd = { - enable = mkEnableOption "gammu-smsd daemon"; + enable = mkEnableOption (lib.mdDoc "gammu-smsd daemon"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/geoipupdate.nix b/nixos/modules/services/misc/geoipupdate.nix index 444bd57893b..fafe4e3f241 100644 --- a/nixos/modules/services/misc/geoipupdate.nix +++ b/nixos/modules/services/misc/geoipupdate.nix @@ -11,9 +11,9 @@ in options = { services.geoipupdate = { - enable = lib.mkEnableOption '' + enable = lib.mkEnableOption (lib.mdDoc '' periodic downloading of GeoIP databases using geoipupdate. - ''; + ''); interval = lib.mkOption { type = lib.types.str; diff --git a/nixos/modules/services/misc/gitea.nix b/nixos/modules/services/misc/gitea.nix index f96b4fb6dd5..d9dece3343f 100644 --- a/nixos/modules/services/misc/gitea.nix +++ b/nixos/modules/services/misc/gitea.nix @@ -322,14 +322,14 @@ in }; service = { - DISABLE_REGISTRATION = mkEnableOption "the registration lock" // { - description = '' - By default any user can create an account on this gitea instance. + DISABLE_REGISTRATION = mkEnableOption (lib.mdDoc "the registration lock") // { + description = lib.mdDoc '' + By default any user can create an account on this `gitea` instance. This can be disabled by using this option. - Note: please keep in mind that this should be added after the initial - deploy unless services.gitea.useWizard - is true as the first registered user will be the administrator if + *Note:* please keep in mind that this should be added after the initial + deploy unless [](#opt-services.gitea.useWizard) + is `true` as the first registered user will be the administrator if no install wizard is used. ''; }; diff --git a/nixos/modules/services/misc/gitit.nix b/nixos/modules/services/misc/gitit.nix index f00c03337d9..0fafa76b548 100644 --- a/nixos/modules/services/misc/gitit.nix +++ b/nixos/modules/services/misc/gitit.nix @@ -49,10 +49,10 @@ let haskellPackages.wreq ] ''; - description = '' + description = lib.mdDoc '' Extra packages available to ghc when running gitit. The value must be a function which receives the attrset defined - in haskellPackages as the sole argument. + in {var}`haskellPackages` as the sole argument. ''; }; @@ -211,7 +211,7 @@ let templatesDir = mkOption { type = types.path; default = gititShared + "/data/templates"; - description = '' + description = lib.mdDoc '' Specifies the path of the directory containing page templates. If it does not exist, gitit will create it with default templates. Users may wish to edit the templates to customize the appearance of their @@ -348,14 +348,14 @@ let mimeTypesFile = mkOption { type = types.path; default = "/etc/mime/types.info"; - description = '' + description = lib.mdDoc '' Specifies the path of a file containing mime type mappings. Each line of the file should contain two fields, separated by whitespace. The first field is the mime type, the second is a file extension. For example: - -video/x-ms-wmx wmx - + ``` + video/x-ms-wmx wmx + ``` If the file is not found, some simple defaults will be used. ''; }; @@ -490,10 +490,10 @@ video/x-ms-wmx wmx absoluteUrls = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Make wikilinks absolute with respect to the base-url. So, for example, in a wiki served at the base URL '/wiki', on a page - Sub/Page, the wikilink '[Cactus]()' will produce a link to + Sub/Page, the wikilink `[Cactus]()` will produce a link to '/wiki/Cactus' if absoluteUrls is true, and a relative link to 'Cactus' (referring to '/wiki/Sub/Cactus') if absolute-urls is 'no'. ''; diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index aa2a05900f8..42f46289c86 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -748,17 +748,15 @@ in { type = types.int; default = 2; apply = x: builtins.toString x; - description = '' + description = lib.mdDoc '' The number of worker processes Puma should spawn. This controls the amount of parallel Ruby code can be - executed. GitLab recommends Number of CPU cores - 1, but at least two. + executed. GitLab recommends `Number of CPU cores - 1`, but at least two. - - - Each worker consumes quite a bit of memory, so - be careful when increasing this. - - + ::: {.note} + Each worker consumes quite a bit of memory, so + be careful when increasing this. + ::: ''; }; @@ -766,16 +764,14 @@ in { type = types.int; default = 0; apply = x: builtins.toString x; - description = '' + description = lib.mdDoc '' The minimum number of threads Puma should use per worker. - - - Each thread consumes memory and contributes to Global VM - Lock contention, so be careful when increasing this. - - + ::: {.note} + Each thread consumes memory and contributes to Global VM + Lock contention, so be careful when increasing this. + ::: ''; }; @@ -783,19 +779,17 @@ in { type = types.int; default = 4; apply = x: builtins.toString x; - description = '' + description = lib.mdDoc '' The maximum number of threads Puma should use per worker. This limits how many threads Puma will automatically spawn in response to requests. In contrast to workers, threads will never be able to run Ruby code in parallel, but give higher IO parallelism. - - - Each thread consumes memory and contributes to Global VM - Lock contention, so be careful when increasing this. - - + ::: {.note} + Each thread consumes memory and contributes to Global VM + Lock contention, so be careful when increasing this. + ::: ''; }; diff --git a/nixos/modules/services/misc/greenclip.nix b/nixos/modules/services/misc/greenclip.nix index 210827ea075..45847af7114 100644 --- a/nixos/modules/services/misc/greenclip.nix +++ b/nixos/modules/services/misc/greenclip.nix @@ -7,7 +7,7 @@ let in { options.services.greenclip = { - enable = mkEnableOption "Greenclip daemon"; + enable = mkEnableOption (lib.mdDoc "Greenclip daemon"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/misc/heisenbridge.nix b/nixos/modules/services/misc/heisenbridge.nix index 486ba512ac5..13ba362b33d 100644 --- a/nixos/modules/services/misc/heisenbridge.nix +++ b/nixos/modules/services/misc/heisenbridge.nix @@ -23,7 +23,7 @@ let in { options.services.heisenbridge = { - enable = mkEnableOption "the Matrix to IRC bridge"; + enable = mkEnableOption (lib.mdDoc "the Matrix to IRC bridge"); package = mkOption { type = types.package; @@ -99,7 +99,7 @@ in }; }; - identd.enable = mkEnableOption "identd service support"; + identd.enable = mkEnableOption (lib.mdDoc "identd service support"); identd.port = mkOption { type = types.port; description = lib.mdDoc "identd listen port"; diff --git a/nixos/modules/services/misc/ihaskell.nix b/nixos/modules/services/misc/ihaskell.nix index ff5709922e6..4782053c4fb 100644 --- a/nixos/modules/services/misc/ihaskell.nix +++ b/nixos/modules/services/misc/ihaskell.nix @@ -30,10 +30,10 @@ in haskellPackages.lens ] ''; - description = '' + description = lib.mdDoc '' Extra packages available to ghc when running ihaskell. The value must be a function which receives the attrset defined - in haskellPackages as the sole argument. + in {var}`haskellPackages` as the sole argument. ''; }; }; diff --git a/nixos/modules/services/misc/input-remapper.nix b/nixos/modules/services/misc/input-remapper.nix index f66d714e117..51e1abdc98a 100644 --- a/nixos/modules/services/misc/input-remapper.nix +++ b/nixos/modules/services/misc/input-remapper.nix @@ -6,9 +6,9 @@ let cfg = config.services.input-remapper; in { options = { services.input-remapper = { - enable = mkEnableOption "input-remapper, an easy to use tool to change the mapping of your input device buttons."; + enable = mkEnableOption (lib.mdDoc "input-remapper, an easy to use tool to change the mapping of your input device buttons."); package = options.mkPackageOption pkgs "input-remapper" { }; - enableUdevRules = mkEnableOption "udev rules added by input-remapper to handle hotplugged devices. Currently disabled by default due to https://github.com/sezanzeb/input-remapper/issues/140"; + enableUdevRules = mkEnableOption (lib.mdDoc "udev rules added by input-remapper to handle hotplugged devices. Currently disabled by default due to https://github.com/sezanzeb/input-remapper/issues/140"); serviceWantedBy = mkOption { default = [ "graphical.target" ]; example = [ "multi-user.target" ]; diff --git a/nixos/modules/services/misc/jackett.nix b/nixos/modules/services/misc/jackett.nix index e8315d13417..b0edf0d18da 100644 --- a/nixos/modules/services/misc/jackett.nix +++ b/nixos/modules/services/misc/jackett.nix @@ -9,7 +9,7 @@ in { options = { services.jackett = { - enable = mkEnableOption "Jackett"; + enable = mkEnableOption (lib.mdDoc "Jackett"); dataDir = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/jellyfin.nix b/nixos/modules/services/misc/jellyfin.nix index af5256e46da..f49657a0753 100644 --- a/nixos/modules/services/misc/jellyfin.nix +++ b/nixos/modules/services/misc/jellyfin.nix @@ -8,7 +8,7 @@ in { options = { services.jellyfin = { - enable = mkEnableOption "Jellyfin Media Server"; + enable = mkEnableOption (lib.mdDoc "Jellyfin Media Server"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/klipper.nix b/nixos/modules/services/misc/klipper.nix index 0dadc0c7470..9b2f585d3ff 100644 --- a/nixos/modules/services/misc/klipper.nix +++ b/nixos/modules/services/misc/klipper.nix @@ -14,7 +14,7 @@ in ##### interface options = { services.klipper = { - enable = mkEnableOption "Klipper, the 3D printer firmware"; + enable = mkEnableOption (lib.mdDoc "Klipper, the 3D printer firmware"); package = mkOption { type = types.package; @@ -76,10 +76,10 @@ in type = with types; attrsOf (submodule { options = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' building of firmware and addition of klipper-flash tools for manual flashing. This will add `klipper-flash-$mcu` scripts to your environment which can be called to flash the firmware. - ''; + ''); configFile = mkOption { type = path; description = lib.mdDoc "Path to firmware config which is generated using `klipper-genconf`"; diff --git a/nixos/modules/services/misc/leaps.nix b/nixos/modules/services/misc/leaps.nix index 0308fbfcf47..5522223ecc9 100644 --- a/nixos/modules/services/misc/leaps.nix +++ b/nixos/modules/services/misc/leaps.nix @@ -9,7 +9,7 @@ in { options = { services.leaps = { - enable = mkEnableOption "leaps"; + enable = mkEnableOption (lib.mdDoc "leaps"); port = mkOption { type = types.port; default = 8080; diff --git a/nixos/modules/services/misc/libreddit.nix b/nixos/modules/services/misc/libreddit.nix index 0359f57c0dc..c961d13da47 100644 --- a/nixos/modules/services/misc/libreddit.nix +++ b/nixos/modules/services/misc/libreddit.nix @@ -13,7 +13,7 @@ in { options = { services.libreddit = { - enable = mkEnableOption "Private front-end for Reddit"; + enable = mkEnableOption (lib.mdDoc "Private front-end for Reddit"); address = mkOption { default = "0.0.0.0"; diff --git a/nixos/modules/services/misc/lidarr.nix b/nixos/modules/services/misc/lidarr.nix index d070a7f091f..92b00054bdf 100644 --- a/nixos/modules/services/misc/lidarr.nix +++ b/nixos/modules/services/misc/lidarr.nix @@ -8,7 +8,7 @@ in { options = { services.lidarr = { - enable = mkEnableOption "Lidarr"; + enable = mkEnableOption (lib.mdDoc "Lidarr"); dataDir = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/lifecycled.nix b/nixos/modules/services/misc/lifecycled.nix index fc8c77c6ca4..fb5cabb4f03 100644 --- a/nixos/modules/services/misc/lifecycled.nix +++ b/nixos/modules/services/misc/lifecycled.nix @@ -25,10 +25,10 @@ in options = { services.lifecycled = { - enable = mkEnableOption "lifecycled"; + enable = mkEnableOption (lib.mdDoc "lifecycled"); queueCleaner = { - enable = mkEnableOption "lifecycled-queue-cleaner"; + enable = mkEnableOption (lib.mdDoc "lifecycled-queue-cleaner"); frequency = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/logkeys.nix b/nixos/modules/services/misc/logkeys.nix index 628f5627433..75d073a0c94 100644 --- a/nixos/modules/services/misc/logkeys.nix +++ b/nixos/modules/services/misc/logkeys.nix @@ -6,7 +6,7 @@ let cfg = config.services.logkeys; in { options.services.logkeys = { - enable = mkEnableOption "logkeys service"; + enable = mkEnableOption (lib.mdDoc "logkeys service"); device = mkOption { description = lib.mdDoc "Use the given device as keyboard input event device instead of /dev/input/eventX default."; diff --git a/nixos/modules/services/misc/mbpfan.nix b/nixos/modules/services/misc/mbpfan.nix index 786ecf2d696..d467aa87976 100644 --- a/nixos/modules/services/misc/mbpfan.nix +++ b/nixos/modules/services/misc/mbpfan.nix @@ -10,7 +10,7 @@ let in { options.services.mbpfan = { - enable = mkEnableOption "mbpfan, fan controller daemon for Apple Macs and MacBooks"; + enable = mkEnableOption (lib.mdDoc "mbpfan, fan controller daemon for Apple Macs and MacBooks"); package = mkOption { type = types.package; @@ -38,10 +38,10 @@ in { options.general.min_fan1_speed = mkOption { type = types.nullOr types.int; default = 2000; - description = '' + description = lib.mdDoc '' You can check minimum and maximum fan limits with - "cat /sys/devices/platform/applesmc.768/fan*_min" and - "cat /sys/devices/platform/applesmc.768/fan*_max" respectively. + `cat /sys/devices/platform/applesmc.768/fan*_min` and + `cat /sys/devices/platform/applesmc.768/fan*_max` respectively. Setting to null implies using default value from applesmc. ''; }; diff --git a/nixos/modules/services/misc/metabase.nix b/nixos/modules/services/misc/metabase.nix index 26c48c05037..883fa0b9591 100644 --- a/nixos/modules/services/misc/metabase.nix +++ b/nixos/modules/services/misc/metabase.nix @@ -13,7 +13,7 @@ in { options = { services.metabase = { - enable = mkEnableOption "Metabase service"; + enable = mkEnableOption (lib.mdDoc "Metabase service"); listen = { ip = mkOption { diff --git a/nixos/modules/services/misc/moonraker.nix b/nixos/modules/services/misc/moonraker.nix index 5b4e4bd34dc..f3c78df0cc0 100644 --- a/nixos/modules/services/misc/moonraker.nix +++ b/nixos/modules/services/misc/moonraker.nix @@ -14,7 +14,7 @@ let in { options = { services.moonraker = { - enable = mkEnableOption "Moonraker, an API web server for Klipper"; + enable = mkEnableOption (lib.mdDoc "Moonraker, an API web server for Klipper"); klipperSocket = mkOption { type = types.path; diff --git a/nixos/modules/services/misc/mx-puppet-discord.nix b/nixos/modules/services/misc/mx-puppet-discord.nix index 18b083b99ba..33a6c8f26a9 100644 --- a/nixos/modules/services/misc/mx-puppet-discord.nix +++ b/nixos/modules/services/misc/mx-puppet-discord.nix @@ -12,10 +12,10 @@ let in { options = { services.mx-puppet-discord = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' mx-puppet-discord is a discord puppeting bridge for matrix. It handles bridging private and group DMs, as well as Guilds (servers) - ''; + ''); settings = mkOption rec { apply = recursiveUpdate default; diff --git a/nixos/modules/services/misc/n8n.nix b/nixos/modules/services/misc/n8n.nix index 40a262116c8..f59df471e1e 100644 --- a/nixos/modules/services/misc/n8n.nix +++ b/nixos/modules/services/misc/n8n.nix @@ -10,7 +10,7 @@ in { options.services.n8n = { - enable = mkEnableOption "n8n server"; + enable = mkEnableOption (lib.mdDoc "n8n server"); openFirewall = mkOption { type = types.bool; diff --git a/nixos/modules/services/misc/nitter.nix b/nixos/modules/services/misc/nitter.nix index e6cf69d2356..95394d9d211 100644 --- a/nixos/modules/services/misc/nitter.nix +++ b/nixos/modules/services/misc/nitter.nix @@ -47,7 +47,7 @@ in { options = { services.nitter = { - enable = mkEnableOption "If enabled, start Nitter."; + enable = mkEnableOption (lib.mdDoc "If enabled, start Nitter."); package = mkOption { default = pkgs.nitter; diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 965da197f30..e8d2bccdbf9 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -231,10 +231,10 @@ in type = types.nullOr types.str; default = null; example = "x86_64-linux"; - description = '' + description = lib.mdDoc '' The system type the build machine can execute derivations on. - Either this attribute or systems must be - present, where system takes precedence if + Either this attribute or {var}`systems` must be + present, where {var}`system` takes precedence if both are set. ''; }; @@ -242,10 +242,10 @@ in type = types.listOf types.str; default = [ ]; example = [ "x86_64-linux" "aarch64-linux" ]; - description = '' + description = lib.mdDoc '' The system types the build machine can execute derivations on. - Either this attribute or system must be - present, where system takes precedence if + Either this attribute or {var}`system` must be + present, where {var}`system` takes precedence if both are set. ''; }; @@ -297,11 +297,11 @@ in type = types.listOf types.str; default = [ ]; example = [ "big-parallel" ]; - description = '' + description = lib.mdDoc '' A list of features mandatory for this builder. The builder will be ignored for derivations that don't require all features in this list. All mandatory features are automatically included in - supportedFeatures. + {var}`supportedFeatures`. ''; }; supportedFeatures = mkOption { @@ -340,7 +340,7 @@ in type = types.attrs; internal = true; default = { }; - description = "Environment variables used by Nix."; + description = lib.mdDoc "Environment variables used by Nix."; }; nrBuildUsers = mkOption { @@ -628,17 +628,17 @@ in sandbox-paths = { "/bin/sh" = "''${pkgs.busybox-sandbox-shell.out}/bin/busybox"; }; } ''; - description = '' + description = lib.mdDoc '' Configuration for Nix, see - or - nix.conf5 for avalaible options. + or + {manpage}`nix.conf(5)` for avalaible options. The value declared here will be translated directly to the key-value pairs Nix expects. - You can use nix-instantiate --eval --strict '<nixpkgs/nixos>' -A config.nix.settings + You can use {command}`nix-instantiate --eval --strict '' -A config.nix.settings` to view the current value. By default it is empty. - Nix configurations defined under will be translated and applied to this - option. In addition, configuration specified in which will be appended + Nix configurations defined under {option}`nix.*` will be translated and applied to this + option. In addition, configuration specified in {option}`nix.extraOptions` which will be appended verbatim to the resulting config file. ''; }; diff --git a/nixos/modules/services/misc/novacomd.nix b/nixos/modules/services/misc/novacomd.nix index 7cfc68d2b67..bde8328d46f 100644 --- a/nixos/modules/services/misc/novacomd.nix +++ b/nixos/modules/services/misc/novacomd.nix @@ -10,7 +10,7 @@ in { options = { services.novacomd = { - enable = mkEnableOption "Novacom service for connecting to WebOS devices"; + enable = mkEnableOption (lib.mdDoc "Novacom service for connecting to WebOS devices"); }; }; diff --git a/nixos/modules/services/misc/nzbget.nix b/nixos/modules/services/misc/nzbget.nix index ddcb16e135c..d02fda62fa4 100644 --- a/nixos/modules/services/misc/nzbget.nix +++ b/nixos/modules/services/misc/nzbget.nix @@ -25,7 +25,7 @@ in options = { services.nzbget = { - enable = mkEnableOption "NZBGet"; + enable = mkEnableOption (lib.mdDoc "NZBGet"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/nzbhydra2.nix b/nixos/modules/services/misc/nzbhydra2.nix index b728ca248ce..47d08135f57 100644 --- a/nixos/modules/services/misc/nzbhydra2.nix +++ b/nixos/modules/services/misc/nzbhydra2.nix @@ -7,7 +7,7 @@ let cfg = config.services.nzbhydra2; in { options = { services.nzbhydra2 = { - enable = mkEnableOption "NZBHydra2"; + enable = mkEnableOption (lib.mdDoc "NZBHydra2"); dataDir = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/octoprint.nix b/nixos/modules/services/misc/octoprint.nix index 071174c141d..196adb180a5 100644 --- a/nixos/modules/services/misc/octoprint.nix +++ b/nixos/modules/services/misc/octoprint.nix @@ -29,7 +29,7 @@ in services.octoprint = { - enable = mkEnableOption "OctoPrint, web interface for 3D printers"; + enable = mkEnableOption (lib.mdDoc "OctoPrint, web interface for 3D printers"); host = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/ombi.nix b/nixos/modules/services/misc/ombi.nix index 51cfb05d35c..8bf6a9b116e 100644 --- a/nixos/modules/services/misc/ombi.nix +++ b/nixos/modules/services/misc/ombi.nix @@ -7,11 +7,11 @@ let cfg = config.services.ombi; in { options = { services.ombi = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' Ombi. - Optionally see + Optionally see on how to set up a reverse proxy - ''; + ''); dataDir = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/owncast.nix b/nixos/modules/services/misc/owncast.nix index 23c49d1c119..01fe34cf50f 100644 --- a/nixos/modules/services/misc/owncast.nix +++ b/nixos/modules/services/misc/owncast.nix @@ -5,7 +5,7 @@ in { options.services.owncast = { - enable = mkEnableOption "owncast"; + enable = mkEnableOption (lib.mdDoc "owncast"); dataDir = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/packagekit.nix b/nixos/modules/services/misc/packagekit.nix index 04150ef76ff..f3e6bf50e9b 100644 --- a/nixos/modules/services/misc/packagekit.nix +++ b/nixos/modules/services/misc/packagekit.nix @@ -39,11 +39,11 @@ in ]; options.services.packagekit = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' PackageKit provides a cross-platform D-Bus abstraction layer for installing software. Software utilizing PackageKit can install software regardless of the package manager. - ''; + ''); settings = mkOption { type = iniFmt.type; diff --git a/nixos/modules/services/misc/persistent-evdev.nix b/nixos/modules/services/misc/persistent-evdev.nix index fd6e298ef65..b1f367fec7f 100644 --- a/nixos/modules/services/misc/persistent-evdev.nix +++ b/nixos/modules/services/misc/persistent-evdev.nix @@ -11,21 +11,21 @@ let in { options.services.persistent-evdev = { - enable = lib.mkEnableOption "virtual input devices that persist even if the backing device is hotplugged"; + enable = lib.mkEnableOption (lib.mdDoc "virtual input devices that persist even if the backing device is hotplugged"); devices = lib.mkOption { default = {}; type = with lib.types; attrsOf str; - description = '' + description = lib.mdDoc '' A set of virtual proxy device labels with backing physical device ids. - Physical devices should already exist in /dev/input/by-id/. - Proxy devices will be automatically given a uinput- prefix. + Physical devices should already exist in {file}`/dev/input/by-id/`. + Proxy devices will be automatically given a `uinput-` prefix. - See the project page + See the [project page](https://github.com/aiberia/persistent-evdev#example-usage-with-libvirt) for example configuration of virtual devices with libvirt - and remember to add uinput-* devices to the qemu - cgroup_device_acl list (see ). + and remember to add `uinput-*` devices to the qemu + `cgroup_device_acl` list (see [](#opt-virtualisation.libvirtd.qemu.verbatimConfig)). ''; example = lib.literalExpression '' { diff --git a/nixos/modules/services/misc/pinnwand.nix b/nixos/modules/services/misc/pinnwand.nix index 4eda25b4eb8..29476986111 100644 --- a/nixos/modules/services/misc/pinnwand.nix +++ b/nixos/modules/services/misc/pinnwand.nix @@ -10,7 +10,7 @@ let in { options.services.pinnwand = { - enable = mkEnableOption "Pinnwand"; + enable = mkEnableOption (lib.mdDoc "Pinnwand"); port = mkOption { type = types.port; diff --git a/nixos/modules/services/misc/plex.nix b/nixos/modules/services/misc/plex.nix index 033a4327ca9..7fc76028c02 100644 --- a/nixos/modules/services/misc/plex.nix +++ b/nixos/modules/services/misc/plex.nix @@ -12,7 +12,7 @@ in options = { services.plex = { - enable = mkEnableOption "Plex Media Server"; + enable = mkEnableOption (lib.mdDoc "Plex Media Server"); dataDir = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/plikd.nix b/nixos/modules/services/misc/plikd.nix index 9ae9e064fd5..9b0825bf40c 100644 --- a/nixos/modules/services/misc/plikd.nix +++ b/nixos/modules/services/misc/plikd.nix @@ -11,7 +11,7 @@ in { options = { services.plikd = { - enable = mkEnableOption "the plikd server"; + enable = mkEnableOption (lib.mdDoc "the plikd server"); openFirewall = mkOption { type = types.bool; diff --git a/nixos/modules/services/misc/podgrab.nix b/nixos/modules/services/misc/podgrab.nix index 590309ace7e..10c7bc96b8f 100644 --- a/nixos/modules/services/misc/podgrab.nix +++ b/nixos/modules/services/misc/podgrab.nix @@ -4,7 +4,7 @@ let in { options.services.podgrab = with lib; { - enable = mkEnableOption "Podgrab, a self-hosted podcast manager"; + enable = mkEnableOption (lib.mdDoc "Podgrab, a self-hosted podcast manager"); passwordFile = mkOption { type = with types; nullOr str; diff --git a/nixos/modules/services/misc/polaris.nix b/nixos/modules/services/misc/polaris.nix index b5f7f17e664..83da486083b 100644 --- a/nixos/modules/services/misc/polaris.nix +++ b/nixos/modules/services/misc/polaris.nix @@ -11,7 +11,7 @@ in { options = { services.polaris = { - enable = mkEnableOption "Polaris Music Server"; + enable = mkEnableOption (lib.mdDoc "Polaris Music Server"); package = mkPackageOption pkgs "polaris" { }; diff --git a/nixos/modules/services/misc/portunus.nix b/nixos/modules/services/misc/portunus.nix index a2247272fa2..e82d66516e2 100644 --- a/nixos/modules/services/misc/portunus.nix +++ b/nixos/modules/services/misc/portunus.nix @@ -8,18 +8,18 @@ let in { options.services.portunus = { - enable = mkEnableOption "Portunus, a self-contained user/group management and authentication service for LDAP"; + enable = mkEnableOption (lib.mdDoc "Portunus, a self-contained user/group management and authentication service for LDAP"); domain = mkOption { type = types.str; example = "sso.example.com"; - description = "Subdomain which gets reverse proxied to Portunus webserver."; + description = lib.mdDoc "Subdomain which gets reverse proxied to Portunus webserver."; }; port = mkOption { type = types.port; default = 8080; - description = '' + description = lib.mdDoc '' Port where the Portunus webserver should listen on. This must be put behind a TLS-capable reverse proxy because Portunus only listens on localhost. @@ -30,55 +30,55 @@ in type = types.package; default = pkgs.portunus; defaultText = "pkgs.portunus"; - description = "The Portunus package to use."; + description = lib.mdDoc "The Portunus package to use."; }; seedPath = mkOption { type = types.nullOr types.path; default = null; - description = '' + description = lib.mdDoc '' Path to a portunus seed file in json format. - See for available options. + See for available options. ''; }; stateDir = mkOption { type = types.path; default = "/var/lib/portunus"; - description = "Path where Portunus stores its state."; + description = lib.mdDoc "Path where Portunus stores its state."; }; user = mkOption { type = types.str; default = "portunus"; - description = "User account under which Portunus runs its webserver."; + description = lib.mdDoc "User account under which Portunus runs its webserver."; }; group = mkOption { type = types.str; default = "portunus"; - description = "Group account under which Portunus runs its webserver."; + description = lib.mdDoc "Group account under which Portunus runs its webserver."; }; dex = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' Dex ldap connector. To activate dex, first a search user must be created in the Portunus web ui - and then the password must to be set as the DEX_SEARCH_USER_PASSWORD environment variable - in the setting. - ''; + and then the password must to be set as the `DEX_SEARCH_USER_PASSWORD` environment variable + in the [](#opt-services.dex.environmentFile) setting. + ''); oidcClients = mkOption { type = types.listOf (types.submodule { options = { callbackURL = mkOption { type = types.str; - description = "URL where the OIDC client should redirect"; + description = lib.mdDoc "URL where the OIDC client should redirect"; }; id = mkOption { type = types.str; - description = "ID of the OIDC client"; + description = lib.mdDoc "ID of the OIDC client"; }; }; }); @@ -89,18 +89,18 @@ in id = "service"; } ]; - description = '' + description = lib.mdDoc '' List of OIDC clients. - The OIDC secret must be set as the DEX_CLIENT_''${id} environment variable - in the setting. + The OIDC secret must be set as the `DEX_CLIENT_''${id}` environment variable + in the [](#opt-services.dex.environmentFile) setting. ''; }; port = mkOption { type = types.port; default = 5556; - description = "Port where dex should listen on."; + description = lib.mdDoc "Port where dex should listen on."; }; }; @@ -109,14 +109,14 @@ in type = types.package; default = pkgs.openldap; defaultText = "pkgs.openldap"; - description = "The OpenLDAP package to use."; + description = lib.mdDoc "The OpenLDAP package to use."; }; searchUserName = mkOption { type = types.str; default = ""; example = "admin"; - description = '' + description = lib.mdDoc '' The login name of the search user. This user account must be configured in Portunus either manually or via seeding. ''; @@ -125,7 +125,7 @@ in suffix = mkOption { type = types.str; example = "dc=example,dc=org"; - description = '' + description = lib.mdDoc '' The DN of the topmost entry in your LDAP directory. Please refer to the Portunus documentation for more information on how this impacts the structure of the LDAP directory. ''; @@ -134,25 +134,25 @@ in tls = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Wether to enable LDAPS protocol. - This also adds two entries to the /etc/hosts file to point to localhost, + This also adds two entries to the `/etc/hosts` file to point [](#opt-services.portunus.domain) to localhost, so that CLIs and programs can use ldaps protocol and verify the certificate without opening the firewall port for the protocol. - This requires a TLS certificate for to be configured via . + This requires a TLS certificate for [](#opt-services.portunus.domain) to be configured via [](#opt-security.acme.certs). ''; }; user = mkOption { type = types.str; default = "openldap"; - description = "User account under which Portunus runs its LDAP server."; + description = lib.mdDoc "User account under which Portunus runs its LDAP server."; }; group = mkOption { type = types.str; default = "openldap"; - description = "Group account under which Portunus runs its LDAP server."; + description = lib.mdDoc "Group account under which Portunus runs its LDAP server."; }; }; }; diff --git a/nixos/modules/services/misc/prowlarr.nix b/nixos/modules/services/misc/prowlarr.nix index 6152ee4a769..77b8ec98947 100644 --- a/nixos/modules/services/misc/prowlarr.nix +++ b/nixos/modules/services/misc/prowlarr.nix @@ -9,7 +9,7 @@ in { options = { services.prowlarr = { - enable = mkEnableOption "Prowlarr"; + enable = mkEnableOption (lib.mdDoc "Prowlarr"); openFirewall = mkOption { type = types.bool; diff --git a/nixos/modules/services/misc/radarr.nix b/nixos/modules/services/misc/radarr.nix index a2d7b734f70..834b092c0d1 100644 --- a/nixos/modules/services/misc/radarr.nix +++ b/nixos/modules/services/misc/radarr.nix @@ -9,7 +9,7 @@ in { options = { services.radarr = { - enable = mkEnableOption "Radarr"; + enable = mkEnableOption (lib.mdDoc "Radarr"); package = mkOption { description = lib.mdDoc "Radarr package to use"; diff --git a/nixos/modules/services/misc/redmine.nix b/nixos/modules/services/misc/redmine.nix index 13b62f43557..5fd7e79230e 100644 --- a/nixos/modules/services/misc/redmine.nix +++ b/nixos/modules/services/misc/redmine.nix @@ -49,7 +49,7 @@ in # interface options = { services.redmine = { - enable = mkEnableOption "Redmine"; + enable = mkEnableOption (lib.mdDoc "Redmine"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/misc/ripple-data-api.nix b/nixos/modules/services/misc/ripple-data-api.nix index 7d8a4cb2b44..2663d734980 100644 --- a/nixos/modules/services/misc/ripple-data-api.nix +++ b/nixos/modules/services/misc/ripple-data-api.nix @@ -35,7 +35,7 @@ let in { options = { services.rippleDataApi = { - enable = mkEnableOption "ripple data api"; + enable = mkEnableOption (lib.mdDoc "ripple data api"); port = mkOption { description = lib.mdDoc "Ripple data api port"; diff --git a/nixos/modules/services/misc/rippled.nix b/nixos/modules/services/misc/rippled.nix index 5af48af740f..a3ba3dd2c37 100644 --- a/nixos/modules/services/misc/rippled.nix +++ b/nixos/modules/services/misc/rippled.nix @@ -207,7 +207,7 @@ in options = { services.rippled = { - enable = mkEnableOption "rippled"; + enable = mkEnableOption (lib.mdDoc "rippled"); package = mkOption { description = lib.mdDoc "Which rippled package to use."; @@ -375,7 +375,7 @@ in }; statsd = { - enable = mkEnableOption "statsd monitoring for rippled"; + enable = mkEnableOption (lib.mdDoc "statsd monitoring for rippled"); address = mkOption { description = lib.mdDoc "The UDP address and port of the listening StatsD server."; diff --git a/nixos/modules/services/misc/rmfakecloud.nix b/nixos/modules/services/misc/rmfakecloud.nix index c1b5291ce20..25857c173b6 100644 --- a/nixos/modules/services/misc/rmfakecloud.nix +++ b/nixos/modules/services/misc/rmfakecloud.nix @@ -9,7 +9,7 @@ let in { options = { services.rmfakecloud = { - enable = mkEnableOption "rmfakecloud remarkable self-hosted cloud"; + enable = mkEnableOption (lib.mdDoc "rmfakecloud remarkable self-hosted cloud"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/misc/safeeyes.nix b/nixos/modules/services/misc/safeeyes.nix index 638218d8bb0..e1172d6ff55 100644 --- a/nixos/modules/services/misc/safeeyes.nix +++ b/nixos/modules/services/misc/safeeyes.nix @@ -16,7 +16,7 @@ in services.safeeyes = { - enable = mkEnableOption "the safeeyes OSGi service"; + enable = mkEnableOption (lib.mdDoc "the safeeyes OSGi service"); }; diff --git a/nixos/modules/services/misc/sdrplay.nix b/nixos/modules/services/misc/sdrplay.nix index 2801108f082..2d5333e3885 100644 --- a/nixos/modules/services/misc/sdrplay.nix +++ b/nixos/modules/services/misc/sdrplay.nix @@ -5,13 +5,13 @@ with lib; enable = mkOption { default = false; example = true; - description = '' + description = lib.mdDoc '' Whether to enable the SDRplay API service and udev rules. - - To enable integration with SoapySDR and GUI applications like gqrx create an overlay containing - soapysdr-with-plugins = super.soapysdr.override { extraPackages = [ super.soapysdrplay ]; }; - + ::: {.note} + To enable integration with SoapySDR and GUI applications like gqrx create an overlay containing + `soapysdr-with-plugins = super.soapysdr.override { extraPackages = [ super.soapysdrplay ]; };` + ::: ''; type = lib.types.bool; }; diff --git a/nixos/modules/services/misc/signald.nix b/nixos/modules/services/misc/signald.nix index 8a1d2c4ad38..32ba154506c 100644 --- a/nixos/modules/services/misc/signald.nix +++ b/nixos/modules/services/misc/signald.nix @@ -8,7 +8,7 @@ let in { options.services.signald = { - enable = mkEnableOption "the signald service"; + enable = mkEnableOption (lib.mdDoc "the signald service"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/sonarr.nix b/nixos/modules/services/misc/sonarr.nix index a956a14d007..5a5c9b5aaad 100644 --- a/nixos/modules/services/misc/sonarr.nix +++ b/nixos/modules/services/misc/sonarr.nix @@ -8,7 +8,7 @@ in { options = { services.sonarr = { - enable = mkEnableOption "Sonarr"; + enable = mkEnableOption (lib.mdDoc "Sonarr"); dataDir = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix index 113c53f7395..dd0e016a1da 100644 --- a/nixos/modules/services/misc/sourcehut/default.nix +++ b/nixos/modules/services/misc/sourcehut/default.nix @@ -67,7 +67,7 @@ let type = types.str; default = "postgresql:///localhost?user=${srv}srht&host=/run/postgresql"; }; - migrate-on-upgrade = mkEnableOption "automatic migrations on package upgrade" // { default = true; }; + migrate-on-upgrade = mkEnableOption (lib.mdDoc "automatic migrations on package upgrade") // { default = true; }; oauth-client-id = mkOption { description = lib.mdDoc "${srv}.sr.ht's OAuth client id for meta.sr.ht."; type = types.str; @@ -108,10 +108,10 @@ let in { options.services.sourcehut = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' sourcehut - git hosting, continuous integration, mailing list, ticket tracking, task dispatching, wiki and account management services - ''; + ''); services = mkOption { type = with types; listOf (enum @@ -132,18 +132,18 @@ in internal = true; type = types.package; default = python; - description = '' + description = lib.mdDoc '' The python package to use. It should contain references to the *srht modules and also gunicorn. ''; }; minio = { - enable = mkEnableOption ''local minio integration''; + enable = mkEnableOption (lib.mdDoc ''local minio integration''); }; nginx = { - enable = mkEnableOption ''local nginx integration''; + enable = mkEnableOption (lib.mdDoc ''local nginx integration''); virtualHost = mkOption { type = types.attrs; default = {}; @@ -152,15 +152,15 @@ in }; postfix = { - enable = mkEnableOption ''local postfix integration''; + enable = mkEnableOption (lib.mdDoc ''local postfix integration''); }; postgresql = { - enable = mkEnableOption ''local postgresql integration''; + enable = mkEnableOption (lib.mdDoc ''local postgresql integration''); }; redis = { - enable = mkEnableOption ''local redis integration in a dedicated redis-server''; + enable = mkEnableOption (lib.mdDoc ''local redis integration in a dedicated redis-server''); }; settings = mkOption { @@ -308,7 +308,7 @@ in oauth-client-secret = mkOptionNullOrStr "OAuth client secret."; }; options."dispatch.sr.ht::gitlab" = { - enabled = mkEnableOption "GitLab integration"; + enabled = mkEnableOption (lib.mdDoc "GitLab integration"); canonical-upstream = mkOption { type = types.str; description = lib.mdDoc "Canonical upstream."; @@ -328,7 +328,7 @@ in }; options."builds.sr.ht" = commonServiceSettings "builds" // { - allow-free = mkEnableOption "nonpaying users to submit builds"; + allow-free = mkEnableOption (lib.mdDoc "nonpaying users to submit builds"); redis = mkOption { description = lib.mdDoc "The Redis connection used for the Celery worker."; type = types.str; @@ -465,7 +465,7 @@ in }; options."lists.sr.ht" = commonServiceSettings "lists" // { - allow-new-lists = mkEnableOption "Allow creation of new lists."; + allow-new-lists = mkEnableOption (lib.mdDoc "Allow creation of new lists."); notify-from = mkOption { description = lib.mdDoc "Outgoing email for notifications generated by users."; type = types.str; @@ -539,7 +539,7 @@ in type = types.str; default = "redis+socket:///run/redis-sourcehut-metasrht/redis.sock?virtual_host=1"; }; - welcome-emails = mkEnableOption "sending stock sourcehut welcome emails after signup"; + welcome-emails = mkEnableOption (lib.mdDoc "sending stock sourcehut welcome emails after signup"); }; options."meta.sr.ht::api" = { internal-ipnet = mkOption { @@ -560,7 +560,7 @@ in example = { "git.sr.ht" = 12345; }; }; options."meta.sr.ht::billing" = { - enabled = mkEnableOption "the billing system"; + enabled = mkEnableOption (lib.mdDoc "the billing system"); stripe-public-key = mkOptionNullOrStr "Public key for Stripe. Get your keys at https://dashboard.stripe.com/account/apikeys"; stripe-secret-key = mkOptionNullOrStr '' An absolute file path (which should be outside the Nix-store) @@ -570,7 +570,7 @@ in }; }; options."meta.sr.ht::settings" = { - registration = mkEnableOption "public registration"; + registration = mkEnableOption (lib.mdDoc "public registration"); onboarding-redirect = mkOption { description = lib.mdDoc "Where to redirect new users upon registration."; type = types.str; @@ -601,9 +601,9 @@ in default = 1024; }; user-domain = mkOption { - description = '' + description = lib.mdDoc '' Configures the user domain, if enabled. - All users are given <username>.this.domain. + All users are given \.this.domain. ''; type = with types; nullOr str; default = null; @@ -668,17 +668,17 @@ in }; builds = { - enableWorker = mkEnableOption '' + enableWorker = mkEnableOption (lib.mdDoc '' worker for builds.sr.ht - + ::: {.warning} For smaller deployments, job runners can be installed alongside the master server but even if you only build your own software, integration with other services may cause you to run untrusted builds (e.g. automatic testing of patches via listssrht). - See . - - ''; + See . + ::: + ''); images = mkOption { type = with types; attrsOf (attrsOf (attrsOf package)); diff --git a/nixos/modules/services/misc/sourcehut/service.nix b/nixos/modules/services/misc/sourcehut/service.nix index 243a9cef590..37a439ee352 100644 --- a/nixos/modules/services/misc/sourcehut/service.nix +++ b/nixos/modules/services/misc/sourcehut/service.nix @@ -117,7 +117,7 @@ let in { options.services.sourcehut.${srv} = { - enable = mkEnableOption "${srv} service"; + enable = mkEnableOption (lib.mdDoc "${srv} service"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/spice-vdagentd.nix b/nixos/modules/services/misc/spice-vdagentd.nix index 2dd9fcf68ab..bde64847d89 100644 --- a/nixos/modules/services/misc/spice-vdagentd.nix +++ b/nixos/modules/services/misc/spice-vdagentd.nix @@ -7,7 +7,7 @@ in { options = { services.spice-vdagentd = { - enable = mkEnableOption "Spice guest vdagent daemon"; + enable = mkEnableOption (lib.mdDoc "Spice guest vdagent daemon"); }; }; diff --git a/nixos/modules/services/misc/spice-webdavd.nix b/nixos/modules/services/misc/spice-webdavd.nix index bfb5b262ee1..6c817e429ac 100644 --- a/nixos/modules/services/misc/spice-webdavd.nix +++ b/nixos/modules/services/misc/spice-webdavd.nix @@ -7,13 +7,13 @@ in { options = { services.spice-webdavd = { - enable = mkEnableOption "the spice guest webdav proxy daemon"; + enable = mkEnableOption (lib.mdDoc "the spice guest webdav proxy daemon"); package = mkOption { default = pkgs.phodav; defaultText = literalExpression "pkgs.phodav"; type = types.package; - description = "spice-webdavd provider package to use."; + description = lib.mdDoc "spice-webdavd provider package to use."; }; }; }; diff --git a/nixos/modules/services/misc/ssm-agent.nix b/nixos/modules/services/misc/ssm-agent.nix index 5f2b47bae47..d1f371c2bd6 100644 --- a/nixos/modules/services/misc/ssm-agent.nix +++ b/nixos/modules/services/misc/ssm-agent.nix @@ -17,7 +17,7 @@ let ''; in { options.services.ssm-agent = { - enable = mkEnableOption "AWS SSM agent"; + enable = mkEnableOption (lib.mdDoc "AWS SSM agent"); package = mkOption { type = types.path; diff --git a/nixos/modules/services/misc/sssd.nix b/nixos/modules/services/misc/sssd.nix index 60d4a799d5d..edd5750a4a4 100644 --- a/nixos/modules/services/misc/sssd.nix +++ b/nixos/modules/services/misc/sssd.nix @@ -10,7 +10,7 @@ let in { options = { services.sssd = { - enable = mkEnableOption "the System Security Services Daemon"; + enable = mkEnableOption (lib.mdDoc "the System Security Services Daemon"); config = mkOption { type = types.lines; @@ -54,25 +54,23 @@ in { environmentFile = mkOption { type = types.nullOr types.path; default = null; - description = '' - Environment file as defined in - systemd.exec5 - . + description = lib.mdDoc '' + Environment file as defined in {manpage}`systemd.exec(5)`. Secrets may be passed to the service without adding them to the world-readable Nix store, by specifying placeholder variables as the option value in Nix and setting these variables accordingly in the environment file. - + ``` # snippet of sssd-related config [domain/LDAP] ldap_default_authtok = $SSSD_LDAP_DEFAULT_AUTHTOK - + ``` - + ``` # contents of the environment file SSSD_LDAP_DEFAULT_AUTHTOK=verysecretpassword - + ``` ''; }; }; diff --git a/nixos/modules/services/misc/subsonic.nix b/nixos/modules/services/misc/subsonic.nix index d657ae2b998..0862d578259 100644 --- a/nixos/modules/services/misc/subsonic.nix +++ b/nixos/modules/services/misc/subsonic.nix @@ -8,7 +8,7 @@ let in { options = { services.subsonic = { - enable = mkEnableOption "Subsonic daemon"; + enable = mkEnableOption (lib.mdDoc "Subsonic daemon"); home = mkOption { type = types.path; diff --git a/nixos/modules/services/misc/sundtek.nix b/nixos/modules/services/misc/sundtek.nix index e3234518c94..e85d7c5b92b 100644 --- a/nixos/modules/services/misc/sundtek.nix +++ b/nixos/modules/services/misc/sundtek.nix @@ -8,7 +8,7 @@ let in { options.services.sundtek = { - enable = mkEnableOption "Sundtek driver"; + enable = mkEnableOption (lib.mdDoc "Sundtek driver"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/misc/synergy.nix b/nixos/modules/services/misc/synergy.nix index c02d80b35c6..e630992f797 100644 --- a/nixos/modules/services/misc/synergy.nix +++ b/nixos/modules/services/misc/synergy.nix @@ -19,7 +19,7 @@ in # !!! All these option descriptions needs to be cleaned up. client = { - enable = mkEnableOption "the Synergy client (receive keyboard and mouse events from a Synergy server)"; + enable = mkEnableOption (lib.mdDoc "the Synergy client (receive keyboard and mouse events from a Synergy server)"); screenName = mkOption { default = ""; @@ -45,7 +45,7 @@ in }; server = { - enable = mkEnableOption "the Synergy server (send keyboard and mouse events)"; + enable = mkEnableOption (lib.mdDoc "the Synergy server (send keyboard and mouse events)"); configFile = mkOption { type = types.path; diff --git a/nixos/modules/services/misc/sysprof.nix b/nixos/modules/services/misc/sysprof.nix index ab91a8b586a..25c5b0fabf6 100644 --- a/nixos/modules/services/misc/sysprof.nix +++ b/nixos/modules/services/misc/sysprof.nix @@ -3,7 +3,7 @@ { options = { services.sysprof = { - enable = lib.mkEnableOption "sysprof profiling daemon"; + enable = lib.mkEnableOption (lib.mdDoc "sysprof profiling daemon"); }; }; diff --git a/nixos/modules/services/misc/taskserver/default.nix b/nixos/modules/services/misc/taskserver/default.nix index ad4ab93a872..aeefd657f4d 100644 --- a/nixos/modules/services/misc/taskserver/default.nix +++ b/nixos/modules/services/misc/taskserver/default.nix @@ -10,10 +10,12 @@ let mkManualPkiOption = desc: mkOption { type = types.nullOr types.path; default = null; - description = desc + '' - + description = lib.mdDoc '' + ${desc} + + ::: {.note} Setting this option will prevent automatic CA creation and handling. - + ::: ''; }; @@ -35,13 +37,13 @@ let ''; }; - mkAutoDesc = preamble: '' + mkAutoDesc = preamble: lib.mdDoc '' ${preamble} - + ::: {.note} This option is for the automatically handled CA and will be ignored if any - of the options are set. - + of the {option}`services.taskserver.pki.manual.*` options are set. + ::: ''; mkExpireOption = desc: mkOption { @@ -50,7 +52,7 @@ let example = 365; apply = val: if val == null then -1 else val; description = mkAutoDesc '' - The expiration time of ${desc} in days or null for no + The expiration time of ${desc} in days or `null` for no expiration time. ''; }; @@ -140,11 +142,11 @@ in { default = false; description = let url = "https://nixos.org/manual/nixos/stable/index.html#module-services-taskserver"; - in '' + in lib.mdDoc '' Whether to enable the Taskwarrior server. More instructions about NixOS in conjuction with Taskserver can be - found in the NixOS manual. + found [in the NixOS manual](${url}). ''; }; @@ -172,9 +174,9 @@ in { example = "NORMAL:-VERS-SSL3.0"; description = let url = "https://gnutls.org/manual/html_node/Priority-Strings.html"; - in '' + in lib.mdDoc '' List of GnuTLS ciphers to use. See the GnuTLS documentation about - priority strings at for full details. + priority strings at <${url}> for full details. ''; }; diff --git a/nixos/modules/services/misc/tautulli.nix b/nixos/modules/services/misc/tautulli.nix index 78f9429c9aa..0efd0839bc1 100644 --- a/nixos/modules/services/misc/tautulli.nix +++ b/nixos/modules/services/misc/tautulli.nix @@ -12,7 +12,7 @@ in options = { services.tautulli = { - enable = mkEnableOption "Tautulli Plex Monitor"; + enable = mkEnableOption (lib.mdDoc "Tautulli Plex Monitor"); dataDir = mkOption { type = types.str; diff --git a/nixos/modules/services/misc/tiddlywiki.nix b/nixos/modules/services/misc/tiddlywiki.nix index 7052be23d76..849f53ca2d4 100644 --- a/nixos/modules/services/misc/tiddlywiki.nix +++ b/nixos/modules/services/misc/tiddlywiki.nix @@ -14,7 +14,7 @@ in { options.services.tiddlywiki = { - enable = mkEnableOption "TiddlyWiki nodejs server"; + enable = mkEnableOption (lib.mdDoc "TiddlyWiki nodejs server"); listenOptions = mkOption { type = types.attrs; diff --git a/nixos/modules/services/misc/tp-auto-kbbl.nix b/nixos/modules/services/misc/tp-auto-kbbl.nix index 54dec0b3fea..8d92d3d9367 100644 --- a/nixos/modules/services/misc/tp-auto-kbbl.nix +++ b/nixos/modules/services/misc/tp-auto-kbbl.nix @@ -9,7 +9,7 @@ in { options = { services.tp-auto-kbbl = { - enable = mkEnableOption "Auto toggle keyboard back-lighting on Thinkpads (and maybe other laptops) for Linux"; + enable = mkEnableOption (lib.mdDoc "Auto toggle keyboard back-lighting on Thinkpads (and maybe other laptops) for Linux"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/misc/uhub.nix b/nixos/modules/services/misc/uhub.nix index c3eda0db44d..80266b024e3 100644 --- a/nixos/modules/services/misc/uhub.nix +++ b/nixos/modules/services/misc/uhub.nix @@ -19,7 +19,7 @@ in { type = types.attrsOf (types.submodule { options = { - enable = mkEnableOption "hub instance" // { default = true; }; + enable = mkEnableOption (lib.mdDoc "hub instance") // { default = true; }; enableTLS = mkOption { type = types.bool; diff --git a/nixos/modules/services/misc/weechat.nix b/nixos/modules/services/misc/weechat.nix index b1de30ae2b8..663a767a0c1 100644 --- a/nixos/modules/services/misc/weechat.nix +++ b/nixos/modules/services/misc/weechat.nix @@ -8,7 +8,7 @@ in { options.services.weechat = { - enable = mkEnableOption "weechat"; + enable = mkEnableOption (lib.mdDoc "weechat"); root = mkOption { description = lib.mdDoc "Weechat state directory."; type = types.str; diff --git a/nixos/modules/services/misc/xmr-stak.nix b/nixos/modules/services/misc/xmr-stak.nix index c218f747f28..6e123cf0380 100644 --- a/nixos/modules/services/misc/xmr-stak.nix +++ b/nixos/modules/services/misc/xmr-stak.nix @@ -15,9 +15,9 @@ in { options = { services.xmr-stak = { - enable = mkEnableOption "xmr-stak miner"; - openclSupport = mkEnableOption "support for OpenCL (AMD/ATI graphics cards)"; - cudaSupport = mkEnableOption "support for CUDA (NVidia graphics cards)"; + enable = mkEnableOption (lib.mdDoc "xmr-stak miner"); + openclSupport = mkEnableOption (lib.mdDoc "support for OpenCL (AMD/ATI graphics cards)"); + cudaSupport = mkEnableOption (lib.mdDoc "support for CUDA (NVidia graphics cards)"); extraArgs = mkOption { type = types.listOf types.str; diff --git a/nixos/modules/services/misc/xmrig.nix b/nixos/modules/services/misc/xmrig.nix index a98b2292f55..d2aa3df45d5 100644 --- a/nixos/modules/services/misc/xmrig.nix +++ b/nixos/modules/services/misc/xmrig.nix @@ -13,7 +13,7 @@ with lib; { options = { services.xmrig = { - enable = mkEnableOption "XMRig Mining Software"; + enable = mkEnableOption (lib.mdDoc "XMRig Mining Software"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/misc/zoneminder.nix b/nixos/modules/services/misc/zoneminder.nix index fa0e06a0148..e031fab5970 100644 --- a/nixos/modules/services/misc/zoneminder.nix +++ b/nixos/modules/services/misc/zoneminder.nix @@ -66,7 +66,7 @@ let in { options = { services.zoneminder = with lib; { - enable = lib.mkEnableOption '' + enable = lib.mkEnableOption (lib.mdDoc '' ZoneMinder If you intend to run the database locally, you should set @@ -75,7 +75,7 @@ in { and database user as well as populate the database yourself. Additionally, you will need to run `zmupdate.pl` yourself when upgrading to a newer version. - ''; + ''); webserver = mkOption { type = types.enum [ "nginx" "none" ]; diff --git a/nixos/modules/services/monitoring/alerta.nix b/nixos/modules/services/monitoring/alerta.nix index c0caa0dc3be..cf94f9813e8 100644 --- a/nixos/modules/services/monitoring/alerta.nix +++ b/nixos/modules/services/monitoring/alerta.nix @@ -21,7 +21,7 @@ let in { options.services.alerta = { - enable = mkEnableOption "alerta"; + enable = mkEnableOption (lib.mdDoc "alerta"); port = mkOption { type = types.int; diff --git a/nixos/modules/services/monitoring/collectd.nix b/nixos/modules/services/monitoring/collectd.nix index 3d518ebc67a..5d525995c67 100644 --- a/nixos/modules/services/monitoring/collectd.nix +++ b/nixos/modules/services/monitoring/collectd.nix @@ -29,7 +29,7 @@ let in { options.services.collectd = with types; { - enable = mkEnableOption "collectd agent"; + enable = mkEnableOption (lib.mdDoc "collectd agent"); validateConfig = mkOption { default = true; diff --git a/nixos/modules/services/monitoring/das_watchdog.nix b/nixos/modules/services/monitoring/das_watchdog.nix index 88ca3a9227d..fd420b0c8a0 100644 --- a/nixos/modules/services/monitoring/das_watchdog.nix +++ b/nixos/modules/services/monitoring/das_watchdog.nix @@ -12,7 +12,7 @@ in { ###### interface options = { - services.das_watchdog.enable = mkEnableOption "realtime watchdog"; + services.das_watchdog.enable = mkEnableOption (lib.mdDoc "realtime watchdog"); }; ###### implementation diff --git a/nixos/modules/services/monitoring/do-agent.nix b/nixos/modules/services/monitoring/do-agent.nix index 4dfb6236727..c1788c640c2 100644 --- a/nixos/modules/services/monitoring/do-agent.nix +++ b/nixos/modules/services/monitoring/do-agent.nix @@ -8,7 +8,7 @@ let in { options.services.do-agent = { - enable = mkEnableOption "do-agent, the DigitalOcean droplet metrics agent"; + enable = mkEnableOption (lib.mdDoc "do-agent, the DigitalOcean droplet metrics agent"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/monitoring/fusion-inventory.nix b/nixos/modules/services/monitoring/fusion-inventory.nix index 6b440e9fa45..7b28e8de122 100644 --- a/nixos/modules/services/monitoring/fusion-inventory.nix +++ b/nixos/modules/services/monitoring/fusion-inventory.nix @@ -22,7 +22,7 @@ in { services.fusionInventory = { - enable = mkEnableOption "Fusion Inventory Agent"; + enable = mkEnableOption (lib.mdDoc "Fusion Inventory Agent"); servers = mkOption { type = types.listOf types.str; diff --git a/nixos/modules/services/monitoring/grafana-agent.nix b/nixos/modules/services/monitoring/grafana-agent.nix index 45b62d140c1..ecb39a924f5 100644 --- a/nixos/modules/services/monitoring/grafana-agent.nix +++ b/nixos/modules/services/monitoring/grafana-agent.nix @@ -11,7 +11,7 @@ in }; options.services.grafana-agent = { - enable = mkEnableOption "grafana-agent"; + enable = mkEnableOption (lib.mdDoc "grafana-agent"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/monitoring/grafana-image-renderer.nix b/nixos/modules/services/monitoring/grafana-image-renderer.nix index d92ce5e1eef..549da138fe2 100644 --- a/nixos/modules/services/monitoring/grafana-image-renderer.nix +++ b/nixos/modules/services/monitoring/grafana-image-renderer.nix @@ -10,7 +10,7 @@ let configFile = format.generate "grafana-image-renderer-config.json" cfg.settings; in { options.services.grafana-image-renderer = { - enable = mkEnableOption "grafana-image-renderer"; + enable = mkEnableOption (lib.mdDoc "grafana-image-renderer"); chromium = mkOption { type = types.package; @@ -19,9 +19,9 @@ in { ''; }; - verbose = mkEnableOption "verbosity for the service"; + verbose = mkEnableOption (lib.mdDoc "verbosity for the service"); - provisionGrafana = mkEnableOption "Grafana configuration for grafana-image-renderer"; + provisionGrafana = mkEnableOption (lib.mdDoc "Grafana configuration for grafana-image-renderer"); settings = mkOption { type = types.submodule { @@ -62,18 +62,16 @@ in { mode = mkOption { default = "default"; type = types.enum [ "default" "reusable" "clustered" ]; - description = '' - Rendering mode of grafana-image-renderer: - - default: Creates on browser-instance - per rendering request. - reusable: One browser instance - will be started and reused for each rendering request. - clustered: allows to precisely + description = lib.mdDoc '' + Rendering mode of `grafana-image-renderer`: + + - `default:` Creates on browser-instance + per rendering request. + - `reusable:` One browser instance + will be started and reused for each rendering request. + - `clustered:` allows to precisely configure how many browser-instances are supposed to be used. The values - for that mode can be declared in rendering.clustering. - - + for that mode can be declared in `rendering.clustering`. ''; }; args = mkOption { diff --git a/nixos/modules/services/monitoring/grafana-reporter.nix b/nixos/modules/services/monitoring/grafana-reporter.nix index 7a27b5cbce3..add725e7ba2 100644 --- a/nixos/modules/services/monitoring/grafana-reporter.nix +++ b/nixos/modules/services/monitoring/grafana-reporter.nix @@ -7,7 +7,7 @@ let in { options.services.grafana_reporter = { - enable = mkEnableOption "grafana_reporter"; + enable = mkEnableOption (lib.mdDoc "grafana_reporter"); grafana = { protocol = mkOption { diff --git a/nixos/modules/services/monitoring/grafana.nix b/nixos/modules/services/monitoring/grafana.nix index 456fe92eea3..d72aaf0464e 100644 --- a/nixos/modules/services/monitoring/grafana.nix +++ b/nixos/modules/services/monitoring/grafana.nix @@ -302,7 +302,7 @@ let }; in { options.services.grafana = { - enable = mkEnableOption "grafana"; + enable = mkEnableOption (lib.mdDoc "grafana"); protocol = mkOption { description = lib.mdDoc "Which protocol to listen."; @@ -445,7 +445,7 @@ in { }; provision = { - enable = mkEnableOption "provision"; + enable = mkEnableOption (lib.mdDoc "provision"); datasources = mkOption { description = lib.mdDoc "Grafana datasources configuration."; default = []; @@ -513,7 +513,7 @@ in { }; smtp = { - enable = mkEnableOption "smtp"; + enable = mkEnableOption (lib.mdDoc "smtp"); host = mkOption { description = lib.mdDoc "Host to connect to."; default = "localhost:25"; diff --git a/nixos/modules/services/monitoring/hdaps.nix b/nixos/modules/services/monitoring/hdaps.nix index 2cad3b84d84..59b8b9b3c05 100644 --- a/nixos/modules/services/monitoring/hdaps.nix +++ b/nixos/modules/services/monitoring/hdaps.nix @@ -9,10 +9,10 @@ in { options = { services.hdapsd.enable = mkEnableOption - '' + (lib.mdDoc '' Hard Drive Active Protection System Daemon, devices are detected and managed automatically by udev and systemd - ''; + ''); }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/monitoring/incron.nix b/nixos/modules/services/monitoring/incron.nix index 53cbe1a9e26..3766f1fa238 100644 --- a/nixos/modules/services/monitoring/incron.nix +++ b/nixos/modules/services/monitoring/incron.nix @@ -17,10 +17,10 @@ in enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to enable the incron daemon. - Note that commands run under incrontab only support common Nix profiles for the PATH provided variable. + Note that commands run under incrontab only support common Nix profiles for the {env}`PATH` provided variable. ''; }; diff --git a/nixos/modules/services/monitoring/kapacitor.nix b/nixos/modules/services/monitoring/kapacitor.nix index 9cdb0e4495a..61529c2e452 100644 --- a/nixos/modules/services/monitoring/kapacitor.nix +++ b/nixos/modules/services/monitoring/kapacitor.nix @@ -57,7 +57,7 @@ let in { options.services.kapacitor = { - enable = mkEnableOption "kapacitor"; + enable = mkEnableOption (lib.mdDoc "kapacitor"); dataDir = mkOption { type = types.path; @@ -109,7 +109,7 @@ in }; defaultDatabase = { - enable = mkEnableOption "kapacitor.defaultDatabase"; + enable = mkEnableOption (lib.mdDoc "kapacitor.defaultDatabase"); url = mkOption { description = lib.mdDoc "The URL to an InfluxDB server that serves as the default database"; @@ -129,7 +129,7 @@ in }; alerta = { - enable = mkEnableOption "kapacitor alerta integration"; + enable = mkEnableOption (lib.mdDoc "kapacitor alerta integration"); url = mkOption { description = lib.mdDoc "The URL to the Alerta REST API"; diff --git a/nixos/modules/services/monitoring/loki.nix b/nixos/modules/services/monitoring/loki.nix index d73e2abb71d..11bb8497c9b 100644 --- a/nixos/modules/services/monitoring/loki.nix +++ b/nixos/modules/services/monitoring/loki.nix @@ -12,7 +12,7 @@ let in { options.services.loki = { - enable = mkEnableOption "loki"; + enable = mkEnableOption (lib.mdDoc "loki"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/monitoring/mackerel-agent.nix b/nixos/modules/services/monitoring/mackerel-agent.nix index 9182739ee1c..4185cd76c4e 100644 --- a/nixos/modules/services/monitoring/mackerel-agent.nix +++ b/nixos/modules/services/monitoring/mackerel-agent.nix @@ -7,15 +7,15 @@ let settingsFmt = pkgs.formats.toml {}; in { options.services.mackerel-agent = { - enable = mkEnableOption "mackerel.io agent"; + enable = mkEnableOption (lib.mdDoc "mackerel.io agent"); # the upstream package runs as root, but doesn't seem to be strictly # necessary for basic functionality - runAsRoot = mkEnableOption "Whether to run as root."; + runAsRoot = mkEnableOption (lib.mdDoc "Whether to run as root."); - autoRetirement = mkEnableOption '' + autoRetirement = mkEnableOption (lib.mdDoc '' Whether to automatically retire the host upon OS shutdown. - ''; + ''); apiKeyFile = mkOption { type = types.path; @@ -59,7 +59,7 @@ in { }; options.diagnostic = - mkEnableOption "Collect memory usage for the agent itself"; + mkEnableOption (lib.mdDoc "Collect memory usage for the agent itself"); }; }; }; diff --git a/nixos/modules/services/monitoring/metricbeat.nix b/nixos/modules/services/monitoring/metricbeat.nix index 14066da1be8..310c9d8ed50 100644 --- a/nixos/modules/services/monitoring/metricbeat.nix +++ b/nixos/modules/services/monitoring/metricbeat.nix @@ -19,7 +19,7 @@ in services.metricbeat = { - enable = mkEnableOption "metricbeat"; + enable = mkEnableOption (lib.mdDoc "metricbeat"); package = mkOption { type = types.package; @@ -99,10 +99,10 @@ in type = types.listOf settingsFormat.type; default = []; internal = true; - description = '' - The metric collecting modules. Use instead. + description = lib.mdDoc '' + The metric collecting modules. Use [](#opt-services.metricbeat.modules) instead. - See . + See . ''; }; }; diff --git a/nixos/modules/services/monitoring/mimir.nix b/nixos/modules/services/monitoring/mimir.nix index 87f7af7855e..568066990f2 100644 --- a/nixos/modules/services/monitoring/mimir.nix +++ b/nixos/modules/services/monitoring/mimir.nix @@ -8,7 +8,7 @@ let settingsFormat = pkgs.formats.yaml {}; in { options.services.mimir = { - enable = mkEnableOption "mimir"; + enable = mkEnableOption (lib.mdDoc "mimir"); configuration = mkOption { type = (pkgs.formats.json {}).type; diff --git a/nixos/modules/services/monitoring/monit.nix b/nixos/modules/services/monitoring/monit.nix index 6ce5b44eb27..a22bbc9046b 100644 --- a/nixos/modules/services/monitoring/monit.nix +++ b/nixos/modules/services/monitoring/monit.nix @@ -9,7 +9,7 @@ in { options.services.monit = { - enable = mkEnableOption "Monit"; + enable = mkEnableOption (lib.mdDoc "Monit"); config = mkOption { type = types.lines; diff --git a/nixos/modules/services/monitoring/nagios.nix b/nixos/modules/services/monitoring/nagios.nix index 14dbc5fdb44..8feff22c118 100644 --- a/nixos/modules/services/monitoring/nagios.nix +++ b/nixos/modules/services/monitoring/nagios.nix @@ -88,7 +88,7 @@ in options = { services.nagios = { - enable = mkEnableOption ''Nagios to monitor your system or network.''; + enable = mkEnableOption (lib.mdDoc ''[Nagios](http://www.nagios.org/) to monitor your system or network.''); objectDefs = mkOption { description = lib.mdDoc '' @@ -104,8 +104,8 @@ in type = types.listOf types.package; default = with pkgs; [ monitoring-plugins msmtp mailutils ]; defaultText = literalExpression "[pkgs.monitoring-plugins pkgs.msmtp pkgs.mailutils]"; - description = '' - Packages to be added to the Nagios PATH. + description = lib.mdDoc '' + Packages to be added to the Nagios {env}`PATH`. Typically used to add plugins, but can be anything. ''; }; diff --git a/nixos/modules/services/monitoring/netdata.nix b/nixos/modules/services/monitoring/netdata.nix index e20eaf3b144..92c870bb23f 100644 --- a/nixos/modules/services/monitoring/netdata.nix +++ b/nixos/modules/services/monitoring/netdata.nix @@ -49,7 +49,7 @@ let in { options = { services.netdata = { - enable = mkEnableOption "netdata"; + enable = mkEnableOption (lib.mdDoc "netdata"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/monitoring/parsedmarc.nix b/nixos/modules/services/monitoring/parsedmarc.nix index b0858184b5f..7618414d904 100644 --- a/nixos/modules/services/monitoring/parsedmarc.nix +++ b/nixos/modules/services/monitoring/parsedmarc.nix @@ -20,9 +20,9 @@ in { options.services.parsedmarc = { - enable = lib.mkEnableOption '' + enable = lib.mkEnableOption (lib.mdDoc '' parsedmarc, a DMARC report monitoring service - ''; + ''); provision = { localMail = { diff --git a/nixos/modules/services/monitoring/prometheus/alertmanager.nix b/nixos/modules/services/monitoring/prometheus/alertmanager.nix index 60e0523cc35..ee2533ef121 100644 --- a/nixos/modules/services/monitoring/prometheus/alertmanager.nix +++ b/nixos/modules/services/monitoring/prometheus/alertmanager.nix @@ -40,7 +40,7 @@ in { options = { services.prometheus.alertmanager = { - enable = mkEnableOption "Prometheus Alertmanager"; + enable = mkEnableOption (lib.mdDoc "Prometheus Alertmanager"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index 47c30a0f24b..3447fe1bd2e 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -80,7 +80,7 @@ let ); mkExporterOpts = ({ name, port }: { - enable = mkEnableOption "the prometheus ${name} exporter"; + enable = mkEnableOption (lib.mdDoc "the prometheus ${name} exporter"); port = mkOption { type = types.port; default = port; @@ -115,10 +115,10 @@ let example = literalExpression '' "-i eth0 -p tcp -m tcp --dport ${toString port}" ''; - description = '' + description = lib.mdDoc '' Specify a filter for iptables to use when - - is true. It is used as `ip46tables -I nixos-fw -j nixos-fw-accept`. + {option}`services.prometheus.exporters.${name}.openFirewall` + is true. It is used as `ip46tables -I nixos-fw firewallFilter -j nixos-fw-accept`. ''; }; user = mkOption { diff --git a/nixos/modules/services/monitoring/prometheus/exporters/collectd.nix b/nixos/modules/services/monitoring/prometheus/exporters/collectd.nix index eab1f9e7b4d..d9eedd237c8 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/collectd.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/collectd.nix @@ -9,7 +9,7 @@ in port = 9103; extraOpts = { collectdBinary = { - enable = mkEnableOption "collectd binary protocol receiver"; + enable = mkEnableOption (lib.mdDoc "collectd binary protocol receiver"); authFile = mkOption { default = null; diff --git a/nixos/modules/services/monitoring/prometheus/exporters/dovecot.nix b/nixos/modules/services/monitoring/prometheus/exporters/dovecot.nix index 80a2f92881d..6fb438353a4 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/dovecot.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/dovecot.nix @@ -19,19 +19,19 @@ in type = types.path; default = "/var/run/dovecot/stats"; example = "/var/run/dovecot2/old-stats"; - description = '' + description = lib.mdDoc '' Path under which the stats socket is placed. The user/group under which the exporter runs, should be able to access the socket in order to scrape the metrics successfully. Please keep in mind that the stats module has changed in - Dovecot 2.3+ which - is not compatible with this exporter. + [Dovecot 2.3+](https://wiki2.dovecot.org/Upgrading/2.3) which + is not [compatible with this exporter](https://github.com/kumina/dovecot_exporter/issues/8). The following extra config has to be passed to Dovecot to ensure that recent versions work with this exporter: - + ``` { services.prometheus.exporters.dovecot.enable = true; services.prometheus.exporters.dovecot.socketPath = "/var/run/dovecot2/old-stats"; @@ -60,7 +60,7 @@ in } '''; } - + ``` ''; }; scopes = mkOption { diff --git a/nixos/modules/services/monitoring/prometheus/exporters/fastly.nix b/nixos/modules/services/monitoring/prometheus/exporters/fastly.nix index 182a1131c05..36409caccf2 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/fastly.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/fastly.nix @@ -7,7 +7,7 @@ in { port = 9118; extraOpts = { - debug = mkEnableOption "Debug logging mode for fastly-exporter"; + debug = mkEnableOption (lib.mdDoc "Debug logging mode for fastly-exporter"); configFile = mkOption { type = types.nullOr types.path; diff --git a/nixos/modules/services/monitoring/prometheus/exporters/mail.nix b/nixos/modules/services/monitoring/prometheus/exporters/mail.nix index 4ebe7128e2a..129c73eba4a 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/mail.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/mail.nix @@ -112,14 +112,14 @@ let detectionDir = "/path/to/Maildir/new"; } ] ''; - description = '' + description = lib.mdDoc '' List of servers that should be probed. - Note: if your mailserver has rspamd8 configured, + *Note:* if your mailserver has {manpage}`rspamd(8)` configured, it can happen that emails from this exporter are marked as spam. It's possible to work around the issue with a config like this: - + ``` { services.rspamd.locals."multimap.conf".text = ''' ALLOWLIST_PROMETHEUS { @@ -130,7 +130,7 @@ let } '''; } - + ``` ''; }; }; diff --git a/nixos/modules/services/monitoring/prometheus/exporters/openldap.nix b/nixos/modules/services/monitoring/prometheus/exporters/openldap.nix index 6f77c05562d..aee3ae5bb2d 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/openldap.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/openldap.nix @@ -10,16 +10,16 @@ in { ldapCredentialFile = mkOption { type = types.path; example = "/run/keys/ldap_pass"; - description = '' + description = lib.mdDoc '' Environment file to contain the credentials to authenticate against - openldap. + `openldap`. The file should look like this: - + ``` --- ldapUser: "cn=monitoring,cn=Monitor" ldapPass: "secret" - + ``` ''; }; protocol = mkOption { diff --git a/nixos/modules/services/monitoring/prometheus/exporters/postgres.nix b/nixos/modules/services/monitoring/prometheus/exporters/postgres.nix index 5e8dd21af85..755d771ecdf 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/postgres.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/postgres.nix @@ -36,8 +36,8 @@ in type = types.nullOr types.path; default = null; example = "/root/prometheus-postgres-exporter.env"; - description = '' - Environment file as defined in systemd.exec5. + description = lib.mdDoc '' + Environment file as defined in {manpage}`systemd.exec(5)`. Secrets may be passed to the service without adding them to the world-readable Nix store, by specifying placeholder variables as @@ -46,7 +46,7 @@ in Environment variables from this file will be interpolated into the config file using envsubst with this syntax: - $ENVIRONMENT ''${VARIABLE} + `$ENVIRONMENT ''${VARIABLE}` The main use is to set the DATA_SOURCE_NAME that contains the postgres password @@ -54,10 +54,10 @@ in note that contents from this file will override dataSourceName if you have set it from nix. - + ``` # Content of the environment file DATA_SOURCE_NAME=postgresql://username:password@localhost:5432/postgres?sslmode=disable - + ``` Note that this file needs to be available on the host on which this exporter is running. diff --git a/nixos/modules/services/monitoring/prometheus/exporters/unifi-poller.nix b/nixos/modules/services/monitoring/prometheus/exporters/unifi-poller.nix index 394e6e201f0..d264e68be9a 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/unifi-poller.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/unifi-poller.nix @@ -21,9 +21,9 @@ in { extraOpts = { inherit (options.services.unifi-poller.unifi) controllers; log = { - debug = mkEnableOption "debug logging including line numbers, high resolution timestamps, per-device logs."; - quiet = mkEnableOption "startup and error logs only."; - prometheusErrors = mkEnableOption "emitting errors to prometheus."; + debug = mkEnableOption (lib.mdDoc "debug logging including line numbers, high resolution timestamps, per-device logs."); + quiet = mkEnableOption (lib.mdDoc "startup and error logs only."); + prometheusErrors = mkEnableOption (lib.mdDoc "emitting errors to prometheus."); }; }; diff --git a/nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix b/nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix index 20631f2af93..c98dcd9f64b 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix @@ -11,7 +11,7 @@ in { ({ options.warnings = options.warnings; options.assertions = options.assertions; }) ]; extraOpts = { - verbose = mkEnableOption "Verbose logging mode for prometheus-wireguard-exporter"; + verbose = mkEnableOption (lib.mdDoc "Verbose logging mode for prometheus-wireguard-exporter"); wireguardConfig = mkOption { type = with types; nullOr (either path str); diff --git a/nixos/modules/services/monitoring/prometheus/pushgateway.nix b/nixos/modules/services/monitoring/prometheus/pushgateway.nix index ac7a2300f67..f5c114c9275 100644 --- a/nixos/modules/services/monitoring/prometheus/pushgateway.nix +++ b/nixos/modules/services/monitoring/prometheus/pushgateway.nix @@ -21,7 +21,7 @@ let in { options = { services.prometheus.pushgateway = { - enable = mkEnableOption "Prometheus Pushgateway"; + enable = mkEnableOption (lib.mdDoc "Prometheus Pushgateway"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/monitoring/prometheus/sachet.nix b/nixos/modules/services/monitoring/prometheus/sachet.nix index f40229df8f1..f1aa750b2f2 100644 --- a/nixos/modules/services/monitoring/prometheus/sachet.nix +++ b/nixos/modules/services/monitoring/prometheus/sachet.nix @@ -9,7 +9,7 @@ in { options = { services.prometheus.sachet = { - enable = mkEnableOption "Sachet, an SMS alerting tool for the Prometheus Alertmanager"; + enable = mkEnableOption (lib.mdDoc "Sachet, an SMS alerting tool for the Prometheus Alertmanager"); configuration = mkOption { type = types.nullOr types.attrs; @@ -32,7 +32,7 @@ in }]; } ''; - description = '' + description = lib.mdDoc '' Sachet's configuration as a nix attribute set. ''; }; @@ -40,7 +40,7 @@ in address = mkOption { type = types.str; default = "localhost"; - description = '' + description = lib.mdDoc '' The address Sachet will listen to. ''; }; @@ -48,7 +48,7 @@ in port = mkOption { type = types.port; default = 9876; - description = '' + description = lib.mdDoc '' The port Sachet will listen to. ''; }; diff --git a/nixos/modules/services/monitoring/prometheus/xmpp-alerts.nix b/nixos/modules/services/monitoring/prometheus/xmpp-alerts.nix index 1d7da7ced3f..4545ca37d27 100644 --- a/nixos/modules/services/monitoring/prometheus/xmpp-alerts.nix +++ b/nixos/modules/services/monitoring/prometheus/xmpp-alerts.nix @@ -15,7 +15,7 @@ in ]; options.services.prometheus.xmpp-alerts = { - enable = mkEnableOption "XMPP Web hook service for Alertmanager"; + enable = mkEnableOption (lib.mdDoc "XMPP Web hook service for Alertmanager"); settings = mkOption { type = settingsFormat.type; diff --git a/nixos/modules/services/monitoring/smartd.nix b/nixos/modules/services/monitoring/smartd.nix index 83791631d2c..cfebb4b9798 100644 --- a/nixos/modules/services/monitoring/smartd.nix +++ b/nixos/modules/services/monitoring/smartd.nix @@ -95,7 +95,7 @@ in services.smartd = { - enable = mkEnableOption "smartd daemon from smartmontools package"; + enable = mkEnableOption (lib.mdDoc "smartd daemon from `smartmontools` package"); autodetect = mkOption { default = true; @@ -135,9 +135,9 @@ in default = "root"; example = "example@domain.tld"; type = types.str; - description = '' + description = lib.mdDoc '' Sender of the notification messages. - Acts as the value of email in the emails' From: ... field. + Acts as the value of `email` in the emails' `From: ...` field. ''; }; diff --git a/nixos/modules/services/monitoring/statsd.nix b/nixos/modules/services/monitoring/statsd.nix index d109e082620..bbc1c7146a8 100644 --- a/nixos/modules/services/monitoring/statsd.nix +++ b/nixos/modules/services/monitoring/statsd.nix @@ -56,7 +56,7 @@ in options.services.statsd = { - enable = mkEnableOption "statsd"; + enable = mkEnableOption (lib.mdDoc "statsd"); listenAddress = mkOption { description = lib.mdDoc "Address that statsd listens on over UDP"; diff --git a/nixos/modules/services/monitoring/sysstat.nix b/nixos/modules/services/monitoring/sysstat.nix index f8621f08bb8..5468fc3aa45 100644 --- a/nixos/modules/services/monitoring/sysstat.nix +++ b/nixos/modules/services/monitoring/sysstat.nix @@ -5,7 +5,7 @@ let in { options = { services.sysstat = { - enable = mkEnableOption "sar system activity collection"; + enable = mkEnableOption (lib.mdDoc "sar system activity collection"); collect-frequency = mkOption { type = types.str; diff --git a/nixos/modules/services/monitoring/teamviewer.nix b/nixos/modules/services/monitoring/teamviewer.nix index e2271e571c4..f77b194c565 100644 --- a/nixos/modules/services/monitoring/teamviewer.nix +++ b/nixos/modules/services/monitoring/teamviewer.nix @@ -14,7 +14,7 @@ in options = { - services.teamviewer.enable = mkEnableOption "TeamViewer daemon"; + services.teamviewer.enable = mkEnableOption (lib.mdDoc "TeamViewer daemon"); }; diff --git a/nixos/modules/services/monitoring/telegraf.nix b/nixos/modules/services/monitoring/telegraf.nix index d228b5cc2d0..913e599c189 100644 --- a/nixos/modules/services/monitoring/telegraf.nix +++ b/nixos/modules/services/monitoring/telegraf.nix @@ -11,7 +11,7 @@ in { ###### interface options = { services.telegraf = { - enable = mkEnableOption "telegraf server"; + enable = mkEnableOption (lib.mdDoc "telegraf server"); package = mkOption { default = pkgs.telegraf; diff --git a/nixos/modules/services/monitoring/thanos.nix b/nixos/modules/services/monitoring/thanos.nix index a805656214b..41462da4ff4 100644 --- a/nixos/modules/services/monitoring/thanos.nix +++ b/nixos/modules/services/monitoring/thanos.nix @@ -667,46 +667,46 @@ in { sidecar = paramsToOptions params.sidecar // { enable = mkEnableOption - "the Thanos sidecar for Prometheus server"; + (lib.mdDoc "the Thanos sidecar for Prometheus server"); arguments = mkArgumentsOption "sidecar"; }; store = paramsToOptions params.store // { enable = mkEnableOption - "the Thanos store node giving access to blocks in a bucket provider."; + (lib.mdDoc "the Thanos store node giving access to blocks in a bucket provider."); arguments = mkArgumentsOption "store"; }; query = paramsToOptions params.query // { enable = mkEnableOption - ("the Thanos query node exposing PromQL enabled Query API " + - "with data retrieved from multiple store nodes"); + (lib.mdDoc ("the Thanos query node exposing PromQL enabled Query API " + + "with data retrieved from multiple store nodes")); arguments = mkArgumentsOption "query"; }; rule = paramsToOptions params.rule // { enable = mkEnableOption - ("the Thanos ruler service which evaluates Prometheus rules against" + - " given Query nodes, exposing Store API and storing old blocks in bucket"); + (lib.mdDoc ("the Thanos ruler service which evaluates Prometheus rules against" + + " given Query nodes, exposing Store API and storing old blocks in bucket")); arguments = mkArgumentsOption "rule"; }; compact = paramsToOptions params.compact // { enable = mkEnableOption - "the Thanos compactor which continuously compacts blocks in an object store bucket"; + (lib.mdDoc "the Thanos compactor which continuously compacts blocks in an object store bucket"); arguments = mkArgumentsOption "compact"; }; downsample = paramsToOptions params.downsample // { enable = mkEnableOption - "the Thanos downsampler which continuously downsamples blocks in an object store bucket"; + (lib.mdDoc "the Thanos downsampler which continuously downsamples blocks in an object store bucket"); arguments = mkArgumentsOption "downsample"; }; receive = paramsToOptions params.receive // { enable = mkEnableOption - ("the Thanos receiver which accept Prometheus remote write API requests " + - "and write to local tsdb (EXPERIMENTAL, this may change drastically without notice)"); + (lib.mdDoc ("the Thanos receiver which accept Prometheus remote write API requests " + + "and write to local tsdb (EXPERIMENTAL, this may change drastically without notice)")); arguments = mkArgumentsOption "receive"; }; }; diff --git a/nixos/modules/services/monitoring/tuptime.nix b/nixos/modules/services/monitoring/tuptime.nix index 770fbee2a84..d97e408bce3 100644 --- a/nixos/modules/services/monitoring/tuptime.nix +++ b/nixos/modules/services/monitoring/tuptime.nix @@ -10,7 +10,7 @@ in { options.services.tuptime = { - enable = mkEnableOption "the total uptime service"; + enable = mkEnableOption (lib.mdDoc "the total uptime service"); timer = { enable = mkOption { diff --git a/nixos/modules/services/monitoring/unifi-poller.nix b/nixos/modules/services/monitoring/unifi-poller.nix index a955bf4907f..b30e28a3ecc 100644 --- a/nixos/modules/services/monitoring/unifi-poller.nix +++ b/nixos/modules/services/monitoring/unifi-poller.nix @@ -11,7 +11,7 @@ let in { options.services.unifi-poller = { - enable = mkEnableOption "unifi-poller"; + enable = mkEnableOption (lib.mdDoc "unifi-poller"); poller = { debug = mkOption { diff --git a/nixos/modules/services/monitoring/ups.nix b/nixos/modules/services/monitoring/ups.nix index 8af2c2a1f25..c7abaeb2973 100644 --- a/nixos/modules/services/monitoring/ups.nix +++ b/nixos/modules/services/monitoring/ups.nix @@ -116,7 +116,7 @@ in mode = mkOption { default = "standalone"; type = types.str; - description = '' + description = lib.mdDoc '' The MODE determines which part of the NUT is to be started, and which configuration files must be modified. diff --git a/nixos/modules/services/monitoring/uptime.nix b/nixos/modules/services/monitoring/uptime.nix index 24ca7c3763f..7bf9e593c95 100644 --- a/nixos/modules/services/monitoring/uptime.nix +++ b/nixos/modules/services/monitoring/uptime.nix @@ -51,9 +51,9 @@ in { type = types.bool; }; - enableWebService = mkEnableOption "the uptime monitoring program web service"; + enableWebService = mkEnableOption (lib.mdDoc "the uptime monitoring program web service"); - enableSeparateMonitoringService = mkEnableOption "the uptime monitoring service" // { + enableSeparateMonitoringService = mkEnableOption (lib.mdDoc "the uptime monitoring service") // { default = cfg.enableWebService; defaultText = literalExpression "config.${opt.enableWebService}"; }; diff --git a/nixos/modules/services/monitoring/vnstat.nix b/nixos/modules/services/monitoring/vnstat.nix index 5e19c399568..a498962ae57 100644 --- a/nixos/modules/services/monitoring/vnstat.nix +++ b/nixos/modules/services/monitoring/vnstat.nix @@ -6,7 +6,7 @@ let cfg = config.services.vnstat; in { options.services.vnstat = { - enable = mkEnableOption "update of network usage statistics via vnstatd"; + enable = mkEnableOption (lib.mdDoc "update of network usage statistics via vnstatd"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/monitoring/zabbix-agent.nix b/nixos/modules/services/monitoring/zabbix-agent.nix index f2a8adace69..b497ecbcdb6 100644 --- a/nixos/modules/services/monitoring/zabbix-agent.nix +++ b/nixos/modules/services/monitoring/zabbix-agent.nix @@ -29,7 +29,7 @@ in options = { services.zabbixAgent = { - enable = mkEnableOption "the Zabbix Agent"; + enable = mkEnableOption (lib.mdDoc "the Zabbix Agent"); package = mkOption { type = types.package; @@ -43,8 +43,8 @@ in default = with pkgs; [ nettools ]; defaultText = literalExpression "with pkgs; [ nettools ]"; example = literalExpression "with pkgs; [ nettools mysql ]"; - description = '' - Packages to be added to the Zabbix PATH. + description = lib.mdDoc '' + Packages to be added to the Zabbix {env}`PATH`. Typically used to add executables for scripts, but can be anything. ''; }; diff --git a/nixos/modules/services/monitoring/zabbix-proxy.nix b/nixos/modules/services/monitoring/zabbix-proxy.nix index 9cfe1bdaa20..e7e353f3660 100644 --- a/nixos/modules/services/monitoring/zabbix-proxy.nix +++ b/nixos/modules/services/monitoring/zabbix-proxy.nix @@ -38,7 +38,7 @@ in options = { services.zabbixProxy = { - enable = mkEnableOption "the Zabbix Proxy"; + enable = mkEnableOption (lib.mdDoc "the Zabbix Proxy"); server = mkOption { type = types.str; @@ -61,8 +61,8 @@ in type = types.listOf types.package; default = with pkgs; [ nettools nmap traceroute ]; defaultText = literalExpression "[ nettools nmap traceroute ]"; - description = '' - Packages to be added to the Zabbix PATH. + description = lib.mdDoc '' + Packages to be added to the Zabbix {env}`PATH`. Typically used to add executables for scripts, but can be anything. ''; }; diff --git a/nixos/modules/services/monitoring/zabbix-server.nix b/nixos/modules/services/monitoring/zabbix-server.nix index 566ec4ab2f6..b40437100fc 100644 --- a/nixos/modules/services/monitoring/zabbix-server.nix +++ b/nixos/modules/services/monitoring/zabbix-server.nix @@ -40,7 +40,7 @@ in options = { services.zabbixServer = { - enable = mkEnableOption "the Zabbix Server"; + enable = mkEnableOption (lib.mdDoc "the Zabbix Server"); package = mkOption { type = types.package; @@ -53,8 +53,8 @@ in type = types.listOf types.package; default = with pkgs; [ nettools nmap traceroute ]; defaultText = literalExpression "[ nettools nmap traceroute ]"; - description = '' - Packages to be added to the Zabbix PATH. + description = lib.mdDoc '' + Packages to be added to the Zabbix {env}`PATH`. Typically used to add executables for scripts, but can be anything. ''; }; diff --git a/nixos/modules/services/network-filesystems/ceph.nix b/nixos/modules/services/network-filesystems/ceph.nix index 2437aba86e4..22d58f29cb8 100644 --- a/nixos/modules/services/network-filesystems/ceph.nix +++ b/nixos/modules/services/network-filesystems/ceph.nix @@ -72,7 +72,7 @@ in options.services.ceph = { # Ceph has a monolithic configuration file but different sections for # each daemon, a separate client section and a global section - enable = mkEnableOption "Ceph global configuration"; + enable = mkEnableOption (lib.mdDoc "Ceph global configuration"); global = { fsid = mkOption { @@ -201,7 +201,7 @@ in }; mgr = { - enable = mkEnableOption "Ceph MGR daemon"; + enable = mkEnableOption (lib.mdDoc "Ceph MGR daemon"); daemons = mkOption { type = with types; listOf str; default = []; @@ -221,7 +221,7 @@ in }; mon = { - enable = mkEnableOption "Ceph MON daemon"; + enable = mkEnableOption (lib.mdDoc "Ceph MON daemon"); daemons = mkOption { type = with types; listOf str; default = []; @@ -241,7 +241,7 @@ in }; osd = { - enable = mkEnableOption "Ceph OSD daemon"; + enable = mkEnableOption (lib.mdDoc "Ceph OSD daemon"); daemons = mkOption { type = with types; listOf str; default = []; @@ -269,7 +269,7 @@ in }; mds = { - enable = mkEnableOption "Ceph MDS daemon"; + enable = mkEnableOption (lib.mdDoc "Ceph MDS daemon"); daemons = mkOption { type = with types; listOf str; default = []; @@ -289,7 +289,7 @@ in }; rgw = { - enable = mkEnableOption "Ceph RadosGW daemon"; + enable = mkEnableOption (lib.mdDoc "Ceph RadosGW daemon"); daemons = mkOption { type = with types; listOf str; default = []; @@ -304,7 +304,7 @@ in }; client = { - enable = mkEnableOption "Ceph client configuration"; + enable = mkEnableOption (lib.mdDoc "Ceph client configuration"); extraConfig = mkOption { type = with types; attrsOf (attrsOf str); default = {}; diff --git a/nixos/modules/services/network-filesystems/glusterfs.nix b/nixos/modules/services/network-filesystems/glusterfs.nix index 99aa26feb6f..5c3e197b687 100644 --- a/nixos/modules/services/network-filesystems/glusterfs.nix +++ b/nixos/modules/services/network-filesystems/glusterfs.nix @@ -33,7 +33,7 @@ in services.glusterfs = { - enable = mkEnableOption "GlusterFS Daemon"; + enable = mkEnableOption (lib.mdDoc "GlusterFS Daemon"); logLevel = mkOption { type = types.enum ["DEBUG" "INFO" "WARNING" "ERROR" "CRITICAL" "TRACE" "NONE"]; diff --git a/nixos/modules/services/network-filesystems/ipfs.nix b/nixos/modules/services/network-filesystems/ipfs.nix index af4b725bf21..b9cf9ea882f 100644 --- a/nixos/modules/services/network-filesystems/ipfs.nix +++ b/nixos/modules/services/network-filesystems/ipfs.nix @@ -52,7 +52,7 @@ in services.ipfs = { - enable = mkEnableOption "Interplanetary File System (WARNING: may cause severe network degredation)"; + enable = mkEnableOption (lib.mdDoc "Interplanetary File System (WARNING: may cause severe network degredation)"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/network-filesystems/litestream/default.nix b/nixos/modules/services/network-filesystems/litestream/default.nix index 92ae1d0fd3b..884ffa50e7c 100644 --- a/nixos/modules/services/network-filesystems/litestream/default.nix +++ b/nixos/modules/services/network-filesystems/litestream/default.nix @@ -8,7 +8,7 @@ let in { options.services.litestream = { - enable = mkEnableOption "litestream"; + enable = mkEnableOption (lib.mdDoc "litestream"); package = mkOption { description = lib.mdDoc "Package to use."; @@ -40,8 +40,8 @@ in type = types.nullOr types.path; default = null; example = "/run/secrets/litestream"; - description = '' - Environment file as defined in systemd.exec5. + description = lib.mdDoc '' + Environment file as defined in {manpage}`systemd.exec(5)`. Secrets may be passed to the service without adding them to the world-readable Nix store, by specifying placeholder variables as @@ -54,11 +54,11 @@ in variable values. If no value is set then it will be replaced with an empty string. - + ``` # Content of the environment file LITESTREAM_ACCESS_KEY_ID=AKIAxxxxxxxxxxxxxxxx LITESTREAM_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxx - + ``` Note that this file needs to be available on the host on which this exporter is running. diff --git a/nixos/modules/services/network-filesystems/moosefs.nix b/nixos/modules/services/network-filesystems/moosefs.nix index 6ad4b37761a..c9a5a43ebcd 100644 --- a/nixos/modules/services/network-filesystems/moosefs.nix +++ b/nixos/modules/services/network-filesystems/moosefs.nix @@ -85,7 +85,7 @@ in { description = lib.mdDoc "Run daemons as user moosefs instead of root."; }; - client.enable = mkEnableOption "Moosefs client."; + client.enable = mkEnableOption (lib.mdDoc "Moosefs client."); master = { enable = mkOption { @@ -131,7 +131,7 @@ in { }; metalogger = { - enable = mkEnableOption "Moosefs metalogger daemon."; + enable = mkEnableOption (lib.mdDoc "Moosefs metalogger daemon."); settings = mkOption { type = types.submodule { @@ -149,7 +149,7 @@ in { }; chunkserver = { - enable = mkEnableOption "Moosefs chunkserver daemon."; + enable = mkEnableOption (lib.mdDoc "Moosefs chunkserver daemon."); openFirewall = mkOption { type = types.bool; diff --git a/nixos/modules/services/network-filesystems/netatalk.nix b/nixos/modules/services/network-filesystems/netatalk.nix index 838a374ba6c..a40f68557c0 100644 --- a/nixos/modules/services/network-filesystems/netatalk.nix +++ b/nixos/modules/services/network-filesystems/netatalk.nix @@ -10,7 +10,7 @@ in { options = { services.netatalk = { - enable = mkEnableOption "the Netatalk AFP fileserver"; + enable = mkEnableOption (lib.mdDoc "the Netatalk AFP fileserver"); port = mkOption { type = types.port; diff --git a/nixos/modules/services/network-filesystems/orangefs/client.nix b/nixos/modules/services/network-filesystems/orangefs/client.nix index 26cc0e169ae..471e17970ae 100644 --- a/nixos/modules/services/network-filesystems/orangefs/client.nix +++ b/nixos/modules/services/network-filesystems/orangefs/client.nix @@ -10,7 +10,7 @@ in { options = { services.orangefs.client = { - enable = mkEnableOption "OrangeFS client daemon"; + enable = mkEnableOption (lib.mdDoc "OrangeFS client daemon"); extraOptions = mkOption { type = with types; listOf str; diff --git a/nixos/modules/services/network-filesystems/orangefs/server.nix b/nixos/modules/services/network-filesystems/orangefs/server.nix index 3bc3325e186..8e6838c0467 100644 --- a/nixos/modules/services/network-filesystems/orangefs/server.nix +++ b/nixos/modules/services/network-filesystems/orangefs/server.nix @@ -74,7 +74,7 @@ in { options = { services.orangefs.server = { - enable = mkEnableOption "OrangeFS server"; + enable = mkEnableOption (lib.mdDoc "OrangeFS server"); logType = mkOption { type = with types; enum [ "file" "syslog" ]; diff --git a/nixos/modules/services/network-filesystems/rsyncd.nix b/nixos/modules/services/network-filesystems/rsyncd.nix index d65113c84b3..c9d7475395f 100644 --- a/nixos/modules/services/network-filesystems/rsyncd.nix +++ b/nixos/modules/services/network-filesystems/rsyncd.nix @@ -10,7 +10,7 @@ in { options = { services.rsyncd = { - enable = mkEnableOption "the rsync daemon"; + enable = mkEnableOption (lib.mdDoc "the rsync daemon"); port = mkOption { default = 873; diff --git a/nixos/modules/services/network-filesystems/samba-wsdd.nix b/nixos/modules/services/network-filesystems/samba-wsdd.nix index 38980593e76..e28fe4cf9c4 100644 --- a/nixos/modules/services/network-filesystems/samba-wsdd.nix +++ b/nixos/modules/services/network-filesystems/samba-wsdd.nix @@ -8,17 +8,17 @@ let in { options = { services.samba-wsdd = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' Enable Web Services Dynamic Discovery host daemon. This enables (Samba) hosts, like your local NAS device, to be found by Web Service Discovery Clients like Windows. - - If you use the firewall consider adding the following: - + + ::: {.note} + If you use the firewall consider adding the following: + networking.firewall.allowedTCPPorts = [ 5357 ]; networking.firewall.allowedUDPPorts = [ 3702 ]; - - - ''; + ::: + ''); interface = mkOption { type = types.nullOr types.str; default = null; diff --git a/nixos/modules/services/network-filesystems/samba.nix b/nixos/modules/services/network-filesystems/samba.nix index 7a07b043859..1310a374abd 100644 --- a/nixos/modules/services/network-filesystems/samba.nix +++ b/nixos/modules/services/network-filesystems/samba.nix @@ -80,16 +80,15 @@ in enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to enable Samba, which provides file and print services to Windows clients through the SMB/CIFS protocol. - - If you use the firewall consider adding the following: - - services.samba.openFirewall = true; - - + ::: {.note} + If you use the firewall consider adding the following: + + services.samba.openFirewall = true; + ::: ''; }; diff --git a/nixos/modules/services/network-filesystems/tahoe.nix b/nixos/modules/services/network-filesystems/tahoe.nix index a816b5757f7..4213f437f4b 100644 --- a/nixos/modules/services/network-filesystems/tahoe.nix +++ b/nixos/modules/services/network-filesystems/tahoe.nix @@ -128,7 +128,7 @@ in The number of shares required to store a file. ''; }; - storage.enable = mkEnableOption "storage service"; + storage.enable = mkEnableOption (lib.mdDoc "storage service"); storage.reservedSpace = mkOption { default = "1G"; type = types.str; @@ -136,8 +136,8 @@ in The amount of filesystem space to not use for storage. ''; }; - helper.enable = mkEnableOption "helper service"; - sftpd.enable = mkEnableOption "SFTP service"; + helper.enable = mkEnableOption (lib.mdDoc "helper service"); + sftpd.enable = mkEnableOption (lib.mdDoc "SFTP service"); sftpd.port = mkOption { default = null; type = types.nullOr types.int; diff --git a/nixos/modules/services/network-filesystems/webdav-server-rs.nix b/nixos/modules/services/network-filesystems/webdav-server-rs.nix index bd07b8d4381..9ea30411181 100644 --- a/nixos/modules/services/network-filesystems/webdav-server-rs.nix +++ b/nixos/modules/services/network-filesystems/webdav-server-rs.nix @@ -14,7 +14,7 @@ in { options = { services.webdav-server-rs = { - enable = mkEnableOption "WebDAV server"; + enable = mkEnableOption (lib.mdDoc "WebDAV server"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/network-filesystems/webdav.nix b/nixos/modules/services/network-filesystems/webdav.nix index b7c07b8c12c..a384e58c96b 100644 --- a/nixos/modules/services/network-filesystems/webdav.nix +++ b/nixos/modules/services/network-filesystems/webdav.nix @@ -8,7 +8,7 @@ in { options = { services.webdav = { - enable = mkEnableOption "WebDAV server"; + enable = mkEnableOption (lib.mdDoc "WebDAV server"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/network-filesystems/xtreemfs.nix b/nixos/modules/services/network-filesystems/xtreemfs.nix index 09d517740a0..926c3c3bd52 100644 --- a/nixos/modules/services/network-filesystems/xtreemfs.nix +++ b/nixos/modules/services/network-filesystems/xtreemfs.nix @@ -89,7 +89,7 @@ in services.xtreemfs = { - enable = mkEnableOption "XtreemFS"; + enable = mkEnableOption (lib.mdDoc "XtreemFS"); homeDir = mkOption { type = types.path; @@ -180,7 +180,7 @@ in ''; }; replication = { - enable = mkEnableOption "XtreemFS DIR replication plugin"; + enable = mkEnableOption (lib.mdDoc "XtreemFS DIR replication plugin"); extraConfig = mkOption { type = types.lines; example = '' @@ -323,7 +323,7 @@ in ''; }; replication = { - enable = mkEnableOption "XtreemFS MRC replication plugin"; + enable = mkEnableOption (lib.mdDoc "XtreemFS MRC replication plugin"); extraConfig = mkOption { type = types.lines; example = '' diff --git a/nixos/modules/services/networking/3proxy.nix b/nixos/modules/services/networking/3proxy.nix index 9fc1dac7c28..e643ed94131 100644 --- a/nixos/modules/services/networking/3proxy.nix +++ b/nixos/modules/services/networking/3proxy.nix @@ -6,7 +6,7 @@ let optionalList = list: if list == [ ] then "*" else concatMapStringsSep "," toString list; in { options.services._3proxy = { - enable = mkEnableOption "3proxy"; + enable = mkEnableOption (lib.mdDoc "3proxy"); confFile = mkOption { type = types.path; example = "/var/lib/3proxy/3proxy.conf"; @@ -18,26 +18,26 @@ in { type = types.nullOr types.path; default = null; example = "/var/lib/3proxy/3proxy.passwd"; - description = '' + description = lib.mdDoc '' Load users and passwords from this file. Example users file with plain-text passwords: - + ``` test1:CL:password1 test2:CL:password2 - + ``` Example users file with md5-crypted passwords: - + ``` test1:CR:$1$tFkisVd2$1GA8JXkRmTXdLDytM/i3a1 test2:CR:$1$rkpibm5J$Aq1.9VtYAn0JrqZ8M.1ME. - + ``` You can generate md5-crypted passwords via https://unix4lyfe.org/crypt/ Note that htpasswd tool generates incompatible md5-crypted passwords. - Consult documentation for more information. + Consult [documentation](https://github.com/z3APA3A/3proxy/wiki/How-To-%28incomplete%29#USERS) for more information. ''; }; services = mkOption { @@ -55,35 +55,17 @@ in { "udppm" ]; example = "proxy"; - description = '' + description = lib.mdDoc '' Service type. The following values are valid: - - - "proxy": HTTP/HTTPS proxy (default port 3128). - - - "socks": SOCKS 4/4.5/5 proxy (default port 1080). - - - "pop3p": POP3 proxy (default port 110). - - - "ftppr": FTP proxy (default port 21). - - - "admin": Web interface (default port 80). - - - "dnspr": Caching DNS proxy (default port 53). - - - "tcppm": TCP portmapper. - - - "udppm": UDP portmapper. - - + - `"proxy"`: HTTP/HTTPS proxy (default port 3128). + - `"socks"`: SOCKS 4/4.5/5 proxy (default port 1080). + - `"pop3p"`: POP3 proxy (default port 110). + - `"ftppr"`: FTP proxy (default port 21). + - `"admin"`: Web interface (default port 80). + - `"dnspr"`: Caching DNS proxy (default port 53). + - `"tcppm"`: TCP portmapper. + - `"udppm"`: UDP portmapper. ''; }; bindAddress = mkOption { @@ -113,24 +95,16 @@ in { auth = mkOption { type = types.listOf (types.enum [ "none" "iponly" "strong" ]); example = [ "iponly" "strong" ]; - description = '' + description = lib.mdDoc '' Authentication type. The following values are valid: - - - "none": disables both authentication and authorization. You can not use ACLs. - - - "iponly": specifies no authentication. ACLs authorization is used. - - - "strong": authentication by username/password. If user is not registered their access is denied regardless of ACLs. - - + - `"none"`: disables both authentication and authorization. You can not use ACLs. + - `"iponly"`: specifies no authentication. ACLs authorization is used. + - `"strong"`: authentication by username/password. If user is not registered their access is denied regardless of ACLs. Double authentication is possible, e.g. - + ``` { auth = [ "iponly" "strong" ]; acl = [ @@ -144,7 +118,7 @@ in { } ]; } - + ``` In this example strong username authentication is not required to access 192.168.0.0/16. ''; }; @@ -154,17 +128,11 @@ in { rule = mkOption { type = types.enum [ "allow" "deny" ]; example = "allow"; - description = '' + description = lib.mdDoc '' ACL rule. The following values are valid: - - - "allow": connections allowed. - - - "deny": connections not allowed. - - + - `"allow"`: connections allowed. + - `"deny"`: connections not allowed. ''; }; users = mkOption { @@ -187,10 +155,10 @@ in { type = types.listOf types.str; default = [ ]; example = [ "127.0.0.1" "192.168.1.0/24" ]; - description = '' + description = lib.mdDoc '' List of target IP ranges, use empty list for any. May also contain host names instead of addresses. - It's possible to use wildmask in the begginning and in the the end of hostname, e.g. *badsite.com or *badcontent*. + It's possible to use wildmask in the begginning and in the the end of hostname, e.g. `*badsite.com` or `*badcontent*`. Hostname is only checked if hostname presents in request. ''; }; diff --git a/nixos/modules/services/networking/adguardhome.nix b/nixos/modules/services/networking/adguardhome.nix index 13ef78c10c5..13b6f6efcd6 100644 --- a/nixos/modules/services/networking/adguardhome.nix +++ b/nixos/modules/services/networking/adguardhome.nix @@ -25,7 +25,7 @@ let in { options.services.adguardhome = with types; { - enable = mkEnableOption "AdGuard Home network-wide ad blocker"; + enable = mkEnableOption (lib.mdDoc "AdGuard Home network-wide ad blocker"); host = mkOption { default = "0.0.0.0"; @@ -64,16 +64,16 @@ in { settings = mkOption { type = (pkgs.formats.yaml { }).type; default = { }; - description = '' + description = lib.mdDoc '' AdGuard Home configuration. Refer to - + for details on supported values. - - On start and if is true, - these options are merged into the configuration file on start, taking - precedence over configuration changes made on the web interface. - + ::: {.note} + On start and if {option}`mutableSettings` is `true`, + these options are merged into the configuration file on start, taking + precedence over configuration changes made on the web interface. + ::: ''; }; diff --git a/nixos/modules/services/networking/antennas.nix b/nixos/modules/services/networking/antennas.nix index e3bde2b67d2..c0e56890864 100644 --- a/nixos/modules/services/networking/antennas.nix +++ b/nixos/modules/services/networking/antennas.nix @@ -8,7 +8,7 @@ in { options = { services.antennas = { - enable = mkEnableOption "Antennas"; + enable = mkEnableOption (lib.mdDoc "Antennas"); tvheadendUrl = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/babeld.nix b/nixos/modules/services/networking/babeld.nix index b393b6e0592..ff1ac6998ee 100644 --- a/nixos/modules/services/networking/babeld.nix +++ b/nixos/modules/services/networking/babeld.nix @@ -40,7 +40,7 @@ in services.babeld = { - enable = mkEnableOption "the babeld network routing daemon"; + enable = mkEnableOption (lib.mdDoc "the babeld network routing daemon"); interfaceDefaults = mkOption { default = null; diff --git a/nixos/modules/services/networking/bee-clef.nix b/nixos/modules/services/networking/bee-clef.nix index 852e1396b91..75e76f019a7 100644 --- a/nixos/modules/services/networking/bee-clef.nix +++ b/nixos/modules/services/networking/bee-clef.nix @@ -14,7 +14,7 @@ in { options = { services.bee-clef = { - enable = mkEnableOption "clef external signer instance for Ethereum Swarm Bee"; + enable = mkEnableOption (lib.mdDoc "clef external signer instance for Ethereum Swarm Bee"); dataDir = mkOption { type = types.nullOr types.str; diff --git a/nixos/modules/services/networking/bee.nix b/nixos/modules/services/networking/bee.nix index a99513cb8cc..add9861ebfc 100644 --- a/nixos/modules/services/networking/bee.nix +++ b/nixos/modules/services/networking/bee.nix @@ -15,7 +15,7 @@ in { options = { services.bee = { - enable = mkEnableOption "Ethereum Swarm Bee"; + enable = mkEnableOption (lib.mdDoc "Ethereum Swarm Bee"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/networking/biboumi.nix b/nixos/modules/services/networking/biboumi.nix index 24e0c0328fe..896a2350e3d 100644 --- a/nixos/modules/services/networking/biboumi.nix +++ b/nixos/modules/services/networking/biboumi.nix @@ -16,7 +16,7 @@ in { options = { services.biboumi = { - enable = mkEnableOption "the Biboumi XMPP gateway to IRC"; + enable = mkEnableOption (lib.mdDoc "the Biboumi XMPP gateway to IRC"); settings = mkOption { description = lib.mdDoc '' @@ -166,7 +166,7 @@ in example = "/run/keys/biboumi.cfg"; }; - openFirewall = mkEnableOption "opening of the identd port in the firewall"; + openFirewall = mkEnableOption (lib.mdDoc "opening of the identd port in the firewall"); }; }; diff --git a/nixos/modules/services/networking/bind.nix b/nixos/modules/services/networking/bind.nix index 630d1b20733..f963e341546 100644 --- a/nixos/modules/services/networking/bind.nix +++ b/nixos/modules/services/networking/bind.nix @@ -104,7 +104,7 @@ in services.bind = { - enable = mkEnableOption "BIND domain name server"; + enable = mkEnableOption (lib.mdDoc "BIND domain name server"); package = mkOption { diff --git a/nixos/modules/services/networking/bird-lg.nix b/nixos/modules/services/networking/bird-lg.nix index 1440deb62b4..11cfe3e7ec0 100644 --- a/nixos/modules/services/networking/bird-lg.nix +++ b/nixos/modules/services/networking/bird-lg.nix @@ -28,7 +28,7 @@ in }; frontend = { - enable = mkEnableOption "Bird Looking Glass Frontend Webserver"; + enable = mkEnableOption (lib.mdDoc "Bird Looking Glass Frontend Webserver"); listenAddress = mkOption { type = types.str; @@ -143,7 +143,7 @@ in }; proxy = { - enable = mkEnableOption "Bird Looking Glass Proxy"; + enable = mkEnableOption (lib.mdDoc "Bird Looking Glass Proxy"); listenAddress = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/bird.nix b/nixos/modules/services/networking/bird.nix index 7708aaa476f..77e0b3f8af9 100644 --- a/nixos/modules/services/networking/bird.nix +++ b/nixos/modules/services/networking/bird.nix @@ -10,7 +10,7 @@ in ###### interface options = { services.bird2 = { - enable = mkEnableOption "BIRD Internet Routing Daemon"; + enable = mkEnableOption (lib.mdDoc "BIRD Internet Routing Daemon"); config = mkOption { type = types.lines; description = lib.mdDoc '' diff --git a/nixos/modules/services/networking/bitcoind.nix b/nixos/modules/services/networking/bitcoind.nix index 1788d5fcf58..e8b0fb65ffc 100644 --- a/nixos/modules/services/networking/bitcoind.nix +++ b/nixos/modules/services/networking/bitcoind.nix @@ -18,12 +18,12 @@ let passwordHMAC = mkOption { type = types.uniq (types.strMatching "[0-9a-f]+\\$[0-9a-f]{64}"); example = "f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae"; - description = '' + description = lib.mdDoc '' Password HMAC-SHA-256 for JSON-RPC connections. Must be a string of the - format <SALT-HEX>$<HMAC-HEX>. + format \$\. Tool (Python script) for HMAC generation is available here: - + ''; }; }; @@ -35,7 +35,7 @@ let bitcoindOpts = { config, lib, name, ...}: { options = { - enable = mkEnableOption "Bitcoin daemon"; + enable = mkEnableOption (lib.mdDoc "Bitcoin daemon"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/networking/bitlbee.nix b/nixos/modules/services/networking/bitlbee.nix index e2844feda02..668ed388ae2 100644 --- a/nixos/modules/services/networking/bitlbee.nix +++ b/nixos/modules/services/networking/bitlbee.nix @@ -59,9 +59,9 @@ in interface = mkOption { type = types.str; default = "127.0.0.1"; - description = '' - The interface the BitlBee deamon will be listening to. If `127.0.0.1', - only clients on the local host can connect to it; if `0.0.0.0', clients + description = lib.mdDoc '' + The interface the BitlBee deamon will be listening to. If `127.0.0.1`, + only clients on the local host can connect to it; if `0.0.0.0`, clients can access it from any network interface. ''; }; diff --git a/nixos/modules/services/networking/blockbook-frontend.nix b/nixos/modules/services/networking/blockbook-frontend.nix index 0164883c747..ab784563e4a 100644 --- a/nixos/modules/services/networking/blockbook-frontend.nix +++ b/nixos/modules/services/networking/blockbook-frontend.nix @@ -10,7 +10,7 @@ let options = { - enable = mkEnableOption "blockbook-frontend application."; + enable = mkEnableOption (lib.mdDoc "blockbook-frontend application."); package = mkOption { type = types.package; diff --git a/nixos/modules/services/networking/blocky.nix b/nixos/modules/services/networking/blocky.nix index 42eab145966..2acbcea2aa4 100644 --- a/nixos/modules/services/networking/blocky.nix +++ b/nixos/modules/services/networking/blocky.nix @@ -10,7 +10,7 @@ let in { options.services.blocky = { - enable = mkEnableOption "Fast and lightweight DNS proxy as ad-blocker for local network with many features"; + enable = mkEnableOption (lib.mdDoc "Fast and lightweight DNS proxy as ad-blocker for local network with many features"); settings = mkOption { type = format.type; diff --git a/nixos/modules/services/networking/charybdis.nix b/nixos/modules/services/networking/charybdis.nix index c875557a1a3..168da243dba 100644 --- a/nixos/modules/services/networking/charybdis.nix +++ b/nixos/modules/services/networking/charybdis.nix @@ -18,7 +18,7 @@ in services.charybdis = { - enable = mkEnableOption "Charybdis IRC daemon"; + enable = mkEnableOption (lib.mdDoc "Charybdis IRC daemon"); config = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/cloudflare-dyndns.nix b/nixos/modules/services/networking/cloudflare-dyndns.nix index 92d7f97b0bc..627fdb880a6 100644 --- a/nixos/modules/services/networking/cloudflare-dyndns.nix +++ b/nixos/modules/services/networking/cloudflare-dyndns.nix @@ -8,7 +8,7 @@ in { options = { services.cloudflare-dyndns = { - enable = mkEnableOption "Cloudflare Dynamic DNS Client"; + enable = mkEnableOption (lib.mdDoc "Cloudflare Dynamic DNS Client"); apiTokenFile = mkOption { type = types.nullOr types.str; diff --git a/nixos/modules/services/networking/cntlm.nix b/nixos/modules/services/networking/cntlm.nix index 2b5d0583c65..41510a8f074 100644 --- a/nixos/modules/services/networking/cntlm.nix +++ b/nixos/modules/services/networking/cntlm.nix @@ -33,7 +33,7 @@ in options.services.cntlm = { - enable = mkEnableOption "cntlm, which starts a local proxy"; + enable = mkEnableOption (lib.mdDoc "cntlm, which starts a local proxy"); username = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/consul.nix b/nixos/modules/services/networking/consul.nix index 16f1b5eec87..9f3c081e735 100644 --- a/nixos/modules/services/networking/consul.nix +++ b/nixos/modules/services/networking/consul.nix @@ -126,7 +126,7 @@ in }; alerts = { - enable = mkEnableOption "consul-alerts"; + enable = mkEnableOption (lib.mdDoc "consul-alerts"); package = mkOption { description = lib.mdDoc "Package to use for consul-alerts."; diff --git a/nixos/modules/services/networking/coredns.nix b/nixos/modules/services/networking/coredns.nix index deaba69e99f..f928cdf9614 100644 --- a/nixos/modules/services/networking/coredns.nix +++ b/nixos/modules/services/networking/coredns.nix @@ -7,7 +7,7 @@ let configFile = pkgs.writeText "Corefile" cfg.config; in { options.services.coredns = { - enable = mkEnableOption "Coredns dns server"; + enable = mkEnableOption (lib.mdDoc "Coredns dns server"); config = mkOption { default = ""; diff --git a/nixos/modules/services/networking/corerad.nix b/nixos/modules/services/networking/corerad.nix index 88428eba558..0c6fb7a17ca 100644 --- a/nixos/modules/services/networking/corerad.nix +++ b/nixos/modules/services/networking/corerad.nix @@ -10,7 +10,7 @@ in { meta.maintainers = with maintainers; [ mdlayher ]; options.services.corerad = { - enable = mkEnableOption "CoreRAD IPv6 NDP RA daemon"; + enable = mkEnableOption (lib.mdDoc "CoreRAD IPv6 NDP RA daemon"); settings = mkOption { type = settingsFormat.type; diff --git a/nixos/modules/services/networking/coturn.nix b/nixos/modules/services/networking/coturn.nix index 788c51aed6b..4d83d2d48e3 100644 --- a/nixos/modules/services/networking/coturn.nix +++ b/nixos/modules/services/networking/coturn.nix @@ -40,7 +40,7 @@ ${cfg.extraConfig} in { options = { services.coturn = { - enable = mkEnableOption "coturn TURN server"; + enable = mkEnableOption (lib.mdDoc "coturn TURN server"); listening-port = mkOption { type = types.int; default = 3478; diff --git a/nixos/modules/services/networking/create_ap.nix b/nixos/modules/services/networking/create_ap.nix index 2fcf9b8a541..e772cf21ec5 100644 --- a/nixos/modules/services/networking/create_ap.nix +++ b/nixos/modules/services/networking/create_ap.nix @@ -8,7 +8,7 @@ let in { options = { services.create_ap = { - enable = mkEnableOption "setup wifi hotspots using create_ap"; + enable = mkEnableOption (lib.mdDoc "setup wifi hotspots using create_ap"); settings = mkOption { type = with types; attrsOf (oneOf [ int bool str ]); default = {}; diff --git a/nixos/modules/services/networking/croc.nix b/nixos/modules/services/networking/croc.nix index 82035856733..d3902611a62 100644 --- a/nixos/modules/services/networking/croc.nix +++ b/nixos/modules/services/networking/croc.nix @@ -6,7 +6,7 @@ let in { options.services.croc = { - enable = lib.mkEnableOption "croc relay"; + enable = lib.mkEnableOption (lib.mdDoc "croc relay"); ports = lib.mkOption { type = with types; listOf port; default = [9009 9010 9011 9012 9013]; @@ -17,8 +17,8 @@ in default = "pass123"; description = lib.mdDoc "Password or passwordfile for the relay."; }; - openFirewall = lib.mkEnableOption "opening of the peer port(s) in the firewall"; - debug = lib.mkEnableOption "debug logs"; + openFirewall = lib.mkEnableOption (lib.mdDoc "opening of the peer port(s) in the firewall"); + debug = lib.mkEnableOption (lib.mdDoc "debug logs"); }; config = lib.mkIf cfg.enable { diff --git a/nixos/modules/services/networking/dante.nix b/nixos/modules/services/networking/dante.nix index 5ddbee88609..605f2d74f82 100644 --- a/nixos/modules/services/networking/dante.nix +++ b/nixos/modules/services/networking/dante.nix @@ -19,7 +19,7 @@ in options = { services.dante = { - enable = mkEnableOption "Dante SOCKS proxy"; + enable = mkEnableOption (lib.mdDoc "Dante SOCKS proxy"); config = mkOption { type = types.lines; diff --git a/nixos/modules/services/networking/dnscrypt-proxy2.nix b/nixos/modules/services/networking/dnscrypt-proxy2.nix index 60e9a91bc17..99ff5ee0bd8 100644 --- a/nixos/modules/services/networking/dnscrypt-proxy2.nix +++ b/nixos/modules/services/networking/dnscrypt-proxy2.nix @@ -6,7 +6,7 @@ in { options.services.dnscrypt-proxy2 = { - enable = mkEnableOption "dnscrypt-proxy2"; + enable = mkEnableOption (lib.mdDoc "dnscrypt-proxy2"); settings = mkOption { description = lib.mdDoc '' diff --git a/nixos/modules/services/networking/dnscrypt-wrapper.nix b/nixos/modules/services/networking/dnscrypt-wrapper.nix index 5df1e8b51a5..06b7ea24e2d 100644 --- a/nixos/modules/services/networking/dnscrypt-wrapper.nix +++ b/nixos/modules/services/networking/dnscrypt-wrapper.nix @@ -124,7 +124,7 @@ in { ###### interface options.services.dnscrypt-wrapper = { - enable = mkEnableOption "DNSCrypt wrapper"; + enable = mkEnableOption (lib.mdDoc "DNSCrypt wrapper"); address = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/dnsdist.nix b/nixos/modules/services/networking/dnsdist.nix index 44503248cf8..483300111df 100644 --- a/nixos/modules/services/networking/dnsdist.nix +++ b/nixos/modules/services/networking/dnsdist.nix @@ -11,7 +11,7 @@ let in { options = { services.dnsdist = { - enable = mkEnableOption "dnsdist domain name server"; + enable = mkEnableOption (lib.mdDoc "dnsdist domain name server"); listenAddress = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/doh-proxy-rust.nix b/nixos/modules/services/networking/doh-proxy-rust.nix index bfd88430d78..7f8bbb8a769 100644 --- a/nixos/modules/services/networking/doh-proxy-rust.nix +++ b/nixos/modules/services/networking/doh-proxy-rust.nix @@ -10,7 +10,7 @@ in { options.services.doh-proxy-rust = { - enable = mkEnableOption "doh-proxy-rust"; + enable = mkEnableOption (lib.mdDoc "doh-proxy-rust"); flags = mkOption { type = types.listOf types.str; diff --git a/nixos/modules/services/networking/envoy.nix b/nixos/modules/services/networking/envoy.nix index 6f3080d19e2..20cfebb7991 100644 --- a/nixos/modules/services/networking/envoy.nix +++ b/nixos/modules/services/networking/envoy.nix @@ -16,7 +16,7 @@ in { options.services.envoy = { - enable = mkEnableOption "Envoy reverse proxy"; + enable = mkEnableOption (lib.mdDoc "Envoy reverse proxy"); settings = mkOption { type = format.type; diff --git a/nixos/modules/services/networking/ergo.nix b/nixos/modules/services/networking/ergo.nix index 0dbb862b8ec..033d4d9caf8 100644 --- a/nixos/modules/services/networking/ergo.nix +++ b/nixos/modules/services/networking/ergo.nix @@ -33,7 +33,7 @@ in { options = { services.ergo = { - enable = mkEnableOption "Ergo service"; + enable = mkEnableOption (lib.mdDoc "Ergo service"); dataDir = mkOption { type = types.path; diff --git a/nixos/modules/services/networking/ergochat.nix b/nixos/modules/services/networking/ergochat.nix index 5e815a9eff2..1a70b1f8613 100644 --- a/nixos/modules/services/networking/ergochat.nix +++ b/nixos/modules/services/networking/ergochat.nix @@ -4,7 +4,7 @@ in { options = { services.ergochat = { - enable = lib.mkEnableOption "Ergo IRC daemon"; + enable = lib.mkEnableOption (lib.mdDoc "Ergo IRC daemon"); openFilesLimit = lib.mkOption { type = lib.types.int; diff --git a/nixos/modules/services/networking/eternal-terminal.nix b/nixos/modules/services/networking/eternal-terminal.nix index e90b6103a21..555307459e3 100644 --- a/nixos/modules/services/networking/eternal-terminal.nix +++ b/nixos/modules/services/networking/eternal-terminal.nix @@ -16,7 +16,7 @@ in services.eternal-terminal = { - enable = mkEnableOption "Eternal Terminal server"; + enable = mkEnableOption (lib.mdDoc "Eternal Terminal server"); port = mkOption { default = 2022; diff --git a/nixos/modules/services/networking/firefox-syncserver.nix b/nixos/modules/services/networking/firefox-syncserver.nix index 2944124b104..fa8e4fcaed2 100644 --- a/nixos/modules/services/networking/firefox-syncserver.nix +++ b/nixos/modules/services/networking/firefox-syncserver.nix @@ -34,22 +34,22 @@ in { options = { services.firefox-syncserver = { - enable = lib.mkEnableOption '' + enable = lib.mkEnableOption (lib.mdDoc '' the Firefox Sync storage service. Out of the box this will not be very useful unless you also configure at least one service and one nodes by inserting them into the mysql database manually, e.g. by running - + ``` INSERT INTO `services` (`id`, `service`, `pattern`) VALUES ('1', 'sync-1.5', '{node}/1.5/{uid}'); INSERT INTO `nodes` (`id`, `service`, `node`, `available`, `current_load`, `capacity`, `downed`, `backoff`) VALUES ('1', '1', 'https://mydomain.tld', '1', '0', '10', '0', '0'); - + ``` - does this automatically when enabled - ''; + {option}`${opt.singleNode.enable}` does this automatically when enabled + ''); package = lib.mkOption { type = lib.types.package; @@ -118,11 +118,11 @@ in }; singleNode = { - enable = lib.mkEnableOption "auto-configuration for a simple single-node setup"; + enable = lib.mkEnableOption (lib.mdDoc "auto-configuration for a simple single-node setup"); - enableTLS = lib.mkEnableOption "automatic TLS setup"; + enableTLS = lib.mkEnableOption (lib.mdDoc "automatic TLS setup"); - enableNginx = lib.mkEnableOption "nginx virtualhost definitions"; + enableNginx = lib.mkEnableOption (lib.mdDoc "nginx virtualhost definitions"); hostname = lib.mkOption { type = lib.types.str; diff --git a/nixos/modules/services/networking/flannel.nix b/nixos/modules/services/networking/flannel.nix index 547b6e03949..c19e51e5aa6 100644 --- a/nixos/modules/services/networking/flannel.nix +++ b/nixos/modules/services/networking/flannel.nix @@ -14,7 +14,7 @@ let }; in { options.services.flannel = { - enable = mkEnableOption "flannel"; + enable = mkEnableOption (lib.mdDoc "flannel"); package = mkOption { description = lib.mdDoc "Package to use for flannel"; @@ -83,7 +83,7 @@ in { }; network = mkOption { - description = " IPv4 network in CIDR format to use for the entire flannel network."; + description = lib.mdDoc " IPv4 network in CIDR format to use for the entire flannel network."; type = types.str; }; diff --git a/nixos/modules/services/networking/freeradius.nix b/nixos/modules/services/networking/freeradius.nix index 6c6777c8a57..419a683cb77 100644 --- a/nixos/modules/services/networking/freeradius.nix +++ b/nixos/modules/services/networking/freeradius.nix @@ -33,7 +33,7 @@ let }; freeradiusConfig = { - enable = mkEnableOption "the freeradius server"; + enable = mkEnableOption (lib.mdDoc "the freeradius server"); configDir = mkOption { type = types.path; diff --git a/nixos/modules/services/networking/frr.nix b/nixos/modules/services/networking/frr.nix index 71b66b71ee4..d350fe3548a 100644 --- a/nixos/modules/services/networking/frr.nix +++ b/nixos/modules/services/networking/frr.nix @@ -51,7 +51,7 @@ let serviceOptions = service: { - enable = mkEnableOption "the FRR ${toUpper service} routing protocol"; + enable = mkEnableOption (lib.mdDoc "the FRR ${toUpper service} routing protocol"); configFile = mkOption { type = types.nullOr types.path; diff --git a/nixos/modules/services/networking/gateone.nix b/nixos/modules/services/networking/gateone.nix index dc4a65f020d..ac3f3c9bbf2 100644 --- a/nixos/modules/services/networking/gateone.nix +++ b/nixos/modules/services/networking/gateone.nix @@ -6,7 +6,7 @@ in { options = { services.gateone = { - enable = mkEnableOption "GateOne server"; + enable = mkEnableOption (lib.mdDoc "GateOne server"); pidDir = mkOption { default = "/run/gateone"; type = types.path; diff --git a/nixos/modules/services/networking/gdomap.nix b/nixos/modules/services/networking/gdomap.nix index 3d829cb6913..53ea8b6875d 100644 --- a/nixos/modules/services/networking/gdomap.nix +++ b/nixos/modules/services/networking/gdomap.nix @@ -8,7 +8,7 @@ with lib; # options = { services.gdomap = { - enable = mkEnableOption "GNUstep Distributed Objects name server"; + enable = mkEnableOption (lib.mdDoc "GNUstep Distributed Objects name server"); }; }; diff --git a/nixos/modules/services/networking/ghostunnel.nix b/nixos/modules/services/networking/ghostunnel.nix index 4b9620cea21..4902367e2a6 100644 --- a/nixos/modules/services/networking/ghostunnel.nix +++ b/nixos/modules/services/networking/ghostunnel.nix @@ -213,7 +213,7 @@ in { options = { - services.ghostunnel.enable = mkEnableOption "ghostunnel"; + services.ghostunnel.enable = mkEnableOption (lib.mdDoc "ghostunnel"); services.ghostunnel.package = mkOption { description = lib.mdDoc "The ghostunnel package to use."; diff --git a/nixos/modules/services/networking/globalprotect-vpn.nix b/nixos/modules/services/networking/globalprotect-vpn.nix index bb60916244f..36aa9378040 100644 --- a/nixos/modules/services/networking/globalprotect-vpn.nix +++ b/nixos/modules/services/networking/globalprotect-vpn.nix @@ -14,14 +14,12 @@ in { options.services.globalprotect = { - enable = mkEnableOption "globalprotect"; + enable = mkEnableOption (lib.mdDoc "globalprotect"); settings = mkOption { - description = '' + description = lib.mdDoc '' GlobalProtect-openconnect configuration. For more information, visit - . + . ''; default = { }; example = { diff --git a/nixos/modules/services/networking/go-neb.nix b/nixos/modules/services/networking/go-neb.nix index ffa7923d6fb..8c04542c47c 100644 --- a/nixos/modules/services/networking/go-neb.nix +++ b/nixos/modules/services/networking/go-neb.nix @@ -9,7 +9,7 @@ let configFile = settingsFormat.generate "config.yaml" cfg.config; in { options.services.go-neb = { - enable = mkEnableOption "Extensible matrix bot written in Go"; + enable = mkEnableOption (lib.mdDoc "Extensible matrix bot written in Go"); bindAddress = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/go-shadowsocks2.nix b/nixos/modules/services/networking/go-shadowsocks2.nix index e3f99f68d61..d9c4a2421d7 100644 --- a/nixos/modules/services/networking/go-shadowsocks2.nix +++ b/nixos/modules/services/networking/go-shadowsocks2.nix @@ -5,7 +5,7 @@ let cfg = config.services.go-shadowsocks2.server; in { options.services.go-shadowsocks2.server = { - enable = mkEnableOption "go-shadowsocks2 server"; + enable = mkEnableOption (lib.mdDoc "go-shadowsocks2 server"); listenAddress = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/gobgpd.nix b/nixos/modules/services/networking/gobgpd.nix index f1e2095708f..b22242edaad 100644 --- a/nixos/modules/services/networking/gobgpd.nix +++ b/nixos/modules/services/networking/gobgpd.nix @@ -8,7 +8,7 @@ let confFile = format.generate "gobgpd.conf" cfg.settings; in { options.services.gobgpd = { - enable = mkEnableOption "GoBGP Routing Daemon"; + enable = mkEnableOption (lib.mdDoc "GoBGP Routing Daemon"); settings = mkOption { type = format.type; diff --git a/nixos/modules/services/networking/gvpe.nix b/nixos/modules/services/networking/gvpe.nix index 5ecf78d09ef..2279ceee2f5 100644 --- a/nixos/modules/services/networking/gvpe.nix +++ b/nixos/modules/services/networking/gvpe.nix @@ -42,7 +42,7 @@ in { options = { services.gvpe = { - enable = lib.mkEnableOption "gvpe"; + enable = lib.mkEnableOption (lib.mdDoc "gvpe"); nodename = mkOption { default = null; diff --git a/nixos/modules/services/networking/headscale.nix b/nixos/modules/services/networking/headscale.nix index 23d8dac2f98..0334c5a00ba 100644 --- a/nixos/modules/services/networking/headscale.nix +++ b/nixos/modules/services/networking/headscale.nix @@ -12,7 +12,7 @@ in { options = { services.headscale = { - enable = mkEnableOption "headscale, Open Source coordination server for Tailscale"; + enable = mkEnableOption (lib.mdDoc "headscale, Open Source coordination server for Tailscale"); package = mkOption { type = types.package; @@ -26,26 +26,28 @@ in user = mkOption { default = "headscale"; type = types.str; - description = '' + description = lib.mdDoc '' User account under which headscale runs. - + + ::: {.note} If left as the default value this user will automatically be created on system activation, otherwise you are responsible for ensuring the user exists before the headscale service starts. - + ::: ''; }; group = mkOption { default = "headscale"; type = types.str; - description = '' + description = lib.mdDoc '' Group under which headscale runs. - + + ::: {.note} If left as the default value this group will automatically be created on system activation, otherwise you are responsible for ensuring the user exists before the headscale service starts. - + ::: ''; }; diff --git a/nixos/modules/services/networking/https-dns-proxy.nix b/nixos/modules/services/networking/https-dns-proxy.nix index 18b07a5ca3e..87eb23ea458 100644 --- a/nixos/modules/services/networking/https-dns-proxy.nix +++ b/nixos/modules/services/networking/https-dns-proxy.nix @@ -46,7 +46,7 @@ in ###### interface options.services.https-dns-proxy = { - enable = mkEnableOption "https-dns-proxy daemon"; + enable = mkEnableOption (lib.mdDoc "https-dns-proxy daemon"); address = mkOption { description = lib.mdDoc "The address on which to listen"; diff --git a/nixos/modules/services/networking/hylafax/options.nix b/nixos/modules/services/networking/hylafax/options.nix index 79275d628b6..82c144236f3 100644 --- a/nixos/modules/services/networking/hylafax/options.nix +++ b/nixos/modules/services/networking/hylafax/options.nix @@ -118,7 +118,7 @@ in options.services.hylafax = { - enable = mkEnableOption "HylaFAX server"; + enable = mkEnableOption (lib.mdDoc "HylaFAX server"); autostart = mkOption { type = bool; @@ -172,23 +172,23 @@ in userAccessFile = mkOption { type = path; default = "/etc/hosts.hfaxd"; - description = '' - The hosts.hfaxd + description = lib.mdDoc '' + The {file}`hosts.hfaxd` file entry in the spooling area will be symlinked to the location given here. This file must exist and be - readable only by the uucp user. + readable only by the `uucp` user. See hosts.hfaxd(5) for details. This configuration permits access for all users: - + ``` environment.etc."hosts.hfaxd" = { mode = "0600"; user = "uucp"; text = ".*"; }; - + ``` Note that host-based access can be controlled with - ; + {option}`config.systemd.sockets.hylafax-hfaxd.listenStreams`; by default, only 127.0.0.1 is permitted to connect. ''; }; @@ -271,11 +271,11 @@ in ''; }; - faxcron.enable.spoolInit = mkEnableOption '' + faxcron.enable.spoolInit = mkEnableOption (lib.mdDoc '' Purge old files from the spooling area with - faxcron + {file}`faxcron` each time the spooling area is initialized. - ''; + ''); faxcron.enable.frequency = mkOption { type = nullOr nonEmptyStr; default = null; @@ -311,11 +311,11 @@ in ''; }; - faxqclean.enable.spoolInit = mkEnableOption '' + faxqclean.enable.spoolInit = mkEnableOption (lib.mdDoc '' Purge old files from the spooling area with - faxqclean + {file}`faxqclean` each time the spooling area is initialized. - ''; + ''); faxqclean.enable.frequency = mkOption { type = nullOr nonEmptyStr; default = null; diff --git a/nixos/modules/services/networking/i2p.nix b/nixos/modules/services/networking/i2p.nix index 3b6010531f1..c5c7a955cbd 100644 --- a/nixos/modules/services/networking/i2p.nix +++ b/nixos/modules/services/networking/i2p.nix @@ -7,7 +7,7 @@ let homeDir = "/var/lib/i2p"; in { ###### interface - options.services.i2p.enable = mkEnableOption "I2P router"; + options.services.i2p.enable = mkEnableOption (lib.mdDoc "I2P router"); ###### implementation config = mkIf cfg.enable { diff --git a/nixos/modules/services/networking/i2pd.nix b/nixos/modules/services/networking/i2pd.nix index fb83778fcf7..47f4a42aa5d 100644 --- a/nixos/modules/services/networking/i2pd.nix +++ b/nixos/modules/services/networking/i2pd.nix @@ -17,10 +17,10 @@ let optionalNullInt = o: i: optional (i != null) (intOpt o i); optionalEmptyList = o: l: optional ([] != l) (lstOpt o l); - mkEnableTrueOption = name: mkEnableOption name // { default = true; }; + mkEnableTrueOption = name: mkEnableOption (lib.mdDoc name) // { default = true; }; mkEndpointOpt = name: addr: port: { - enable = mkEnableOption name; + enable = mkEnableOption (lib.mdDoc name); name = mkOption { type = types.str; default = name; @@ -247,8 +247,8 @@ in services.i2pd = { - enable = mkEnableOption "I2Pd daemon" // { - description = '' + enable = mkEnableOption (lib.mdDoc "I2Pd daemon") // { + description = lib.mdDoc '' Enables I2Pd as a running service upon activation. Please read http://i2pd.readthedocs.io/en/latest/ for further configuration help. @@ -276,7 +276,7 @@ in ''; }; - logCLFTime = mkEnableOption "Full CLF-formatted date and time to log"; + logCLFTime = mkEnableOption (lib.mdDoc "Full CLF-formatted date and time to log"); address = mkOption { type = with types; nullOr str; @@ -345,14 +345,14 @@ in ntcp = mkEnableTrueOption "ntcp"; ssu = mkEnableTrueOption "ssu"; - notransit = mkEnableOption "notransit" // { - description = '' + notransit = mkEnableOption (lib.mdDoc "notransit") // { + description = lib.mdDoc '' Tells the router to not accept transit tunnels during startup. ''; }; - floodfill = mkEnableOption "floodfill" // { - description = '' + floodfill = mkEnableOption (lib.mdDoc "floodfill") // { + description = lib.mdDoc '' If the router is declared to be unreachable and needs introduction nodes. ''; }; @@ -383,10 +383,10 @@ in }; enableIPv4 = mkEnableTrueOption "IPv4 connectivity"; - enableIPv6 = mkEnableOption "IPv6 connectivity"; + enableIPv6 = mkEnableOption (lib.mdDoc "IPv6 connectivity"); nat = mkEnableTrueOption "NAT bypass"; - upnp.enable = mkEnableOption "UPnP service discovery"; + upnp.enable = mkEnableOption (lib.mdDoc "UPnP service discovery"); upnp.name = mkOption { type = types.str; default = "I2Pd"; @@ -406,7 +406,7 @@ in ''; }; - reseed.verify = mkEnableOption "SU3 signature verification"; + reseed.verify = mkEnableOption (lib.mdDoc "SU3 signature verification"); reseed.file = mkOption { type = with types; nullOr str; @@ -467,7 +467,7 @@ in ''; }; - trust.enable = mkEnableOption "Explicit trust options"; + trust.enable = mkEnableOption (lib.mdDoc "Explicit trust options"); trust.family = mkOption { type = with types; nullOr str; @@ -485,7 +485,7 @@ in ''; }; - trust.hidden = mkEnableOption "Router concealment"; + trust.hidden = mkEnableOption (lib.mdDoc "Router concealment"); websocket = mkEndpointOpt "websockets" "127.0.0.1" 7666; @@ -493,7 +493,7 @@ in exploratory.outbound = i2cpOpts "exploratory"; ntcp2.enable = mkEnableTrueOption "NTCP2"; - ntcp2.published = mkEnableOption "NTCP2 publication"; + ntcp2.published = mkEnableOption (lib.mdDoc "NTCP2 publication"); ntcp2.port = mkOption { type = types.int; default = 0; @@ -550,7 +550,7 @@ in ''; }; - yggdrasil.enable = mkEnableOption "Yggdrasil"; + yggdrasil.enable = mkEnableOption (lib.mdDoc "Yggdrasil"); yggdrasil.address = mkOption { type = with types; nullOr str; @@ -563,7 +563,7 @@ in proto.http = (mkEndpointOpt "http" "127.0.0.1" 7070) // { - auth = mkEnableOption "Webconsole authentication"; + auth = mkEnableOption (lib.mdDoc "Webconsole authentication"); user = mkOption { type = types.str; @@ -608,7 +608,7 @@ in }; proto.socksProxy = (mkKeyedEndpointOpt "socksproxy" "127.0.0.1" 4447 "socksproxy-keys.dat") // { - outproxyEnable = mkEnableOption "SOCKS outproxy"; + outproxyEnable = mkEnableOption (lib.mdDoc "SOCKS outproxy"); outproxy = mkOption { type = types.str; default = "127.0.0.1"; diff --git a/nixos/modules/services/networking/icecream/daemon.nix b/nixos/modules/services/networking/icecream/daemon.nix index f94832c4778..fdd7a139c2f 100644 --- a/nixos/modules/services/networking/icecream/daemon.nix +++ b/nixos/modules/services/networking/icecream/daemon.nix @@ -12,7 +12,7 @@ in { services.icecream.daemon = { - enable = mkEnableOption "Icecream Daemon"; + enable = mkEnableOption (lib.mdDoc "Icecream Daemon"); openFirewall = mkOption { type = types.bool; diff --git a/nixos/modules/services/networking/icecream/scheduler.nix b/nixos/modules/services/networking/icecream/scheduler.nix index 51f3988fe58..33aee1bb19c 100644 --- a/nixos/modules/services/networking/icecream/scheduler.nix +++ b/nixos/modules/services/networking/icecream/scheduler.nix @@ -11,7 +11,7 @@ in { options = { services.icecream.scheduler = { - enable = mkEnableOption "Icecream Scheduler"; + enable = mkEnableOption (lib.mdDoc "Icecream Scheduler"); netName = mkOption { type = types.nullOr types.str; diff --git a/nixos/modules/services/networking/inspircd.nix b/nixos/modules/services/networking/inspircd.nix index f2464b9a11f..da193df105b 100644 --- a/nixos/modules/services/networking/inspircd.nix +++ b/nixos/modules/services/networking/inspircd.nix @@ -12,7 +12,7 @@ in { options = { services.inspircd = { - enable = lib.mkEnableOption "InspIRCd"; + enable = lib.mkEnableOption (lib.mdDoc "InspIRCd"); package = lib.mkOption { type = lib.types.package; diff --git a/nixos/modules/services/networking/iperf3.nix b/nixos/modules/services/networking/iperf3.nix index 0c308f8e7c0..a70085bb1f5 100644 --- a/nixos/modules/services/networking/iperf3.nix +++ b/nixos/modules/services/networking/iperf3.nix @@ -3,7 +3,7 @@ let cfg = config.services.iperf3; api = { - enable = mkEnableOption "iperf3 network throughput testing server"; + enable = mkEnableOption (lib.mdDoc "iperf3 network throughput testing server"); port = mkOption { type = types.ints.u16; default = 5201; diff --git a/nixos/modules/services/networking/ircd-hybrid/default.nix b/nixos/modules/services/networking/ircd-hybrid/default.nix index 44fadde1fbb..554b0f7bb8b 100644 --- a/nixos/modules/services/networking/ircd-hybrid/default.nix +++ b/nixos/modules/services/networking/ircd-hybrid/default.nix @@ -36,7 +36,7 @@ in services.ircdHybrid = { - enable = mkEnableOption "IRCD"; + enable = mkEnableOption (lib.mdDoc "IRCD"); serverName = mkOption { default = "hades.arpa"; diff --git a/nixos/modules/services/networking/iscsi/initiator.nix b/nixos/modules/services/networking/iscsi/initiator.nix index 7414a705a25..d2865a660ea 100644 --- a/nixos/modules/services/networking/iscsi/initiator.nix +++ b/nixos/modules/services/networking/iscsi/initiator.nix @@ -4,11 +4,11 @@ let in { options.services.openiscsi = with types; { - enable = mkEnableOption "the openiscsi iscsi daemon"; - enableAutoLoginOut = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc "the openiscsi iscsi daemon"); + enableAutoLoginOut = mkEnableOption (lib.mdDoc '' automatic login and logout of all automatic targets. You probably do not want this. - ''; + ''); discoverPortal = mkOption { type = nullOr str; default = null; diff --git a/nixos/modules/services/networking/iscsi/target.nix b/nixos/modules/services/networking/iscsi/target.nix index 5bdac4336ce..88eaf459003 100644 --- a/nixos/modules/services/networking/iscsi/target.nix +++ b/nixos/modules/services/networking/iscsi/target.nix @@ -9,7 +9,7 @@ in ###### interface options = { services.target = with types; { - enable = mkEnableOption "the kernel's LIO iscsi target"; + enable = mkEnableOption (lib.mdDoc "the kernel's LIO iscsi target"); config = mkOption { type = attrs; diff --git a/nixos/modules/services/networking/iwd.nix b/nixos/modules/services/networking/iwd.nix index 4921fe2c76c..526e6ab0a7a 100644 --- a/nixos/modules/services/networking/iwd.nix +++ b/nixos/modules/services/networking/iwd.nix @@ -17,7 +17,7 @@ let in { options.networking.wireless.iwd = { - enable = mkEnableOption "iwd"; + enable = mkEnableOption (lib.mdDoc "iwd"); settings = mkOption { type = ini.type; diff --git a/nixos/modules/services/networking/jibri/default.nix b/nixos/modules/services/networking/jibri/default.nix index 4ac5bae22cc..6925ac55840 100644 --- a/nixos/modules/services/networking/jibri/default.nix +++ b/nixos/modules/services/networking/jibri/default.nix @@ -89,7 +89,7 @@ let in { options.services.jibri = with types; { - enable = mkEnableOption "Jitsi BRoadcasting Infrastructure. Currently Jibri must be run on a host that is also running , so for most use cases it will be simpler to run "; + enable = mkEnableOption (lib.mdDoc "Jitsi BRoadcasting Infrastructure. Currently Jibri must be run on a host that is also running {option}`services.jitsi-meet.enable`, so for most use cases it will be simpler to run {option}`services.jitsi-meet.jibri.enable`"); config = mkOption { type = attrs; default = { }; diff --git a/nixos/modules/services/networking/jicofo.nix b/nixos/modules/services/networking/jicofo.nix index 3b9038f5674..5e978896073 100644 --- a/nixos/modules/services/networking/jicofo.nix +++ b/nixos/modules/services/networking/jicofo.nix @@ -7,7 +7,7 @@ let in { options.services.jicofo = with types; { - enable = mkEnableOption "Jitsi Conference Focus - component of Jitsi Meet"; + enable = mkEnableOption (lib.mdDoc "Jitsi Conference Focus - component of Jitsi Meet"); xmppHost = mkOption { type = str; diff --git a/nixos/modules/services/networking/jitsi-videobridge.nix b/nixos/modules/services/networking/jitsi-videobridge.nix index 36e7616d755..4455b7bcee4 100644 --- a/nixos/modules/services/networking/jitsi-videobridge.nix +++ b/nixos/modules/services/networking/jitsi-videobridge.nix @@ -51,7 +51,7 @@ let in { options.services.jitsi-videobridge = with types; { - enable = mkEnableOption "Jitsi Videobridge, a WebRTC compatible video router"; + enable = mkEnableOption (lib.mdDoc "Jitsi Videobridge, a WebRTC compatible video router"); config = mkOption { type = attrs; diff --git a/nixos/modules/services/networking/kea.nix b/nixos/modules/services/networking/kea.nix index f194edcc988..f39b149dd60 100644 --- a/nixos/modules/services/networking/kea.nix +++ b/nixos/modules/services/networking/kea.nix @@ -41,7 +41,7 @@ in default = {}; type = submodule { options = { - enable = mkEnableOption "Kea Control Agent"; + enable = mkEnableOption (lib.mdDoc "Kea Control Agent"); extraArgs = mkOption { type = listOf str; @@ -80,7 +80,7 @@ in default = {}; type = submodule { options = { - enable = mkEnableOption "Kea DHCP4 server"; + enable = mkEnableOption (lib.mdDoc "Kea DHCP4 server"); extraArgs = mkOption { type = listOf str; @@ -140,7 +140,7 @@ in default = {}; type = submodule { options = { - enable = mkEnableOption "Kea DHCP6 server"; + enable = mkEnableOption (lib.mdDoc "Kea DHCP6 server"); extraArgs = mkOption { type = listOf str; @@ -201,7 +201,7 @@ in default = {}; type = submodule { options = { - enable = mkEnableOption "Kea DDNS server"; + enable = mkEnableOption (lib.mdDoc "Kea DDNS server"); extraArgs = mkOption { type = listOf str; diff --git a/nixos/modules/services/networking/knot.nix b/nixos/modules/services/networking/knot.nix index 20f11f0cd59..de238112826 100644 --- a/nixos/modules/services/networking/knot.nix +++ b/nixos/modules/services/networking/knot.nix @@ -37,7 +37,7 @@ let in { options = { services.knot = { - enable = mkEnableOption "Knot authoritative-only DNS server"; + enable = mkEnableOption (lib.mdDoc "Knot authoritative-only DNS server"); extraArgs = mkOption { type = types.listOf types.str; diff --git a/nixos/modules/services/networking/libreswan.nix b/nixos/modules/services/networking/libreswan.nix index 08ffcca8a5a..b5df31c28d7 100644 --- a/nixos/modules/services/networking/libreswan.nix +++ b/nixos/modules/services/networking/libreswan.nix @@ -47,7 +47,7 @@ in services.libreswan = { - enable = mkEnableOption "Libreswan IPsec service"; + enable = mkEnableOption (lib.mdDoc "Libreswan IPsec service"); configSetup = mkOption { type = types.lines; @@ -93,12 +93,12 @@ in '''; } ''; - description = '' + description = lib.mdDoc '' A set of policies to apply to the IPsec connections. - - The policy name must match the one of connection it needs to apply to. - + ::: {.note} + The policy name must match the one of connection it needs to apply to. + ::: ''; }; diff --git a/nixos/modules/services/networking/lldpd.nix b/nixos/modules/services/networking/lldpd.nix index 41a3713fcef..b7ac99d75d7 100644 --- a/nixos/modules/services/networking/lldpd.nix +++ b/nixos/modules/services/networking/lldpd.nix @@ -9,7 +9,7 @@ in { options.services.lldpd = { - enable = mkEnableOption "Link Layer Discovery Protocol Daemon"; + enable = mkEnableOption (lib.mdDoc "Link Layer Discovery Protocol Daemon"); extraArgs = mkOption { type = types.listOf types.str; diff --git a/nixos/modules/services/networking/lokinet.nix b/nixos/modules/services/networking/lokinet.nix index 59622d173a3..f6bc314ed26 100644 --- a/nixos/modules/services/networking/lokinet.nix +++ b/nixos/modules/services/networking/lokinet.nix @@ -7,7 +7,7 @@ let configFile = settingsFormat.generate "lokinet.ini" (lib.filterAttrsRecursive (n: v: v != null) cfg.settings); in with lib; { options.services.lokinet = { - enable = mkEnableOption "Lokinet daemon"; + enable = mkEnableOption (lib.mdDoc "Lokinet daemon"); package = mkOption { type = types.package; @@ -65,9 +65,9 @@ in with lib; { exit-node = [ "example.loki" ]; # maps all exit traffic to example.loki exit-node = [ "example.loki:100.0.0.0/24" ]; # maps 100.0.0.0/24 to example.loki ''; - description = '' + description = lib.mdDoc '' Specify a `.loki` address and an optional ip range to use as an exit broker. - See for + See for a list of exit nodes. ''; }; diff --git a/nixos/modules/services/networking/lxd-image-server.nix b/nixos/modules/services/networking/lxd-image-server.nix index 44f93a5c56e..1099169440a 100644 --- a/nixos/modules/services/networking/lxd-image-server.nix +++ b/nixos/modules/services/networking/lxd-image-server.nix @@ -11,7 +11,7 @@ in { options = { services.lxd-image-server = { - enable = mkEnableOption "lxd-image-server"; + enable = mkEnableOption (lib.mdDoc "lxd-image-server"); group = mkOption { type = types.str; @@ -31,7 +31,7 @@ in }; nginx = { - enable = mkEnableOption "nginx"; + enable = mkEnableOption (lib.mdDoc "nginx"); domain = mkOption { type = types.str; description = lib.mdDoc "Domain to use for nginx virtual host."; diff --git a/nixos/modules/services/networking/magic-wormhole-mailbox-server.nix b/nixos/modules/services/networking/magic-wormhole-mailbox-server.nix index 09d357cd2b6..326abe8cfce 100644 --- a/nixos/modules/services/networking/magic-wormhole-mailbox-server.nix +++ b/nixos/modules/services/networking/magic-wormhole-mailbox-server.nix @@ -9,7 +9,7 @@ let in { options.services.magic-wormhole-mailbox-server = { - enable = mkEnableOption "Enable Magic Wormhole Mailbox Server"; + enable = mkEnableOption (lib.mdDoc "Enable Magic Wormhole Mailbox Server"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/networking/matterbridge.nix b/nixos/modules/services/networking/matterbridge.nix index f75be9b4e37..2921074fcd2 100644 --- a/nixos/modules/services/networking/matterbridge.nix +++ b/nixos/modules/services/networking/matterbridge.nix @@ -17,7 +17,7 @@ in { options = { services.matterbridge = { - enable = mkEnableOption "Matterbridge chat platform bridge"; + enable = mkEnableOption (lib.mdDoc "Matterbridge chat platform bridge"); configPath = mkOption { type = with types; nullOr str; diff --git a/nixos/modules/services/networking/miniupnpd.nix b/nixos/modules/services/networking/miniupnpd.nix index 524270edd1c..64aacaf3504 100644 --- a/nixos/modules/services/networking/miniupnpd.nix +++ b/nixos/modules/services/networking/miniupnpd.nix @@ -19,7 +19,7 @@ in { options = { services.miniupnpd = { - enable = mkEnableOption "MiniUPnP daemon"; + enable = mkEnableOption (lib.mdDoc "MiniUPnP daemon"); externalInterface = mkOption { type = types.str; @@ -36,7 +36,7 @@ in ''; }; - natpmp = mkEnableOption "NAT-PMP support"; + natpmp = mkEnableOption (lib.mdDoc "NAT-PMP support"); upnp = mkOption { default = true; diff --git a/nixos/modules/services/networking/miredo.nix b/nixos/modules/services/networking/miredo.nix index 5e42678c32f..d15a55b4d7d 100644 --- a/nixos/modules/services/networking/miredo.nix +++ b/nixos/modules/services/networking/miredo.nix @@ -20,7 +20,7 @@ in services.miredo = { - enable = mkEnableOption "the Miredo IPv6 tunneling service"; + enable = mkEnableOption (lib.mdDoc "the Miredo IPv6 tunneling service"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/networking/mjpg-streamer.nix b/nixos/modules/services/networking/mjpg-streamer.nix index 8b490f0248b..8f8d5f5c4d3 100644 --- a/nixos/modules/services/networking/mjpg-streamer.nix +++ b/nixos/modules/services/networking/mjpg-streamer.nix @@ -12,7 +12,7 @@ in { services.mjpg-streamer = { - enable = mkEnableOption "mjpg-streamer webcam streamer"; + enable = mkEnableOption (lib.mdDoc "mjpg-streamer webcam streamer"); inputPlugin = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/monero.nix b/nixos/modules/services/networking/monero.nix index bac705843eb..0de02882aca 100644 --- a/nixos/modules/services/networking/monero.nix +++ b/nixos/modules/services/networking/monero.nix @@ -50,7 +50,7 @@ in services.monero = { - enable = mkEnableOption "Monero node daemon"; + enable = mkEnableOption (lib.mdDoc "Monero node daemon"); dataDir = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/morty.nix b/nixos/modules/services/networking/morty.nix index cc5d7998f36..4b20c34cfc9 100644 --- a/nixos/modules/services/networking/morty.nix +++ b/nixos/modules/services/networking/morty.nix @@ -17,7 +17,7 @@ in services.morty = { enable = mkEnableOption - "Morty proxy server. See https://github.com/asciimoo/morty"; + (lib.mdDoc "Morty proxy server. See https://github.com/asciimoo/morty"); ipv6 = mkOption { type = types.bool; diff --git a/nixos/modules/services/networking/mosquitto.nix b/nixos/modules/services/networking/mosquitto.nix index 49f0cc90122..5ada92adc9b 100644 --- a/nixos/modules/services/networking/mosquitto.nix +++ b/nixos/modules/services/networking/mosquitto.nix @@ -443,7 +443,7 @@ let }; globalOptions = with types; { - enable = mkEnableOption "the MQTT Mosquitto broker"; + enable = mkEnableOption (lib.mdDoc "the MQTT Mosquitto broker"); package = mkOption { type = package; diff --git a/nixos/modules/services/networking/mtprotoproxy.nix b/nixos/modules/services/networking/mtprotoproxy.nix index 7ff1cb0b2da..fc3d5dc963a 100644 --- a/nixos/modules/services/networking/mtprotoproxy.nix +++ b/nixos/modules/services/networking/mtprotoproxy.nix @@ -37,7 +37,7 @@ in services.mtprotoproxy = { - enable = mkEnableOption "mtprotoproxy"; + enable = mkEnableOption (lib.mdDoc "mtprotoproxy"); port = mkOption { type = types.int; diff --git a/nixos/modules/services/networking/mtr-exporter.nix b/nixos/modules/services/networking/mtr-exporter.nix index b95af08d363..43ebbbe96d0 100644 --- a/nixos/modules/services/networking/mtr-exporter.nix +++ b/nixos/modules/services/networking/mtr-exporter.nix @@ -9,7 +9,7 @@ in { options = { services = { mtr-exporter = { - enable = mkEnableOption "a Prometheus exporter for MTR"; + enable = mkEnableOption (lib.mdDoc "a Prometheus exporter for MTR"); target = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/multipath.nix b/nixos/modules/services/networking/multipath.nix index 3dc6be96e7a..cb6b6db272c 100644 --- a/nixos/modules/services/networking/multipath.nix +++ b/nixos/modules/services/networking/multipath.nix @@ -22,7 +22,7 @@ in { options.services.multipath = with types; { - enable = mkEnableOption "the device mapper multipath (DM-MP) daemon"; + enable = mkEnableOption (lib.mdDoc "the device mapper multipath (DM-MP) daemon"); package = mkOption { type = package; diff --git a/nixos/modules/services/networking/murmur.nix b/nixos/modules/services/networking/murmur.nix index 73787f433b4..32498ca25ea 100644 --- a/nixos/modules/services/networking/murmur.nix +++ b/nixos/modules/services/networking/murmur.nix @@ -261,25 +261,25 @@ in type = types.nullOr types.path; default = null; example = "/var/lib/murmur/murmurd.env"; - description = '' - Environment file as defined in systemd.exec5. + description = lib.mdDoc '' + Environment file as defined in {manpage}`systemd.exec(5)`. Secrets may be passed to the service without adding them to the world-readable Nix store, by specifying placeholder variables as the option value in Nix and setting these variables accordingly in the environment file. - + ``` # snippet of murmur-related config services.murmur.password = "$MURMURD_PASSWORD"; - + ``` - + ``` # content of the environment file MURMURD_PASSWORD=verysecretpassword - + ``` Note that this file needs to be available on the host on which - murmur is running. + `murmur` is running. ''; }; }; diff --git a/nixos/modules/services/networking/mxisd.nix b/nixos/modules/services/networking/mxisd.nix index 571326c5ace..528a51c1f3a 100644 --- a/nixos/modules/services/networking/mxisd.nix +++ b/nixos/modules/services/networking/mxisd.nix @@ -37,7 +37,7 @@ let in { options = { services.mxisd = { - enable = mkEnableOption "matrix federated identity server"; + enable = mkEnableOption (lib.mdDoc "matrix federated identity server"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/networking/namecoind.nix b/nixos/modules/services/networking/namecoind.nix index 45a90741465..085d6c5fe28 100644 --- a/nixos/modules/services/networking/namecoind.nix +++ b/nixos/modules/services/networking/namecoind.nix @@ -44,7 +44,7 @@ in services.namecoind = { - enable = mkEnableOption "namecoind, Namecoin client"; + enable = mkEnableOption (lib.mdDoc "namecoind, Namecoin client"); wallet = mkOption { type = types.path; diff --git a/nixos/modules/services/networking/nar-serve.nix b/nixos/modules/services/networking/nar-serve.nix index a725f4453ca..beee53c8a24 100644 --- a/nixos/modules/services/networking/nar-serve.nix +++ b/nixos/modules/services/networking/nar-serve.nix @@ -10,7 +10,7 @@ in }; options = { services.nar-serve = { - enable = mkEnableOption "Serve NAR file contents via HTTP"; + enable = mkEnableOption (lib.mdDoc "Serve NAR file contents via HTTP"); port = mkOption { type = types.port; diff --git a/nixos/modules/services/networking/nats.nix b/nixos/modules/services/networking/nats.nix index 41e38add69f..dd732d2a9fc 100644 --- a/nixos/modules/services/networking/nats.nix +++ b/nixos/modules/services/networking/nats.nix @@ -16,7 +16,7 @@ in { options = { services.nats = { - enable = mkEnableOption "NATS messaging system"; + enable = mkEnableOption (lib.mdDoc "NATS messaging system"); user = mkOption { type = types.str; @@ -39,7 +39,7 @@ in { ''; }; - jetstream = mkEnableOption "JetStream"; + jetstream = mkEnableOption (lib.mdDoc "JetStream"); port = mkOption { default = 4222; diff --git a/nixos/modules/services/networking/nbd.nix b/nixos/modules/services/networking/nbd.nix index 76ca11dfea7..454380aa315 100644 --- a/nixos/modules/services/networking/nbd.nix +++ b/nixos/modules/services/networking/nbd.nix @@ -43,7 +43,7 @@ in options = { services.nbd = { server = { - enable = mkEnableOption "the Network Block Device (nbd) server"; + enable = mkEnableOption (lib.mdDoc "the Network Block Device (nbd) server"); listenPort = mkOption { type = types.port; diff --git a/nixos/modules/services/networking/ncdns.nix b/nixos/modules/services/networking/ncdns.nix index 8af1b532cf2..1d494332095 100644 --- a/nixos/modules/services/networking/ncdns.nix +++ b/nixos/modules/services/networking/ncdns.nix @@ -50,11 +50,11 @@ in services.ncdns = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' ncdns, a Go daemon to bridge Namecoin to DNS. - To resolve .bit domains set services.namecoind.enable = true; + To resolve .bit domains set `services.namecoind.enable = true;` and an RPC username/password - ''; + ''); address = mkOption { type = types.str; @@ -78,16 +78,16 @@ in default = config.networking.hostName; defaultText = literalExpression "config.networking.hostName"; example = "example.com"; - description = '' + description = lib.mdDoc '' The hostname of this ncdns instance, which defaults to the machine hostname. If specified, ncdns lists the hostname as an NS record at the zone apex: - + ``` bit. IN NS ns1.example.com. - + ``` If unset ncdns will generate an internal psuedo-hostname under the zone, which will resolve to the value of - . + {option}`services.ncdns.identity.address`. If you are only using ncdns locally you can ignore this. ''; }; @@ -112,24 +112,24 @@ in ''; }; - dnssec.enable = mkEnableOption '' + dnssec.enable = mkEnableOption (lib.mdDoc '' DNSSEC support in ncdns. This will generate KSK and ZSK keypairs (unless provided via the options - , - etc.) and add a trust + {option}`services.ncdns.dnssec.publicKey`, + {option}`services.ncdns.dnssec.privateKey` etc.) and add a trust anchor to recursive resolvers - ''; + ''); dnssec.keys.public = mkOption { type = types.path; default = defaultFiles.public; - description = '' + description = lib.mdDoc '' Path to the file containing the KSK public key. - The key can be generated using the dnssec-keygen - command, provided by the package bind as follows: - + The key can be generated using the `dnssec-keygen` + command, provided by the package `bind` as follows: + ``` $ dnssec-keygen -a RSASHA256 -3 -b 2048 -f KSK bit - + ``` ''; }; @@ -144,13 +144,13 @@ in dnssec.keys.zonePublic = mkOption { type = types.path; default = defaultFiles.zonePublic; - description = '' + description = lib.mdDoc '' Path to the file containing the ZSK public key. - The key can be generated using the dnssec-keygen - command, provided by the package bind as follows: - + The key can be generated using the `dnssec-keygen` + command, provided by the package `bind` as follows: + ``` $ dnssec-keygen -a RSASHA256 -3 -b 2048 bit - + ``` ''; }; diff --git a/nixos/modules/services/networking/ndppd.nix b/nixos/modules/services/networking/ndppd.nix index ed97fe233b8..6cbc9712be3 100644 --- a/nixos/modules/services/networking/ndppd.nix +++ b/nixos/modules/services/networking/ndppd.nix @@ -103,21 +103,21 @@ let in { options.services.ndppd = { - enable = mkEnableOption "daemon that proxies NDP (Neighbor Discovery Protocol) messages between interfaces"; + enable = mkEnableOption (lib.mdDoc "daemon that proxies NDP (Neighbor Discovery Protocol) messages between interfaces"); interface = mkOption { type = types.nullOr types.str; - description = '' + description = lib.mdDoc '' Interface which is on link-level with router. - (Legacy option, use services.ndppd.proxies.<interface>.rules.<network> instead) + (Legacy option, use services.ndppd.proxies.\.rules.\ instead) ''; default = null; example = "eth0"; }; network = mkOption { type = types.nullOr types.str; - description = '' + description = lib.mdDoc '' Network that we proxy. - (Legacy option, use services.ndppd.proxies.<interface>.rules.<network> instead) + (Legacy option, use services.ndppd.proxies.\.rules.\ instead) ''; default = null; example = "1111::/64"; diff --git a/nixos/modules/services/networking/netbird.nix b/nixos/modules/services/networking/netbird.nix index 806b72d5f3a..5bd9e9ca616 100644 --- a/nixos/modules/services/networking/netbird.nix +++ b/nixos/modules/services/networking/netbird.nix @@ -10,12 +10,12 @@ in { meta.maintainers = with maintainers; [ misuzu ]; options.services.netbird = { - enable = mkEnableOption "Netbird daemon"; + enable = mkEnableOption (lib.mdDoc "Netbird daemon"); package = mkOption { type = types.package; default = pkgs.netbird; defaultText = literalExpression "pkgs.netbird"; - description = "The package to use for netbird"; + description = lib.mdDoc "The package to use for netbird"; }; }; diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix index d5d562e7ba5..0aa301251bb 100644 --- a/nixos/modules/services/networking/networkmanager.nix +++ b/nixos/modules/services/networking/networkmanager.nix @@ -106,30 +106,14 @@ let type = types.either types.str (types.enum ["permanent" "preserve" "random" "stable"]); default = "preserve"; example = "00:11:22:33:44:55"; - description = '' + description = lib.mdDoc '' Set the MAC address of the interface. - - - "XX:XX:XX:XX:XX:XX" - MAC address of the interface - - - "permanent" - Use the permanent MAC address of the device - - - "preserve" - Don’t change the MAC address of the device upon activation - - - "random" - Generate a randomized value upon each connect - - - "stable" - Generate a stable, hashed MAC address - - + + - `"XX:XX:XX:XX:XX:XX"`: MAC address of the interface + - `"permanent"`: Use the permanent MAC address of the device + - `"preserve"`: Don’t change the MAC address of the device upon activation + - `"random"`: Generate a randomized value upon each connect + - `"stable"`: Generate a stable, hashed MAC address ''; }; @@ -343,9 +327,9 @@ in { type = mkOption { type = types.enum (attrNames dispatcherTypesSubdirMap); default = "basic"; - description = '' + description = lib.mdDoc '' Dispatcher hook type. Look up the hooks described at - https://developer.gnome.org/NetworkManager/stable/NetworkManager.html + [https://developer.gnome.org/NetworkManager/stable/NetworkManager.html](https://developer.gnome.org/NetworkManager/stable/NetworkManager.html) and choose the type depending on the output folder. You should then filter the event type (e.g., "up"/"down") from within your script. ''; diff --git a/nixos/modules/services/networking/nftables.nix b/nixos/modules/services/networking/nftables.nix index 008528ad35b..d2d7543e8cf 100644 --- a/nixos/modules/services/networking/nftables.nix +++ b/nixos/modules/services/networking/nftables.nix @@ -11,7 +11,7 @@ in type = types.bool; default = false; description = - '' + lib.mdDoc '' Whether to enable nftables. nftables is a Linux-based packet filtering framework intended to replace frameworks like iptables. @@ -21,14 +21,13 @@ in Note that if you have Docker enabled you will not be able to use nftables without intervention. Docker uses iptables internally to setup NAT for containers. This module disables the ip_tables kernel - module, however Docker automatically loads the module. Please see [1] + module, however Docker automatically loads the module. Please see + for more information. There are other programs that use iptables internally too, such as - libvirt. For information on how the two firewalls interact, see [2]. - - [1]: https://github.com/NixOS/nixpkgs/issues/24318#issuecomment-289216273 - [2]: https://wiki.nftables.org/wiki-nftables/index.php/Troubleshooting#Question_4._How_do_nftables_and_iptables_interact_when_used_on_the_same_system.3F + libvirt. For information on how the two firewalls interact, see + . ''; }; networking.nftables.ruleset = mkOption { diff --git a/nixos/modules/services/networking/nghttpx/nghttpx-options.nix b/nixos/modules/services/networking/nghttpx/nghttpx-options.nix index 13c328b4180..82ab8c4223e 100644 --- a/nixos/modules/services/networking/nghttpx/nghttpx-options.nix +++ b/nixos/modules/services/networking/nghttpx/nghttpx-options.nix @@ -1,6 +1,6 @@ { lib, ... }: { options.services.nghttpx = { - enable = lib.mkEnableOption "nghttpx"; + enable = lib.mkEnableOption (lib.mdDoc "nghttpx"); frontends = lib.mkOption { type = lib.types.listOf (lib.types.submodule (import ./frontend-submodule.nix)); @@ -131,8 +131,8 @@ rlimit-nofile = lib.mkOption { type = lib.types.int; default = 0; - description = '' - Set maximum number of open files (RLIMIT_NOFILE) to <N>. If 0 + description = lib.mdDoc '' + Set maximum number of open files (RLIMIT_NOFILE) to \. If 0 is given, nghttpx does not set the limit. Please see https://nghttp2.org/documentation/nghttpx.1.html#cmdoption-nghttpx--rlimit-nofile diff --git a/nixos/modules/services/networking/ngircd.nix b/nixos/modules/services/networking/ngircd.nix index f6c7415c1d3..5e721f5aa62 100644 --- a/nixos/modules/services/networking/ngircd.nix +++ b/nixos/modules/services/networking/ngircd.nix @@ -20,7 +20,7 @@ let in { options = { services.ngircd = { - enable = mkEnableOption "the ngircd IRC server"; + enable = mkEnableOption (lib.mdDoc "the ngircd IRC server"); config = mkOption { description = lib.mdDoc "The ngircd configuration (see ngircd.conf(5))."; diff --git a/nixos/modules/services/networking/nix-serve.nix b/nixos/modules/services/networking/nix-serve.nix index 5deb31a486b..dba2f1386b6 100644 --- a/nixos/modules/services/networking/nix-serve.nix +++ b/nixos/modules/services/networking/nix-serve.nix @@ -8,7 +8,7 @@ in { options = { services.nix-serve = { - enable = mkEnableOption "nix-serve, the standalone Nix binary cache server"; + enable = mkEnableOption (lib.mdDoc "nix-serve, the standalone Nix binary cache server"); port = mkOption { type = types.port; @@ -35,15 +35,15 @@ in secretKeyFile = mkOption { type = types.nullOr types.str; default = null; - description = '' + description = lib.mdDoc '' The path to the file used for signing derivation data. Generate with: - + ``` nix-store --generate-binary-cache-key key-name secret-key-file public-key-file - + ``` - For more details see nix-store1. + For more details see {manpage}`nix-store(1)`. ''; }; diff --git a/nixos/modules/services/networking/nntp-proxy.nix b/nixos/modules/services/networking/nntp-proxy.nix index 4dd2922e83f..06a8bb8b87d 100644 --- a/nixos/modules/services/networking/nntp-proxy.nix +++ b/nixos/modules/services/networking/nntp-proxy.nix @@ -59,7 +59,7 @@ in options = { services.nntp-proxy = { - enable = mkEnableOption "NNTP-Proxy"; + enable = mkEnableOption (lib.mdDoc "NNTP-Proxy"); upstreamServer = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/nomad.nix b/nixos/modules/services/networking/nomad.nix index 73b6f13327f..5e5d9469efc 100644 --- a/nixos/modules/services/networking/nomad.nix +++ b/nixos/modules/services/networking/nomad.nix @@ -8,7 +8,7 @@ in ##### interface options = { services.nomad = { - enable = mkEnableOption "Nomad, a distributed, highly available, datacenter-aware scheduler"; + enable = mkEnableOption (lib.mdDoc "Nomad, a distributed, highly available, datacenter-aware scheduler"); package = mkOption { type = types.package; @@ -22,8 +22,8 @@ in extraPackages = mkOption { type = types.listOf types.package; default = [ ]; - description = '' - Extra packages to add to PATH for the Nomad agent process. + description = lib.mdDoc '' + Extra packages to add to {env}`PATH` for the Nomad agent process. ''; example = literalExpression '' with pkgs; [ cni-plugins ] diff --git a/nixos/modules/services/networking/nsd.nix b/nixos/modules/services/networking/nsd.nix index cf2afcacc52..57da208bd7a 100644 --- a/nixos/modules/services/networking/nsd.nix +++ b/nixos/modules/services/networking/nsd.nix @@ -213,24 +213,24 @@ let example = [ "192.0.2.0/24 NOKEY" "10.0.0.1-10.0.0.5 my_tsig_key_name" "10.0.3.4&255.255.0.0 BLOCKED" ]; - description = '' + description = lib.mdDoc '' Listed primary servers are allowed to notify this secondary server. - - either a plain IPv4/IPv6 address or range. Valid patters for ranges: - * 10.0.0.0/24 # via subnet size - * 10.0.0.0&255.255.255.0 # via subnet mask - * 10.0.0.1-10.0.0.254 # via range + Format: ` ` + + `` either a plain IPv4/IPv6 address or range. + Valid patters for ranges: + * `10.0.0.0/24`: via subnet size + * `10.0.0.0&255.255.255.0`: via subnet mask + * `10.0.0.1-10.0.0.254`: via range A optional port number could be added with a '@': - * 2001:1234::1@1234 + * `2001:1234::1@1234` - - * will use the specified TSIG key - * NOKEY no TSIG signature is required - * BLOCKED notifies from non-listed or blocked IPs will be ignored - * ]]> + `` + * `` will use the specified TSIG key + * `NOKEY` no TSIG signature is required + * `BLOCKED`notifies from non-listed or blocked IPs will be ignored ''; }; @@ -262,7 +262,7 @@ let ''; }; - dnssec = mkEnableOption "DNSSEC"; + dnssec = mkEnableOption (lib.mdDoc "DNSSEC"); dnssecPolicy = { algorithm = mkOption { @@ -344,18 +344,17 @@ let type = types.listOf types.str; default = []; example = [ "10.0.0.1@3721 my_key" "::5 NOKEY" ]; - description = '' + description = lib.mdDoc '' This primary server will notify all given secondary servers about zone changes. - - a plain IPv4/IPv6 address with on optional port number (ip@port) + Format: ` ` - - * sign notifies with the specified key - * NOKEY don't sign notifies - ]]> + `` a plain IPv4/IPv6 address with on optional port number (ip@port) + + `` + - `` sign notifies with the specified key + - `NOKEY` don't sign notifies ''; }; @@ -383,9 +382,9 @@ let type = types.listOf types.str; default = []; example = [ "192.0.2.0/24 NOKEY" "192.0.2.0/24 my_tsig_key_name" ]; - description = '' + description = lib.mdDoc '' Allow these IPs and TSIG to transfer zones, addr TSIG|NOKEY|BLOCKED - address range 192.0.2.0/24, 1.2.3.4&255.255.0.0, 3.0.2.20-3.0.2.40 + address range 192.0.2.0/24, 1.2.3.4&255.255.0.0, 3.0.2.20-3.0.2.40 ''; }; @@ -479,9 +478,9 @@ in # options are ordered alphanumerically options.services.nsd = { - enable = mkEnableOption "NSD authoritative DNS server"; + enable = mkEnableOption (lib.mdDoc "NSD authoritative DNS server"); - bind8Stats = mkEnableOption "BIND8 like statistics"; + bind8Stats = mkEnableOption (lib.mdDoc "BIND8 like statistics"); dnssecInterval = mkOption { type = types.str; @@ -617,7 +616,7 @@ in ''; }; - roundRobin = mkEnableOption "round robin rotation of records"; + roundRobin = mkEnableOption (lib.mdDoc "round robin rotation of records"); serverCount = mkOption { type = types.int; @@ -736,7 +735,7 @@ in ratelimit = { - enable = mkEnableOption "ratelimit capabilities"; + enable = mkEnableOption (lib.mdDoc "ratelimit capabilities"); ipv4PrefixLength = mkOption { type = types.nullOr types.int; @@ -797,7 +796,7 @@ in remoteControl = { - enable = mkEnableOption "remote control via nsd-control"; + enable = mkEnableOption (lib.mdDoc "remote control via nsd-control"); controlCertFile = mkOption { type = types.path; diff --git a/nixos/modules/services/networking/ntp/openntpd.nix b/nixos/modules/services/networking/ntp/openntpd.nix index 2a766a134f7..05df1f6e626 100644 --- a/nixos/modules/services/networking/ntp/openntpd.nix +++ b/nixos/modules/services/networking/ntp/openntpd.nix @@ -19,7 +19,7 @@ in ###### interface options.services.openntpd = { - enable = mkEnableOption "OpenNTP time synchronization server"; + enable = mkEnableOption (lib.mdDoc "OpenNTP time synchronization server"); servers = mkOption { default = config.services.ntp.servers; diff --git a/nixos/modules/services/networking/nullidentdmod.nix b/nixos/modules/services/networking/nullidentdmod.nix index 85f5c799a31..e74e1dd6b79 100644 --- a/nixos/modules/services/networking/nullidentdmod.nix +++ b/nixos/modules/services/networking/nullidentdmod.nix @@ -3,7 +3,7 @@ in { options.services.nullidentdmod = with types; { - enable = mkEnableOption "the nullidentdmod identd daemon"; + enable = mkEnableOption (lib.mdDoc "the nullidentdmod identd daemon"); userid = mkOption { type = nullOr str; diff --git a/nixos/modules/services/networking/nylon.nix b/nixos/modules/services/networking/nylon.nix index 3eb15c23bef..6ed832b6fa1 100644 --- a/nixos/modules/services/networking/nylon.nix +++ b/nixos/modules/services/networking/nylon.nix @@ -139,7 +139,7 @@ in services.nylon = mkOption { default = {}; - description = "Collection of named nylon instances"; + description = lib.mdDoc "Collection of named nylon instances"; type = with types; attrsOf (submodule nylonOpts); internal = true; }; diff --git a/nixos/modules/services/networking/ocserv.nix b/nixos/modules/services/networking/ocserv.nix index efe1d240a9a..9548fd92dbd 100644 --- a/nixos/modules/services/networking/ocserv.nix +++ b/nixos/modules/services/networking/ocserv.nix @@ -10,7 +10,7 @@ in { options.services.ocserv = { - enable = mkEnableOption "ocserv"; + enable = mkEnableOption (lib.mdDoc "ocserv"); config = mkOption { type = types.lines; diff --git a/nixos/modules/services/networking/ofono.nix b/nixos/modules/services/networking/ofono.nix index 6192857cd3e..960fc35a70a 100644 --- a/nixos/modules/services/networking/ofono.nix +++ b/nixos/modules/services/networking/ofono.nix @@ -19,7 +19,7 @@ in ###### interface options = { services.ofono = { - enable = mkEnableOption "Ofono"; + enable = mkEnableOption (lib.mdDoc "Ofono"); plugins = mkOption { type = types.listOf types.package; diff --git a/nixos/modules/services/networking/ostinato.nix b/nixos/modules/services/networking/ostinato.nix index 808ccdd4e0c..1e4dcf37f64 100644 --- a/nixos/modules/services/networking/ostinato.nix +++ b/nixos/modules/services/networking/ostinato.nix @@ -26,7 +26,7 @@ in services.ostinato = { - enable = mkEnableOption "Ostinato agent-controller (Drone)"; + enable = mkEnableOption (lib.mdDoc "Ostinato agent-controller (Drone)"); port = mkOption { type = types.int; diff --git a/nixos/modules/services/networking/owamp.nix b/nixos/modules/services/networking/owamp.nix index baf64347b09..e7a5bfea525 100644 --- a/nixos/modules/services/networking/owamp.nix +++ b/nixos/modules/services/networking/owamp.nix @@ -10,7 +10,7 @@ in ###### interface options = { - services.owamp.enable = mkEnableOption "Enable OWAMP server"; + services.owamp.enable = mkEnableOption (lib.mdDoc "Enable OWAMP server"); }; diff --git a/nixos/modules/services/networking/pdns-recursor.nix b/nixos/modules/services/networking/pdns-recursor.nix index 7319793101c..473c2a1f1fb 100644 --- a/nixos/modules/services/networking/pdns-recursor.nix +++ b/nixos/modules/services/networking/pdns-recursor.nix @@ -27,7 +27,7 @@ let in { options.services.pdns-recursor = { - enable = mkEnableOption "PowerDNS Recursor, a recursive DNS server"; + enable = mkEnableOption (lib.mdDoc "PowerDNS Recursor, a recursive DNS server"); dns.address = mkOption { type = oneOrMore types.str; diff --git a/nixos/modules/services/networking/pdnsd.nix b/nixos/modules/services/networking/pdnsd.nix index 03c9005413b..8fe27a44eee 100644 --- a/nixos/modules/services/networking/pdnsd.nix +++ b/nixos/modules/services/networking/pdnsd.nix @@ -24,7 +24,7 @@ in { options = { services.pdnsd = - { enable = mkEnableOption "pdnsd"; + { enable = mkEnableOption (lib.mdDoc "pdnsd"); cacheDir = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/pixiecore.nix b/nixos/modules/services/networking/pixiecore.nix index c88081af620..ea4008d4d51 100644 --- a/nixos/modules/services/networking/pixiecore.nix +++ b/nixos/modules/services/networking/pixiecore.nix @@ -10,7 +10,7 @@ in options = { services.pixiecore = { - enable = mkEnableOption "Pixiecore"; + enable = mkEnableOption (lib.mdDoc "Pixiecore"); openFirewall = mkOption { type = types.bool; diff --git a/nixos/modules/services/networking/pleroma.nix b/nixos/modules/services/networking/pleroma.nix index de9d0821c63..dfd1ed4036a 100644 --- a/nixos/modules/services/networking/pleroma.nix +++ b/nixos/modules/services/networking/pleroma.nix @@ -4,7 +4,7 @@ let in { options = { services.pleroma = with lib; { - enable = mkEnableOption "pleroma"; + enable = mkEnableOption (lib.mdDoc "pleroma"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/networking/powerdns.nix b/nixos/modules/services/networking/powerdns.nix index f7c72361dfa..6aa5928d637 100644 --- a/nixos/modules/services/networking/powerdns.nix +++ b/nixos/modules/services/networking/powerdns.nix @@ -8,7 +8,7 @@ let in { options = { services.powerdns = { - enable = mkEnableOption "PowerDNS domain name server"; + enable = mkEnableOption (lib.mdDoc "PowerDNS domain name server"); extraConfig = mkOption { type = types.lines; diff --git a/nixos/modules/services/networking/pppd.nix b/nixos/modules/services/networking/pppd.nix index d923b49dda2..75fc04c6757 100644 --- a/nixos/modules/services/networking/pppd.nix +++ b/nixos/modules/services/networking/pppd.nix @@ -12,7 +12,7 @@ in options = { services.pppd = { - enable = mkEnableOption "pppd"; + enable = mkEnableOption (lib.mdDoc "pppd"); package = mkOption { default = pkgs.ppp; diff --git a/nixos/modules/services/networking/pptpd.nix b/nixos/modules/services/networking/pptpd.nix index d16496a2cb5..2f206e813a5 100644 --- a/nixos/modules/services/networking/pptpd.nix +++ b/nixos/modules/services/networking/pptpd.nix @@ -5,7 +5,7 @@ with lib; { options = { services.pptpd = { - enable = mkEnableOption "pptpd, the Point-to-Point Tunneling Protocol daemon"; + enable = mkEnableOption (lib.mdDoc "pptpd, the Point-to-Point Tunneling Protocol daemon"); serverIp = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/prayer.nix b/nixos/modules/services/networking/prayer.nix index 01e961997a7..197aa8a6f44 100644 --- a/nixos/modules/services/networking/prayer.nix +++ b/nixos/modules/services/networking/prayer.nix @@ -41,7 +41,7 @@ in services.prayer = { - enable = mkEnableOption "the prayer webmail http server"; + enable = mkEnableOption (lib.mdDoc "the prayer webmail http server"); port = mkOption { default = 2080; diff --git a/nixos/modules/services/networking/privoxy.nix b/nixos/modules/services/networking/privoxy.nix index 1ad5b155feb..78d02aaa112 100644 --- a/nixos/modules/services/networking/privoxy.nix +++ b/nixos/modules/services/networking/privoxy.nix @@ -53,7 +53,7 @@ in options.services.privoxy = { - enable = mkEnableOption "Privoxy, non-caching filtering proxy"; + enable = mkEnableOption (lib.mdDoc "Privoxy, non-caching filtering proxy"); enableTor = mkOption { type = types.bool; @@ -67,21 +67,21 @@ in inspectHttps = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to configure Privoxy to inspect HTTPS requests, meaning all encrypted traffic will be filtered as well. This works by decrypting and re-encrypting the requests using a per-domain generated certificate. To issue per-domain certificates, Privoxy must be provided with a CA - certificate, using the ca-cert-file, - ca-key-file settings. + certificate, using the `ca-cert-file`, + `ca-key-file` settings. - - The CA certificate must also be added to the system trust roots, - otherwise browsers will reject all Privoxy certificates as invalid. - You can do so by using the option - . - + ::: {.warning} + The CA certificate must also be added to the system trust roots, + otherwise browsers will reject all Privoxy certificates as invalid. + You can do so by using the option + {option}`security.pki.certificateFiles`. + ::: ''; }; @@ -89,8 +89,8 @@ in type = ageType; default = "10d"; example = "12h"; - description = '' - If inspectHttps is enabled, the time generated HTTPS + description = lib.mdDoc '' + If `inspectHttps` is enabled, the time generated HTTPS certificates will be stored in a temporary directory for reuse. Once the lifetime has expired the directory will cleared and the certificate will have to be generated again, on-demand. @@ -98,8 +98,10 @@ in Depending on the traffic, you may want to reduce the lifetime to limit the disk usage, since Privoxy itself never deletes the certificates. - The format is that of the tmpfiles.d(5) - Age parameter. + ::: {.note} + The format is that of the `tmpfiles.d(5)` + Age parameter. + ::: ''; }; @@ -179,15 +181,15 @@ in # debug 64 } ''; - description = '' + description = lib.mdDoc '' This option is mapped to the main Privoxy configuration file. Check out the Privoxy user manual at - + for available settings and documentation. - - Repeated settings can be represented by using a list. - + ::: {.note} + Repeated settings can be represented by using a list. + ::: ''; }; diff --git a/nixos/modules/services/networking/prosody.nix b/nixos/modules/services/networking/prosody.nix index f32c7adbd2c..6cd4678ae4a 100644 --- a/nixos/modules/services/networking/prosody.nix +++ b/nixos/modules/services/networking/prosody.nix @@ -529,28 +529,28 @@ in user = mkOption { type = types.str; default = "prosody"; - description = '' + description = lib.mdDoc '' User account under which prosody runs. - + ::: {.note} If left as the default value this user will automatically be created on system activation, otherwise you are responsible for ensuring the user exists before the prosody service starts. - + ::: ''; }; group = mkOption { type = types.str; default = "prosody"; - description = '' + description = lib.mdDoc '' Group account under which prosody runs. - + ::: {.note} If left as the default value this group will automatically be created on system activation, otherwise you are responsible for ensuring the group exists before the prosody service starts. - + ::: ''; }; diff --git a/nixos/modules/services/networking/quassel.nix b/nixos/modules/services/networking/quassel.nix index a4b203ea001..a074023b5ee 100644 --- a/nixos/modules/services/networking/quassel.nix +++ b/nixos/modules/services/networking/quassel.nix @@ -17,7 +17,7 @@ in services.quassel = { - enable = mkEnableOption "the Quassel IRC client daemon"; + enable = mkEnableOption (lib.mdDoc "the Quassel IRC client daemon"); certificateFile = mkOption { type = types.nullOr types.str; @@ -47,9 +47,9 @@ in interfaces = mkOption { type = types.listOf types.str; default = [ "127.0.0.1" ]; - description = '' - The interfaces the Quassel daemon will be listening to. If `[ 127.0.0.1 ]', - only clients on the local host can connect to it; if `[ 0.0.0.0 ]', clients + description = lib.mdDoc '' + The interfaces the Quassel daemon will be listening to. If `[ 127.0.0.1 ]`, + only clients on the local host can connect to it; if `[ 0.0.0.0 ]`, clients can access it from any network interface. ''; }; diff --git a/nixos/modules/services/networking/quicktun.nix b/nixos/modules/services/networking/quicktun.nix index e2282b9aaf7..7aed972adc8 100644 --- a/nixos/modules/services/networking/quicktun.nix +++ b/nixos/modules/services/networking/quicktun.nix @@ -20,65 +20,65 @@ with lib; type = types.int; default = 0; example = 1; - description = ""; + description = lib.mdDoc ""; }; remoteAddress = mkOption { type = types.str; example = "tunnel.example.com"; - description = ""; + description = lib.mdDoc ""; }; localAddress = mkOption { type = types.str; example = "0.0.0.0"; - description = ""; + description = lib.mdDoc ""; }; localPort = mkOption { type = types.int; default = 2998; - description = ""; + description = lib.mdDoc ""; }; remotePort = mkOption { type = types.int; default = 2998; - description = ""; + description = lib.mdDoc ""; }; remoteFloat = mkOption { type = types.int; default = 0; - description = ""; + description = lib.mdDoc ""; }; protocol = mkOption { type = types.str; default = "nacltai"; - description = ""; + description = lib.mdDoc ""; }; privateKey = mkOption { type = types.str; - description = ""; + description = lib.mdDoc ""; }; publicKey = mkOption { type = types.str; - description = ""; + description = lib.mdDoc ""; }; timeWindow = mkOption { type = types.int; default = 5; - description = ""; + description = lib.mdDoc ""; }; upScript = mkOption { type = types.lines; default = ""; - description = ""; + description = lib.mdDoc ""; }; }; }); diff --git a/nixos/modules/services/networking/quorum.nix b/nixos/modules/services/networking/quorum.nix index 67027ae3f85..4b90b12f86f 100644 --- a/nixos/modules/services/networking/quorum.nix +++ b/nixos/modules/services/networking/quorum.nix @@ -13,7 +13,7 @@ in { options = { services.quorum = { - enable = mkEnableOption "Quorum blockchain daemon"; + enable = mkEnableOption (lib.mdDoc "Quorum blockchain daemon"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/r53-ddns.nix b/nixos/modules/services/networking/r53-ddns.nix index 77738c75531..277b65dcecd 100644 --- a/nixos/modules/services/networking/r53-ddns.nix +++ b/nixos/modules/services/networking/r53-ddns.nix @@ -10,7 +10,7 @@ in options = { services.r53-ddns = { - enable = mkEnableOption "r53-ddyns"; + enable = mkEnableOption (lib.mdDoc "r53-ddyns"); interval = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/radicale.nix b/nixos/modules/services/networking/radicale.nix index 687cf206e14..a343dab7af2 100644 --- a/nixos/modules/services/networking/radicale.nix +++ b/nixos/modules/services/networking/radicale.nix @@ -25,7 +25,7 @@ let in { options.services.radicale = { - enable = mkEnableOption "Radicale CalDAV and CardDAV server"; + enable = mkEnableOption (lib.mdDoc "Radicale CalDAV and CardDAV server"); package = mkOption { description = lib.mdDoc "Radicale package to use."; diff --git a/nixos/modules/services/networking/robustirc-bridge.nix b/nixos/modules/services/networking/robustirc-bridge.nix index c5afbaf8ea1..9b93828c396 100644 --- a/nixos/modules/services/networking/robustirc-bridge.nix +++ b/nixos/modules/services/networking/robustirc-bridge.nix @@ -8,7 +8,7 @@ in { options = { services.robustirc-bridge = { - enable = mkEnableOption "RobustIRC bridge"; + enable = mkEnableOption (lib.mdDoc "RobustIRC bridge"); extraFlags = mkOption { type = types.listOf types.str; diff --git a/nixos/modules/services/networking/routedns.nix b/nixos/modules/services/networking/routedns.nix index 6f3d769e864..2a29a06700c 100644 --- a/nixos/modules/services/networking/routedns.nix +++ b/nixos/modules/services/networking/routedns.nix @@ -12,7 +12,7 @@ let in { options.services.routedns = { - enable = mkEnableOption "RouteDNS - DNS stub resolver, proxy and router"; + enable = mkEnableOption (lib.mdDoc "RouteDNS - DNS stub resolver, proxy and router"); settings = mkOption { type = settingsFormat.type; diff --git a/nixos/modules/services/networking/rxe.nix b/nixos/modules/services/networking/rxe.nix index 868e2c81ccb..7dbb4823b4b 100644 --- a/nixos/modules/services/networking/rxe.nix +++ b/nixos/modules/services/networking/rxe.nix @@ -10,14 +10,14 @@ in { options = { networking.rxe = { - enable = mkEnableOption "RDMA over converged ethernet"; + enable = mkEnableOption (lib.mdDoc "RDMA over converged ethernet"); interfaces = mkOption { type = types.listOf types.str; default = [ ]; example = [ "eth0" ]; - description = '' + description = lib.mdDoc '' Enable RDMA on the listed interfaces. The corresponding virtual - RDMA interfaces will be named rxe_<interface>. + RDMA interfaces will be named rxe_\. UDP port 4791 must be open on the respective ethernet interfaces. ''; }; diff --git a/nixos/modules/services/networking/sabnzbd.nix b/nixos/modules/services/networking/sabnzbd.nix index 18e1d9f48b2..8486be1bc66 100644 --- a/nixos/modules/services/networking/sabnzbd.nix +++ b/nixos/modules/services/networking/sabnzbd.nix @@ -15,7 +15,7 @@ in options = { services.sabnzbd = { - enable = mkEnableOption "the sabnzbd server"; + enable = mkEnableOption (lib.mdDoc "the sabnzbd server"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/networking/seafile.nix b/nixos/modules/services/networking/seafile.nix index d9617952ea5..b07d51b9b49 100644 --- a/nixos/modules/services/networking/seafile.nix +++ b/nixos/modules/services/networking/seafile.nix @@ -37,7 +37,7 @@ in { ###### Interface options.services.seafile = { - enable = mkEnableOption "Seafile server"; + enable = mkEnableOption (lib.mdDoc "Seafile server"); ccnetSettings = mkOption { type = types.submodule { @@ -131,9 +131,9 @@ in { seahubExtraConf = mkOption { default = ""; type = types.lines; - description = '' + description = lib.mdDoc '' Extra config to append to `seahub_settings.py` file. - Refer to + Refer to for all available options. ''; }; diff --git a/nixos/modules/services/networking/searx.nix b/nixos/modules/services/networking/searx.nix index 2a97539032d..214b6c6a787 100644 --- a/nixos/modules/services/networking/searx.nix +++ b/nixos/modules/services/networking/searx.nix @@ -81,35 +81,33 @@ in }; } ''; - description = '' + description = lib.mdDoc '' Searx settings. These will be merged with (taking precedence over) the default configuration. It's also possible to refer to environment variables - (defined in ) - using the syntax @VARIABLE_NAME@. - - - For available settings, see the Searx - docs. - - + (defined in [](#opt-services.searx.environmentFile)) + using the syntax `@VARIABLE_NAME@`. + + ::: {.note} + For available settings, see the Searx + [docs](https://searx.github.io/searx/admin/settings.html). + ::: ''; }; settingsFile = mkOption { type = types.path; default = "${runDir}/settings.yml"; - description = '' + description = lib.mdDoc '' The path of the Searx server settings.yml file. If no file is specified, a default file is used (default config file has debug mode enabled). Note: setting this options overrides - . - - - This file, along with any secret key it contains, will be copied - into the world-readable Nix store. - - + [](#opt-services.searx.settings). + + ::: {.warning} + This file, along with any secret key it contains, will be copied + into the world-readable Nix store. + ::: ''; }; @@ -123,15 +121,14 @@ in runInUwsgi = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to run searx in uWSGI as a "vassal", instead of using its built-in HTTP server. This is the recommended mode for public or large instances, but is unecessary for LAN or local-only use. - - - The built-in HTTP server logs all queries by default. - - + + ::: {.warning} + The built-in HTTP server logs all queries by default. + ::: ''; }; diff --git a/nixos/modules/services/networking/shellhub-agent.nix b/nixos/modules/services/networking/shellhub-agent.nix index c13f183d4fe..ad33c50f9d6 100644 --- a/nixos/modules/services/networking/shellhub-agent.nix +++ b/nixos/modules/services/networking/shellhub-agent.nix @@ -12,7 +12,7 @@ in services.shellhub-agent = { - enable = mkEnableOption "ShellHub Agent daemon"; + enable = mkEnableOption (lib.mdDoc "ShellHub Agent daemon"); package = mkPackageOption pkgs "shellhub-agent" { }; diff --git a/nixos/modules/services/networking/shorewall.nix b/nixos/modules/services/networking/shorewall.nix index 795295d1628..ba59d71120d 100644 --- a/nixos/modules/services/networking/shorewall.nix +++ b/nixos/modules/services/networking/shorewall.nix @@ -8,15 +8,14 @@ in { enable = lib.mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to enable Shorewall IPv4 Firewall. - - - Enabling this service WILL disable the existing NixOS - firewall! Default firewall rules provided by packages are not - considered at the moment. - - + + ::: {.warning} + Enabling this service WILL disable the existing NixOS + firewall! Default firewall rules provided by packages are not + considered at the moment. + ::: ''; }; package = lib.mkOption { diff --git a/nixos/modules/services/networking/shorewall6.nix b/nixos/modules/services/networking/shorewall6.nix index 1d6d84eb89b..e54be290bfb 100644 --- a/nixos/modules/services/networking/shorewall6.nix +++ b/nixos/modules/services/networking/shorewall6.nix @@ -8,15 +8,14 @@ in { enable = lib.mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to enable Shorewall IPv6 Firewall. - - - Enabling this service WILL disable the existing NixOS - firewall! Default firewall rules provided by packages are not - considered at the moment. - - + + ::: {.warning} + Enabling this service WILL disable the existing NixOS + firewall! Default firewall rules provided by packages are not + considered at the moment. + ::: ''; }; package = lib.mkOption { diff --git a/nixos/modules/services/networking/shout.nix b/nixos/modules/services/networking/shout.nix index 1ef21ad5bf8..0b1687d44d9 100644 --- a/nixos/modules/services/networking/shout.nix +++ b/nixos/modules/services/networking/shout.nix @@ -23,7 +23,7 @@ let in { options.services.shout = { - enable = mkEnableOption "Shout web IRC client"; + enable = mkEnableOption (lib.mdDoc "Shout web IRC client"); private = mkOption { type = types.bool; diff --git a/nixos/modules/services/networking/skydns.nix b/nixos/modules/services/networking/skydns.nix index f73a8718841..84cf6b0deac 100644 --- a/nixos/modules/services/networking/skydns.nix +++ b/nixos/modules/services/networking/skydns.nix @@ -7,7 +7,7 @@ let in { options.services.skydns = { - enable = mkEnableOption "skydns service"; + enable = mkEnableOption (lib.mdDoc "skydns service"); etcd = { machines = mkOption { diff --git a/nixos/modules/services/networking/smartdns.nix b/nixos/modules/services/networking/smartdns.nix index aa132747885..af8ee8b00c0 100644 --- a/nixos/modules/services/networking/smartdns.nix +++ b/nixos/modules/services/networking/smartdns.nix @@ -20,7 +20,7 @@ let } cfg.settings); in { options.services.smartdns = { - enable = mkEnableOption "SmartDNS DNS server"; + enable = mkEnableOption (lib.mdDoc "SmartDNS DNS server"); bindPort = mkOption { type = types.port; diff --git a/nixos/modules/services/networking/smokeping.nix b/nixos/modules/services/networking/smokeping.nix index 7f1abcc6824..df4f8905ec6 100644 --- a/nixos/modules/services/networking/smokeping.nix +++ b/nixos/modules/services/networking/smokeping.nix @@ -82,8 +82,10 @@ in config = mkOption { type = types.nullOr types.lines; default = null; - description = "Full smokeping config supplied by the user. Overrides " + - "and replaces any other configuration supplied."; + description = lib.mdDoc '' + Full smokeping config supplied by the user. Overrides + and replaces any other configuration supplied. + ''; }; databaseConfig = mkOption { type = types.lines; diff --git a/nixos/modules/services/networking/sniproxy.nix b/nixos/modules/services/networking/sniproxy.nix index dedeb96f736..b805b7b44d7 100644 --- a/nixos/modules/services/networking/sniproxy.nix +++ b/nixos/modules/services/networking/sniproxy.nix @@ -18,7 +18,7 @@ in options = { services.sniproxy = { - enable = mkEnableOption "sniproxy server"; + enable = mkEnableOption (lib.mdDoc "sniproxy server"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/snowflake-proxy.nix b/nixos/modules/services/networking/snowflake-proxy.nix index d759b07e8bf..7299db7a53e 100644 --- a/nixos/modules/services/networking/snowflake-proxy.nix +++ b/nixos/modules/services/networking/snowflake-proxy.nix @@ -8,7 +8,7 @@ in { options = { services.snowflake-proxy = { - enable = mkEnableOption "System to defeat internet censorship"; + enable = mkEnableOption (lib.mdDoc "System to defeat internet censorship"); broker = mkOption { description = lib.mdDoc "Broker URL (default \"https://snowflake-broker.torproject.net/\")"; diff --git a/nixos/modules/services/networking/softether.nix b/nixos/modules/services/networking/softether.nix index 47d10bf64ca..8d69b5304c8 100644 --- a/nixos/modules/services/networking/softether.nix +++ b/nixos/modules/services/networking/softether.nix @@ -16,7 +16,7 @@ in services.softether = { - enable = mkEnableOption "SoftEther VPN services"; + enable = mkEnableOption (lib.mdDoc "SoftEther VPN services"); package = mkOption { type = types.package; @@ -27,12 +27,12 @@ in ''; }; - vpnserver.enable = mkEnableOption "SoftEther VPN Server"; + vpnserver.enable = mkEnableOption (lib.mdDoc "SoftEther VPN Server"); - vpnbridge.enable = mkEnableOption "SoftEther VPN Bridge"; + vpnbridge.enable = mkEnableOption (lib.mdDoc "SoftEther VPN Bridge"); vpnclient = { - enable = mkEnableOption "SoftEther VPN Client"; + enable = mkEnableOption (lib.mdDoc "SoftEther VPN Client"); up = mkOption { type = types.lines; default = ""; diff --git a/nixos/modules/services/networking/soju.nix b/nixos/modules/services/networking/soju.nix index dddacea2004..d4c4ca47bc8 100644 --- a/nixos/modules/services/networking/soju.nix +++ b/nixos/modules/services/networking/soju.nix @@ -27,7 +27,7 @@ in ###### interface options.services.soju = { - enable = mkEnableOption "soju"; + enable = mkEnableOption (lib.mdDoc "soju"); listen = mkOption { type = types.listOf types.str; @@ -79,7 +79,7 @@ in acceptProxyIP = mkOption { type = types.listOf types.str; default = []; - description = '' + description = lib.mdDoc '' Allow the specified IPs to act as a proxy. Proxys have the ability to overwrite the remote and local connection addresses (via the X-Forwarded-\* HTTP header fields). The special name "localhost" accepts the loopback diff --git a/nixos/modules/services/networking/solanum.nix b/nixos/modules/services/networking/solanum.nix index daa3650fc99..07a37279fec 100644 --- a/nixos/modules/services/networking/solanum.nix +++ b/nixos/modules/services/networking/solanum.nix @@ -16,7 +16,7 @@ in services.solanum = { - enable = mkEnableOption "Solanum IRC daemon"; + enable = mkEnableOption (lib.mdDoc "Solanum IRC daemon"); config = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/spacecookie.nix b/nixos/modules/services/networking/spacecookie.nix index 4aa76de6f41..b2956edfcb7 100644 --- a/nixos/modules/services/networking/spacecookie.nix +++ b/nixos/modules/services/networking/spacecookie.nix @@ -25,7 +25,7 @@ in { services.spacecookie = { - enable = mkEnableOption "spacecookie"; + enable = mkEnableOption (lib.mdDoc "spacecookie"); package = mkOption { type = types.package; @@ -90,7 +90,7 @@ in { }; options.log = { - enable = mkEnableOption "logging for spacecookie" + enable = mkEnableOption (lib.mdDoc "logging for spacecookie") // { default = true; example = false; }; hide-ips = mkOption { diff --git a/nixos/modules/services/networking/sslh.nix b/nixos/modules/services/networking/sslh.nix index 03c0bd23141..9d76d69152f 100644 --- a/nixos/modules/services/networking/sslh.nix +++ b/nixos/modules/services/networking/sslh.nix @@ -43,7 +43,7 @@ in options = { services.sslh = { - enable = mkEnableOption "sslh"; + enable = mkEnableOption (lib.mdDoc "sslh"); verbose = mkOption { type = types.bool; diff --git a/nixos/modules/services/networking/strongswan-swanctl/module.nix b/nixos/modules/services/networking/strongswan-swanctl/module.nix index a92834f0ecf..c51e8ad9f5f 100644 --- a/nixos/modules/services/networking/strongswan-swanctl/module.nix +++ b/nixos/modules/services/networking/strongswan-swanctl/module.nix @@ -8,7 +8,7 @@ let swanctlParams = import ./swanctl-params.nix lib; in { options.services.strongswan-swanctl = { - enable = mkEnableOption "strongswan-swanctl service"; + enable = mkEnableOption (lib.mdDoc "strongswan-swanctl service"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/networking/strongswan.nix b/nixos/modules/services/networking/strongswan.nix index f1b0a3f0d3b..8b1398bfd47 100644 --- a/nixos/modules/services/networking/strongswan.nix +++ b/nixos/modules/services/networking/strongswan.nix @@ -51,7 +51,7 @@ let in { options.services.strongswan = { - enable = mkEnableOption "strongSwan"; + enable = mkEnableOption (lib.mdDoc "strongSwan"); secrets = mkOption { type = types.listOf types.str; diff --git a/nixos/modules/services/networking/stubby.nix b/nixos/modules/services/networking/stubby.nix index f9d6869ad97..491371e468e 100644 --- a/nixos/modules/services/networking/stubby.nix +++ b/nixos/modules/services/networking/stubby.nix @@ -23,7 +23,7 @@ in { options = { services.stubby = { - enable = mkEnableOption "Stubby DNS resolver"; + enable = mkEnableOption (lib.mdDoc "Stubby DNS resolver"); settings = mkOption { type = types.attrsOf settingsFormat.type; diff --git a/nixos/modules/services/networking/supybot.nix b/nixos/modules/services/networking/supybot.nix index df7d92189a7..22ba015cc55 100644 --- a/nixos/modules/services/networking/supybot.nix +++ b/nixos/modules/services/networking/supybot.nix @@ -67,10 +67,10 @@ in type = types.functionTo (types.listOf types.package); default = p: []; defaultText = literalExpression "p: []"; - description = '' + description = lib.mdDoc '' Extra Python packages available to supybot plugins. The value must be a function which receives the attrset defined - in python3Packages as the sole argument. + in {var}`python3Packages` as the sole argument. ''; example = literalExpression "p: [ p.lxml p.requests ]"; }; diff --git a/nixos/modules/services/networking/syncthing-relay.nix b/nixos/modules/services/networking/syncthing-relay.nix index e92557d6545..64c4e731b98 100644 --- a/nixos/modules/services/networking/syncthing-relay.nix +++ b/nixos/modules/services/networking/syncthing-relay.nix @@ -22,7 +22,7 @@ in { ###### interface options.services.syncthing.relay = { - enable = mkEnableOption "Syncthing relay service"; + enable = mkEnableOption (lib.mdDoc "Syncthing relay service"); listenAddress = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix index 2b029be19cf..0b6b4bf9e5c 100644 --- a/nixos/modules/services/networking/syncthing.nix +++ b/nixos/modules/services/networking/syncthing.nix @@ -74,7 +74,7 @@ in { services.syncthing = { enable = mkEnableOption - "Syncthing, a self-hosted open-source alternative to Dropbox and Bittorrent Sync"; + (lib.mdDoc "Syncthing, a self-hosted open-source alternative to Dropbox and Bittorrent Sync"); cert = mkOption { type = types.nullOr types.str; diff --git a/nixos/modules/services/networking/tailscale.nix b/nixos/modules/services/networking/tailscale.nix index 12ac6d6da5a..eb3afe118c6 100644 --- a/nixos/modules/services/networking/tailscale.nix +++ b/nixos/modules/services/networking/tailscale.nix @@ -12,7 +12,7 @@ in { meta.maintainers = with maintainers; [ danderson mbaillie twitchyliquid64 ]; options.services.tailscale = { - enable = mkEnableOption "Tailscale client daemon"; + enable = mkEnableOption (lib.mdDoc "Tailscale client daemon"); port = mkOption { type = types.port; diff --git a/nixos/modules/services/networking/tedicross.nix b/nixos/modules/services/networking/tedicross.nix index 3d7f298efac..cee7e11f4fb 100644 --- a/nixos/modules/services/networking/tedicross.nix +++ b/nixos/modules/services/networking/tedicross.nix @@ -13,7 +13,7 @@ let in { options = { services.tedicross = { - enable = mkEnableOption "the TediCross Telegram-Discord bridge service"; + enable = mkEnableOption (lib.mdDoc "the TediCross Telegram-Discord bridge service"); config = mkOption { type = types.attrs; diff --git a/nixos/modules/services/networking/teleport.nix b/nixos/modules/services/networking/teleport.nix index d03648df34b..802907a00dc 100644 --- a/nixos/modules/services/networking/teleport.nix +++ b/nixos/modules/services/networking/teleport.nix @@ -9,7 +9,7 @@ in { options = { services.teleport = with lib.types; { - enable = mkEnableOption "the Teleport service"; + enable = mkEnableOption (lib.mdDoc "the Teleport service"); settings = mkOption { type = settingsYaml.type; @@ -41,7 +41,7 @@ in ''; }; - insecure.enable = mkEnableOption '' + insecure.enable = mkEnableOption (lib.mdDoc '' starting teleport in insecure mode. This is dangerous! @@ -49,14 +49,14 @@ in Proceed with caution! Teleport starts with disabled certificate validation on Proxy Service, validation still occurs on Auth Service - ''; + ''); diag = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' endpoints for monitoring purposes. - See - ''; + See + ''); addr = mkOption { type = str; diff --git a/nixos/modules/services/networking/tetrd.nix b/nixos/modules/services/networking/tetrd.nix index 0801ce12924..6284a5b1fb1 100644 --- a/nixos/modules/services/networking/tetrd.nix +++ b/nixos/modules/services/networking/tetrd.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: { - options.services.tetrd.enable = lib.mkEnableOption "tetrd"; + options.services.tetrd.enable = lib.mkEnableOption (lib.mdDoc "tetrd"); config = lib.mkIf config.services.tetrd.enable { environment = { diff --git a/nixos/modules/services/networking/thelounge.nix b/nixos/modules/services/networking/thelounge.nix index 8db541d8072..a188ffe866b 100644 --- a/nixos/modules/services/networking/thelounge.nix +++ b/nixos/modules/services/networking/thelounge.nix @@ -23,7 +23,7 @@ in imports = [ (mkRemovedOptionModule [ "services" "thelounge" "private" ] "The option was renamed to `services.thelounge.public` to follow upstream changes.") ]; options.services.thelounge = { - enable = mkEnableOption "The Lounge web IRC client"; + enable = mkEnableOption (lib.mdDoc "The Lounge web IRC client"); public = mkOption { type = types.bool; diff --git a/nixos/modules/services/networking/tox-node.nix b/nixos/modules/services/networking/tox-node.nix index 9371066be8e..fa5b241f918 100644 --- a/nixos/modules/services/networking/tox-node.nix +++ b/nixos/modules/services/networking/tox-node.nix @@ -28,7 +28,7 @@ let in { options.services.tox-node = { - enable = mkEnableOption "Tox Node service"; + enable = mkEnableOption (lib.mdDoc "Tox Node service"); logType = mkOption { type = types.enum [ "Stderr" "Stdout" "Syslog" "None" ]; diff --git a/nixos/modules/services/networking/toxvpn.nix b/nixos/modules/services/networking/toxvpn.nix index 618726b0640..d0ff5bc4e81 100644 --- a/nixos/modules/services/networking/toxvpn.nix +++ b/nixos/modules/services/networking/toxvpn.nix @@ -5,7 +5,7 @@ with lib; { options = { services.toxvpn = { - enable = mkEnableOption "toxvpn running on startup"; + enable = mkEnableOption (lib.mdDoc "toxvpn running on startup"); localip = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/tvheadend.nix b/nixos/modules/services/networking/tvheadend.nix index dd5fa209be6..466dbbccad5 100644 --- a/nixos/modules/services/networking/tvheadend.nix +++ b/nixos/modules/services/networking/tvheadend.nix @@ -9,7 +9,7 @@ in { options = { services.tvheadend = { - enable = mkEnableOption "Tvheadend"; + enable = mkEnableOption (lib.mdDoc "Tvheadend"); httpPort = mkOption { type = types.int; default = 9981; diff --git a/nixos/modules/services/networking/ucarp.nix b/nixos/modules/services/networking/ucarp.nix index 7e8b1026db7..1214cec63f5 100644 --- a/nixos/modules/services/networking/ucarp.nix +++ b/nixos/modules/services/networking/ucarp.nix @@ -28,7 +28,7 @@ let ); in { options.networking.ucarp = { - enable = mkEnableOption "ucarp, userspace implementation of CARP"; + enable = mkEnableOption (lib.mdDoc "ucarp, userspace implementation of CARP"); interface = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/unbound.nix b/nixos/modules/services/networking/unbound.nix index 5bbb0f79d57..fa24c70e63d 100644 --- a/nixos/modules/services/networking/unbound.nix +++ b/nixos/modules/services/networking/unbound.nix @@ -40,7 +40,7 @@ in { options = { services.unbound = { - enable = mkEnableOption "Unbound domain name server"; + enable = mkEnableOption (lib.mdDoc "Unbound domain name server"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/networking/uptermd.nix b/nixos/modules/services/networking/uptermd.nix index 387478de99e..f824d617f59 100644 --- a/nixos/modules/services/networking/uptermd.nix +++ b/nixos/modules/services/networking/uptermd.nix @@ -8,7 +8,7 @@ in { options = { services.uptermd = { - enable = mkEnableOption "uptermd"; + enable = mkEnableOption (lib.mdDoc "uptermd"); openFirewall = mkOption { type = types.bool; diff --git a/nixos/modules/services/networking/vsftpd.nix b/nixos/modules/services/networking/vsftpd.nix index 215d1ac23d4..5fee7b66a4d 100644 --- a/nixos/modules/services/networking/vsftpd.nix +++ b/nixos/modules/services/networking/vsftpd.nix @@ -150,7 +150,7 @@ in services.vsftpd = { - enable = mkEnableOption "vsftpd"; + enable = mkEnableOption (lib.mdDoc "vsftpd"); userlist = mkOption { default = []; diff --git a/nixos/modules/services/networking/wasabibackend.nix b/nixos/modules/services/networking/wasabibackend.nix index 00d772a718c..938145b35ee 100644 --- a/nixos/modules/services/networking/wasabibackend.nix +++ b/nixos/modules/services/networking/wasabibackend.nix @@ -29,7 +29,7 @@ in { options = { services.wasabibackend = { - enable = mkEnableOption "Wasabi backend service"; + enable = mkEnableOption (lib.mdDoc "Wasabi backend service"); dataDir = mkOption { type = types.path; diff --git a/nixos/modules/services/networking/wg-netmanager.nix b/nixos/modules/services/networking/wg-netmanager.nix index 493ff7ceba9..b260c573726 100644 --- a/nixos/modules/services/networking/wg-netmanager.nix +++ b/nixos/modules/services/networking/wg-netmanager.nix @@ -9,7 +9,7 @@ in options = { services.wg-netmanager = { - enable = mkEnableOption "Wireguard network manager"; + enable = mkEnableOption (lib.mdDoc "Wireguard network manager"); }; }; diff --git a/nixos/modules/services/networking/wireguard.nix b/nixos/modules/services/networking/wireguard.nix index 9017c53f4e5..23b3008f02d 100644 --- a/nixos/modules/services/networking/wireguard.nix +++ b/nixos/modules/services/networking/wireguard.nix @@ -194,19 +194,20 @@ let default = null; example = "demo.wireguard.io:12913"; type = with types; nullOr str; - description = ''Endpoint IP or hostname of the peer, followed by a colon, - and then a port number of the peer. + description = lib.mdDoc '' + Endpoint IP or hostname of the peer, followed by a colon, + and then a port number of the peer. - Warning for endpoints with changing IPs: - The WireGuard kernel side cannot perform DNS resolution. - Thus DNS resolution is done once by the wg userspace - utility, when setting up WireGuard. Consequently, if the IP address - behind the name changes, WireGuard will not notice. - This is especially common for dynamic-DNS setups, but also applies to - any other DNS-based setup. - If you do not use IP endpoints, you likely want to set - - to refresh the IPs periodically. + Warning for endpoints with changing IPs: + The WireGuard kernel side cannot perform DNS resolution. + Thus DNS resolution is done once by the `wg` userspace + utility, when setting up WireGuard. Consequently, if the IP address + behind the name changes, WireGuard will not notice. + This is especially common for dynamic-DNS setups, but also applies to + any other DNS-based setup. + If you do not use IP endpoints, you likely want to set + {option}`networking.wireguard.dynamicEndpointRefreshSeconds` + to refresh the IPs periodically. ''; }; diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix index 72b665f411f..6c58bcfbbf1 100644 --- a/nixos/modules/services/networking/wpa_supplicant.nix +++ b/nixos/modules/services/networking/wpa_supplicant.nix @@ -164,19 +164,19 @@ let in { options = { networking.wireless = { - enable = mkEnableOption "wpa_supplicant"; + enable = mkEnableOption (lib.mdDoc "wpa_supplicant"); interfaces = mkOption { type = types.listOf types.str; default = []; example = [ "wlan0" "wlan1" ]; - description = '' - The interfaces wpa_supplicant will use. If empty, it will + description = lib.mdDoc '' + The interfaces {command}`wpa_supplicant` will use. If empty, it will automatically use all wireless interfaces. - - A separate wpa_supplicant instance will be started for each interface. - + ::: {.note} + A separate wpa_supplicant instance will be started for each interface. + ::: ''; }; @@ -186,7 +186,7 @@ in { description = lib.mdDoc "Force a specific wpa_supplicant driver."; }; - allowAuxiliaryImperativeNetworks = mkEnableOption "support for imperative & declarative networks" // { + allowAuxiliaryImperativeNetworks = mkEnableOption (lib.mdDoc "support for imperative & declarative networks") // { description = '' Whether to allow configuring networks "imperatively" (e.g. via wpa_supplicant_gui) and declaratively via @@ -222,24 +222,24 @@ in { type = types.nullOr types.path; default = null; example = "/run/secrets/wireless.env"; - description = '' - File consisting of lines of the form varname=value + description = lib.mdDoc '' + File consisting of lines of the form `varname=value` to define variables for the wireless configuration. - See section "EnvironmentFile=" in systemd.exec5 for a syntax reference. + See section "EnvironmentFile=" in {manpage}`systemd.exec(5)` for a syntax reference. Secrets (PSKs, passwords, etc.) can be provided without adding them to the world-readable Nix store by defining them in the environment file and - referring to them in option - with the syntax @varname@. Example: + referring to them in option {option}`networking.wireless.networks` + with the syntax `@varname@`. Example: - + ``` # content of /run/secrets/wireless.env PSK_HOME=mypassword PASS_WORK=myworkpassword - + ``` - + ``` # wireless-related configuration networking.wireless.environmentFile = "/run/secrets/wireless.env"; networking.wireless.networks = { @@ -250,7 +250,7 @@ in { password="@PASS_WORK@" '''; }; - + ``` ''; }; @@ -260,36 +260,36 @@ in { psk = mkOption { type = types.nullOr types.str; default = null; - description = '' + description = lib.mdDoc '' The network's pre-shared key in plaintext defaulting to being a network without any authentication. - - Be aware that this will be written to the nix store - in plaintext! Use an environment variable instead. - + ::: {.warning} + Be aware that this will be written to the nix store + in plaintext! Use an environment variable instead. + ::: - - Mutually exclusive with pskRaw. - + ::: {.note} + Mutually exclusive with {var}`pskRaw`. + ::: ''; }; pskRaw = mkOption { type = types.nullOr types.str; default = null; - description = '' + description = lib.mdDoc '' The network's pre-shared key in hex defaulting to being a network without any authentication. - - Be aware that this will be written to the nix store - in plaintext! Use an environment variable instead. - + ::: {.warning} + Be aware that this will be written to the nix store + in plaintext! Use an environment variable instead. + ::: - - Mutually exclusive with psk. - + ::: {.note} + Mutually exclusive with {var}`psk`. + ::: ''; }; @@ -343,21 +343,21 @@ in { identity="user@example.com" password="@EXAMPLE_PASSWORD@" ''; - description = '' + description = lib.mdDoc '' Use this option to configure advanced authentication methods like EAP. See - wpa_supplicant.conf5 + {manpage}`wpa_supplicant.conf(5)` for example configurations. - - Be aware that this will be written to the nix store - in plaintext! Use an environment variable for secrets. - + ::: {.warning} + Be aware that this will be written to the nix store + in plaintext! Use an environment variable for secrets. + ::: - - Mutually exclusive with psk and - pskRaw. - + ::: {.note} + Mutually exclusive with {var}`psk` and + {var}`pskRaw`. + ::: ''; }; diff --git a/nixos/modules/services/networking/x2goserver.nix b/nixos/modules/services/networking/x2goserver.nix index a1e096c19a2..1242229a0b6 100644 --- a/nixos/modules/services/networking/x2goserver.nix +++ b/nixos/modules/services/networking/x2goserver.nix @@ -22,16 +22,16 @@ in { ]; options.services.x2goserver = { - enable = mkEnableOption "x2goserver" // { - description = '' + enable = mkEnableOption (lib.mdDoc "x2goserver") // { + description = lib.mdDoc '' Enables the x2goserver module. NOTE: This will create a good amount of symlinks in `/usr/local/bin` ''; }; superenicer = { - enable = mkEnableOption "superenicer" // { - description = '' + enable = mkEnableOption (lib.mdDoc "superenicer") // { + description = lib.mdDoc '' Enables the SupeReNicer code in x2gocleansessions, this will renice suspended sessions to nice level 19 and renice them to level 0 if the session becomes marked as running again diff --git a/nixos/modules/services/networking/xandikos.nix b/nixos/modules/services/networking/xandikos.nix index 649e9c7a668..6d1ddc74c71 100644 --- a/nixos/modules/services/networking/xandikos.nix +++ b/nixos/modules/services/networking/xandikos.nix @@ -9,7 +9,7 @@ in options = { services.xandikos = { - enable = mkEnableOption "Xandikos CalDAV and CardDAV server"; + enable = mkEnableOption (lib.mdDoc "Xandikos CalDAV and CardDAV server"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/networking/xinetd.nix b/nixos/modules/services/networking/xinetd.nix index 6c633d4ead1..2ec0cd18dcb 100644 --- a/nixos/modules/services/networking/xinetd.nix +++ b/nixos/modules/services/networking/xinetd.nix @@ -44,7 +44,7 @@ in options = { - services.xinetd.enable = mkEnableOption "the xinetd super-server daemon"; + services.xinetd.enable = mkEnableOption (lib.mdDoc "the xinetd super-server daemon"); services.xinetd.extraDefaults = mkOption { default = ""; @@ -105,7 +105,7 @@ in flags = mkOption { type = types.str; default = ""; - description = ""; + description = lib.mdDoc ""; }; unlisted = mkOption { diff --git a/nixos/modules/services/networking/xl2tpd.nix b/nixos/modules/services/networking/xl2tpd.nix index c30a541d30e..8f710bca322 100644 --- a/nixos/modules/services/networking/xl2tpd.nix +++ b/nixos/modules/services/networking/xl2tpd.nix @@ -5,7 +5,7 @@ with lib; { options = { services.xl2tpd = { - enable = mkEnableOption "xl2tpd, the Layer 2 Tunnelling Protocol Daemon"; + enable = mkEnableOption (lib.mdDoc "xl2tpd, the Layer 2 Tunnelling Protocol Daemon"); serverIp = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/xrdp.nix b/nixos/modules/services/networking/xrdp.nix index 761f576495a..554fb66f36e 100644 --- a/nixos/modules/services/networking/xrdp.nix +++ b/nixos/modules/services/networking/xrdp.nix @@ -42,7 +42,7 @@ in services.xrdp = { - enable = mkEnableOption "xrdp, the Remote Desktop Protocol server"; + enable = mkEnableOption (lib.mdDoc "xrdp, the Remote Desktop Protocol server"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/networking/yggdrasil.nix b/nixos/modules/services/networking/yggdrasil.nix index e7513c5627c..620ace2d8c8 100644 --- a/nixos/modules/services/networking/yggdrasil.nix +++ b/nixos/modules/services/networking/yggdrasil.nix @@ -17,7 +17,7 @@ in { options = with types; { services.yggdrasil = { - enable = mkEnableOption "the yggdrasil system service"; + enable = mkEnableOption (lib.mdDoc "the yggdrasil system service"); settings = mkOption { type = format.type; @@ -109,11 +109,11 @@ in { description = lib.mdDoc "Yggdrasil package to use."; }; - persistentKeys = mkEnableOption '' + persistentKeys = mkEnableOption (lib.mdDoc '' If enabled then keys will be generated once and Yggdrasil will retain the same IPv6 address when the service is restarted. Keys are stored at ${keysPath}. - ''; + ''); }; }; diff --git a/nixos/modules/services/networking/zerobin.nix b/nixos/modules/services/networking/zerobin.nix index 0be694915cb..9e07666f3e1 100644 --- a/nixos/modules/services/networking/zerobin.nix +++ b/nixos/modules/services/networking/zerobin.nix @@ -12,7 +12,7 @@ in { options = { services.zerobin = { - enable = mkEnableOption "0bin"; + enable = mkEnableOption (lib.mdDoc "0bin"); dataDir = mkOption { type = types.str; diff --git a/nixos/modules/services/networking/zeronet.nix b/nixos/modules/services/networking/zeronet.nix index 2245204d455..1f3711bd0d7 100644 --- a/nixos/modules/services/networking/zeronet.nix +++ b/nixos/modules/services/networking/zeronet.nix @@ -17,7 +17,7 @@ let }; in with lib; { options.services.zeronet = { - enable = mkEnableOption "zeronet"; + enable = mkEnableOption (lib.mdDoc "zeronet"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/networking/zerotierone.nix b/nixos/modules/services/networking/zerotierone.nix index 572ae2e929d..30f75cd85d4 100644 --- a/nixos/modules/services/networking/zerotierone.nix +++ b/nixos/modules/services/networking/zerotierone.nix @@ -6,7 +6,7 @@ let cfg = config.services.zerotierone; in { - options.services.zerotierone.enable = mkEnableOption "ZeroTierOne"; + options.services.zerotierone.enable = mkEnableOption (lib.mdDoc "ZeroTierOne"); options.services.zerotierone.joinNetworks = mkOption { default = []; diff --git a/nixos/modules/services/networking/znc/default.nix b/nixos/modules/services/networking/znc/default.nix index 7ca28700dae..2befab373ba 100644 --- a/nixos/modules/services/networking/znc/default.nix +++ b/nixos/modules/services/networking/znc/default.nix @@ -81,7 +81,7 @@ in options = { services.znc = { - enable = mkEnableOption "ZNC"; + enable = mkEnableOption (lib.mdDoc "ZNC"); user = mkOption { default = "znc"; @@ -149,27 +149,27 @@ in }; } ''; - description = '' + description = lib.mdDoc '' Configuration for ZNC, see - for details. The + for details. The Nix value declared here will be translated directly to the xml-like format ZNC expects. This is much more flexible than the legacy options - under , but also can't do + under {option}`services.znc.confOptions.*`, but also can't do any type checking. - You can use nix-instantiate --eval --strict '<nixpkgs/nixos>' -A config.services.znc.config + You can use {command}`nix-instantiate --eval --strict '' -A config.services.znc.config` to view the current value. By default it contains a listener for port 5000 with SSL enabled. - Nix attributes called extraConfig will be inserted + Nix attributes called `extraConfig` will be inserted verbatim into the resulting config file. - If is turned on, the - option values in will be + If {option}`services.znc.useLegacyConfig` is turned on, the + option values in {option}`services.znc.confOptions.*` will be gracefully be applied to this option. If you intend to update the configuration through this option, be sure - to enable , otherwise none of the + to enable {option}`services.znc.mutable`, otherwise none of the changes here will be applied after the initial deploy. ''; }; diff --git a/nixos/modules/services/networking/znc/options.nix b/nixos/modules/services/networking/znc/options.nix index 9d472abdf48..ce8e7a89a4d 100644 --- a/nixos/modules/services/networking/znc/options.nix +++ b/nixos/modules/services/networking/znc/options.nix @@ -97,18 +97,18 @@ in useLegacyConfig = mkOption { default = true; type = types.bool; - description = '' + description = lib.mdDoc '' Whether to propagate the legacy options under - to the znc config. If this + {option}`services.znc.confOptions.*` to the znc config. If this is turned on, the znc config will contain a user with the default name "znc", global modules "webadmin" and "adminlog" will be enabled by default, and more, all controlled through the - options. - You can use nix-instantiate --eval --strict '<nixpkgs/nixos>' -A config.services.znc.config + {option}`services.znc.confOptions.*` options. + You can use {command}`nix-instantiate --eval --strict '' -A config.services.znc.config` to view the current value of the config. In any case, if you need more flexibility, - can be used to override/add to + {option}`services.znc.config` can be used to override/add to all of the legacy options. ''; }; @@ -177,11 +177,11 @@ in </Pass> ''; type = types.str; - description = '' - Generate with nix-shell -p znc --command "znc --makepass". + description = lib.mdDoc '' + Generate with {command}`nix-shell -p znc --command "znc --makepass"`. This is the password used to log in to the ZNC web admin interface. You can also set this through - + {option}`services.znc.config.User..Pass.Method` and co. ''; }; diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix index 8f1c3d9c525..fea7ffb673c 100644 --- a/nixos/modules/services/printing/cupsd.nix +++ b/nixos/modules/services/printing/cupsd.nix @@ -167,7 +167,7 @@ in type = types.lines; internal = true; default = ""; - description = '' + description = lib.mdDoc '' Additional commands executed while creating the directory containing the CUPS server binaries. ''; diff --git a/nixos/modules/services/search/elasticsearch-curator.nix b/nixos/modules/services/search/elasticsearch-curator.nix index da3b0dc9d71..f073ec7cf2b 100644 --- a/nixos/modules/services/search/elasticsearch-curator.nix +++ b/nixos/modules/services/search/elasticsearch-curator.nix @@ -37,7 +37,7 @@ in { options.services.elasticsearch-curator = { - enable = mkEnableOption "elasticsearch curator"; + enable = mkEnableOption (lib.mdDoc "elasticsearch curator"); interval = mkOption { description = lib.mdDoc "The frequency to run curator, a systemd.time such as 'hourly'"; default = "hourly"; diff --git a/nixos/modules/services/search/kibana.nix b/nixos/modules/services/search/kibana.nix index c945ef4c89d..ffc7c4b68ca 100644 --- a/nixos/modules/services/search/kibana.nix +++ b/nixos/modules/services/search/kibana.nix @@ -32,7 +32,7 @@ let in { options.services.kibana = { - enable = mkEnableOption "kibana service"; + enable = mkEnableOption (lib.mdDoc "kibana service"); listenAddress = mkOption { description = lib.mdDoc "Kibana listening host"; @@ -122,13 +122,13 @@ in { }; certificateAuthorities = mkOption { - description = '' + description = lib.mdDoc '' CA files to auth against elasticsearch. - Please use the option when using kibana < 5.4 + Please use the {option}`ca` option when using kibana \< 5.4 because those old versions don't support setting multiple CA's. - This defaults to the singleton list [ca] when the option is defined. + This defaults to the singleton list [ca] when the {option}`ca` option is defined. ''; default = if cfg.elasticsearch.ca == null then [] else [ca]; defaultText = literalExpression '' diff --git a/nixos/modules/services/search/meilisearch.nix b/nixos/modules/services/search/meilisearch.nix index 496200b8081..9262b927cba 100644 --- a/nixos/modules/services/search/meilisearch.nix +++ b/nixos/modules/services/search/meilisearch.nix @@ -16,7 +16,7 @@ in ###### interface options.services.meilisearch = { - enable = mkEnableOption "MeiliSearch - a RESTful search API"; + enable = mkEnableOption (lib.mdDoc "MeiliSearch - a RESTful search API"); package = mkOption { description = lib.mdDoc "The package to use for meilisearch. Use this if you require specific features to be enabled. The default package has no features."; diff --git a/nixos/modules/services/search/solr.nix b/nixos/modules/services/search/solr.nix index ea8a2d6f927..48570412b0c 100644 --- a/nixos/modules/services/search/solr.nix +++ b/nixos/modules/services/search/solr.nix @@ -11,7 +11,7 @@ in { options = { services.solr = { - enable = mkEnableOption "Solr"; + enable = mkEnableOption (lib.mdDoc "Solr"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/security/aesmd.nix b/nixos/modules/services/security/aesmd.nix index 2f7deb7c849..7b0a46d6d02 100644 --- a/nixos/modules/services/security/aesmd.nix +++ b/nixos/modules/services/security/aesmd.nix @@ -19,7 +19,7 @@ let in { options.services.aesmd = { - enable = mkEnableOption "Intel's Architectural Enclave Service Manager (AESM) for Intel SGX"; + enable = mkEnableOption (lib.mdDoc "Intel's Architectural Enclave Service Manager (AESM) for Intel SGX"); debug = mkOption { type = types.bool; default = false; diff --git a/nixos/modules/services/security/certmgr.nix b/nixos/modules/services/security/certmgr.nix index 40a566bc960..ca4cf508472 100644 --- a/nixos/modules/services/security/certmgr.nix +++ b/nixos/modules/services/security/certmgr.nix @@ -35,7 +35,7 @@ let in { options.services.certmgr = { - enable = mkEnableOption "certmgr"; + enable = mkEnableOption (lib.mdDoc "certmgr"); package = mkOption { type = types.package; @@ -118,34 +118,34 @@ in service = mkOption { type = nullOr str; default = null; - description = "The service on which to perform <action> after fetching."; + description = lib.mdDoc "The service on which to perform \ after fetching."; }; action = mkOption { type = addCheck str (x: cfg.svcManager == "command" || elem x ["restart" "reload" "nop"]); default = "nop"; - description = "The action to take after fetching."; + description = lib.mdDoc "The action to take after fetching."; }; # These ought all to be specified according to certmgr spec def. authority = mkOption { type = attrs; - description = "certmgr spec authority object."; + description = lib.mdDoc "certmgr spec authority object."; }; certificate = mkOption { type = nullOr attrs; - description = "certmgr spec certificate object."; + description = lib.mdDoc "certmgr spec certificate object."; }; private_key = mkOption { type = nullOr attrs; - description = "certmgr spec private_key object."; + description = lib.mdDoc "certmgr spec private_key object."; }; request = mkOption { type = nullOr attrs; - description = "certmgr spec request object."; + description = lib.mdDoc "certmgr spec request object."; }; }; })); diff --git a/nixos/modules/services/security/cfssl.nix b/nixos/modules/services/security/cfssl.nix index 9408a602f13..202db98e222 100644 --- a/nixos/modules/services/security/cfssl.nix +++ b/nixos/modules/services/security/cfssl.nix @@ -6,20 +6,20 @@ let cfg = config.services.cfssl; in { options.services.cfssl = { - enable = mkEnableOption "the CFSSL CA api-server"; + enable = mkEnableOption (lib.mdDoc "the CFSSL CA api-server"); dataDir = mkOption { default = "/var/lib/cfssl"; type = types.path; - description = '' + description = lib.mdDoc '' The work directory for CFSSL. - - If left as the default value this directory will automatically be - created before the CFSSL server starts, otherwise you are - responsible for ensuring the directory exists with appropriate - ownership and permissions. - + ::: {.note} + If left as the default value this directory will automatically be + created before the CFSSL server starts, otherwise you are + responsible for ensuring the directory exists with appropriate + ownership and permissions. + ::: ''; }; diff --git a/nixos/modules/services/security/clamav.nix b/nixos/modules/services/security/clamav.nix index 1b1194d3113..34897a9ac7d 100644 --- a/nixos/modules/services/security/clamav.nix +++ b/nixos/modules/services/security/clamav.nix @@ -26,7 +26,7 @@ in options = { services.clamav = { daemon = { - enable = mkEnableOption "ClamAV clamd daemon"; + enable = mkEnableOption (lib.mdDoc "ClamAV clamd daemon"); settings = mkOption { type = with types; attrsOf (oneOf [ bool int str (listOf str) ]); @@ -38,7 +38,7 @@ in }; }; updater = { - enable = mkEnableOption "ClamAV freshclam updater"; + enable = mkEnableOption (lib.mdDoc "ClamAV freshclam updater"); frequency = mkOption { type = types.int; diff --git a/nixos/modules/services/security/fprintd.nix b/nixos/modules/services/security/fprintd.nix index 45b370009c3..28f9b5908b5 100644 --- a/nixos/modules/services/security/fprintd.nix +++ b/nixos/modules/services/security/fprintd.nix @@ -18,7 +18,7 @@ in services.fprintd = { - enable = mkEnableOption "fprintd daemon and PAM module for fingerprint readers handling"; + enable = mkEnableOption (lib.mdDoc "fprintd daemon and PAM module for fingerprint readers handling"); package = mkOption { type = types.package; @@ -31,7 +31,7 @@ in tod = { - enable = mkEnableOption "Touch OEM Drivers library support"; + enable = mkEnableOption (lib.mdDoc "Touch OEM Drivers library support"); driver = mkOption { type = types.package; diff --git a/nixos/modules/services/security/haka.nix b/nixos/modules/services/security/haka.nix index 893ab89d2a8..c93638f44d6 100644 --- a/nixos/modules/services/security/haka.nix +++ b/nixos/modules/services/security/haka.nix @@ -55,7 +55,7 @@ in services.haka = { - enable = mkEnableOption "Haka"; + enable = mkEnableOption (lib.mdDoc "Haka"); package = mkOption { default = pkgs.haka; @@ -103,9 +103,9 @@ in description = lib.mdDoc "Whether to enable pcap"; }; - nfqueue = mkEnableOption "nfqueue"; + nfqueue = mkEnableOption (lib.mdDoc "nfqueue"); - dump.enable = mkEnableOption "dump"; + dump.enable = mkEnableOption (lib.mdDoc "dump"); dump.input = mkOption { default = "/tmp/input.pcap"; example = "/path/to/file.pcap"; diff --git a/nixos/modules/services/security/haveged.nix b/nixos/modules/services/security/haveged.nix index c65d5ab2923..db12a28a7d0 100644 --- a/nixos/modules/services/security/haveged.nix +++ b/nixos/modules/services/security/haveged.nix @@ -15,10 +15,10 @@ in services.haveged = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' haveged entropy daemon, which refills /dev/random when low. NOTE: does nothing on kernels newer than 5.6. - ''; + ''); # source for the note https://github.com/jirka-h/haveged/issues/57 refill_threshold = mkOption { diff --git a/nixos/modules/services/security/hockeypuck.nix b/nixos/modules/services/security/hockeypuck.nix index 6fdad13f255..127134bc5db 100644 --- a/nixos/modules/services/security/hockeypuck.nix +++ b/nixos/modules/services/security/hockeypuck.nix @@ -7,7 +7,7 @@ in { meta.maintainers = with lib.maintainers; [ etu ]; options.services.hockeypuck = { - enable = lib.mkEnableOption "Hockeypuck OpenPGP Key Server"; + enable = lib.mkEnableOption (lib.mdDoc "Hockeypuck OpenPGP Key Server"); port = lib.mkOption { default = 11371; @@ -37,10 +37,10 @@ in { }; } ''; - description = '' + description = lib.mdDoc '' Configuration file for hockeypuck, here you can override - certain settings (loglevel and - openpgp.db.dsn) by just setting those values. + certain settings (`loglevel` and + `openpgp.db.dsn`) by just setting those values. For other settings you need to use lib.mkForce to override them. @@ -49,7 +49,7 @@ in { the database yourself. Example: - + ``` services.postgresql = { enable = true; ensureDatabases = [ "hockeypuck" ]; @@ -58,7 +58,7 @@ in { ensurePermissions."DATABASE hockeypuck" = "ALL PRIVILEGES"; }]; }; - + ``` ''; }; }; diff --git a/nixos/modules/services/security/infnoise.nix b/nixos/modules/services/security/infnoise.nix index 883185fab17..739a0a84d90 100644 --- a/nixos/modules/services/security/infnoise.nix +++ b/nixos/modules/services/security/infnoise.nix @@ -7,7 +7,7 @@ let in { options = { services.infnoise = { - enable = mkEnableOption "the Infinite Noise TRNG driver"; + enable = mkEnableOption (lib.mdDoc "the Infinite Noise TRNG driver"); fillDevRandom = mkOption { description = lib.mdDoc '' diff --git a/nixos/modules/services/security/kanidm.nix b/nixos/modules/services/security/kanidm.nix index 6429273705d..53929761b86 100644 --- a/nixos/modules/services/security/kanidm.nix +++ b/nixos/modules/services/security/kanidm.nix @@ -53,9 +53,9 @@ let in { options.services.kanidm = { - enableClient = lib.mkEnableOption "the Kanidm client"; - enableServer = lib.mkEnableOption "the Kanidm server"; - enablePam = lib.mkEnableOption "the Kanidm PAM and NSS integration."; + enableClient = lib.mkEnableOption (lib.mdDoc "the Kanidm client"); + enableServer = lib.mkEnableOption (lib.mdDoc "the Kanidm server"); + enablePam = lib.mkEnableOption (lib.mdDoc "the Kanidm PAM and NSS integration."); serverSettings = lib.mkOption { type = lib.types.submodule { diff --git a/nixos/modules/services/security/munge.nix b/nixos/modules/services/security/munge.nix index e2b0921b4bc..4d6fe33f697 100644 --- a/nixos/modules/services/security/munge.nix +++ b/nixos/modules/services/security/munge.nix @@ -15,7 +15,7 @@ in options = { services.munge = { - enable = mkEnableOption "munge service"; + enable = mkEnableOption (lib.mdDoc "munge service"); password = mkOption { default = "/etc/munge/munge.key"; diff --git a/nixos/modules/services/security/nginx-sso.nix b/nixos/modules/services/security/nginx-sso.nix index 1c23c29781c..971f22ed347 100644 --- a/nixos/modules/services/security/nginx-sso.nix +++ b/nixos/modules/services/security/nginx-sso.nix @@ -8,7 +8,7 @@ let configYml = pkgs.writeText "nginx-sso.yml" (builtins.toJSON cfg.configuration); in { options.services.nginx.sso = { - enable = mkEnableOption "nginx-sso service"; + enable = mkEnableOption (lib.mdDoc "nginx-sso service"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/security/oauth2_proxy.nix b/nixos/modules/services/security/oauth2_proxy.nix index e0b22d3f38e..e3f8e75ca24 100644 --- a/nixos/modules/services/security/oauth2_proxy.nix +++ b/nixos/modules/services/security/oauth2_proxy.nix @@ -86,7 +86,7 @@ let in { options.services.oauth2_proxy = { - enable = mkEnableOption "oauth2_proxy"; + enable = mkEnableOption (lib.mdDoc "oauth2_proxy"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/security/opensnitch.nix b/nixos/modules/services/security/opensnitch.nix index 4558236339e..1612b0edf01 100644 --- a/nixos/modules/services/security/opensnitch.nix +++ b/nixos/modules/services/security/opensnitch.nix @@ -8,7 +8,7 @@ let in { options = { services.opensnitch = { - enable = mkEnableOption "Opensnitch application firewall"; + enable = mkEnableOption (lib.mdDoc "Opensnitch application firewall"); settings = mkOption { type = types.submodule { freeformType = format.type; diff --git a/nixos/modules/services/security/pass-secret-service.nix b/nixos/modules/services/security/pass-secret-service.nix index 611cea48ee6..c3c70d97ff5 100644 --- a/nixos/modules/services/security/pass-secret-service.nix +++ b/nixos/modules/services/security/pass-secret-service.nix @@ -7,7 +7,7 @@ let in { options.services.passSecretService = { - enable = mkEnableOption "pass secret service"; + enable = mkEnableOption (lib.mdDoc "pass secret service"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/security/privacyidea.nix b/nixos/modules/services/security/privacyidea.nix index ce98b0393ee..5cd338ebf7f 100644 --- a/nixos/modules/services/security/privacyidea.nix +++ b/nixos/modules/services/security/privacyidea.nix @@ -66,25 +66,25 @@ in { options = { services.privacyidea = { - enable = mkEnableOption "PrivacyIDEA"; + enable = mkEnableOption (lib.mdDoc "PrivacyIDEA"); environmentFile = mkOption { type = types.nullOr types.path; default = null; example = "/root/privacyidea.env"; - description = '' + description = lib.mdDoc '' File to load as environment file. Environment variables from this file will be interpolated into the config file - using envsubst which is helpful for specifying + using `envsubst` which is helpful for specifying secrets: - - { = "$SECRET"; } - + ``` + { services.privacyidea.secretKey = "$SECRET"; } + ``` The environment-file can now specify the actual secret key: - + ``` SECRET=veryverytopsecret - + ``` ''; }; @@ -179,7 +179,7 @@ in }; ldap-proxy = { - enable = mkEnableOption "PrivacyIDEA LDAP Proxy"; + enable = mkEnableOption (lib.mdDoc "PrivacyIDEA LDAP Proxy"); configFile = mkOption { type = types.nullOr types.path; diff --git a/nixos/modules/services/security/sks.nix b/nixos/modules/services/security/sks.nix index e9205e4855e..550b61916a2 100644 --- a/nixos/modules/services/security/sks.nix +++ b/nixos/modules/services/security/sks.nix @@ -16,10 +16,10 @@ in { services.sks = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' SKS (synchronizing key server for OpenPGP) and start the database server. You need to create "''${dataDir}/dump/*.gpg" for the initial - import''; + import''); package = mkOption { default = pkgs.sks; diff --git a/nixos/modules/services/security/sslmate-agent.nix b/nixos/modules/services/security/sslmate-agent.nix index c850eb22a03..2d72406f0db 100644 --- a/nixos/modules/services/security/sslmate-agent.nix +++ b/nixos/modules/services/security/sslmate-agent.nix @@ -10,7 +10,7 @@ in { options = { services.sslmate-agent = { - enable = mkEnableOption "sslmate-agent, a daemon for managing SSL/TLS certificates on a server"; + enable = mkEnableOption (lib.mdDoc "sslmate-agent, a daemon for managing SSL/TLS certificates on a server"); }; }; diff --git a/nixos/modules/services/security/step-ca.nix b/nixos/modules/services/security/step-ca.nix index 1afcf659632..433f162ecb8 100644 --- a/nixos/modules/services/security/step-ca.nix +++ b/nixos/modules/services/security/step-ca.nix @@ -8,8 +8,8 @@ in options = { services.step-ca = { - enable = lib.mkEnableOption "the smallstep certificate authority server"; - openFirewall = lib.mkEnableOption "opening the certificate authority server port"; + enable = lib.mkEnableOption (lib.mdDoc "the smallstep certificate authority server"); + openFirewall = lib.mkEnableOption (lib.mdDoc "opening the certificate authority server port"); package = lib.mkOption { type = lib.types.package; default = pkgs.step-ca; @@ -34,42 +34,38 @@ in }; settings = lib.mkOption { type = with lib.types; attrsOf anything; - description = '' - Settings that go into ca.json. See - the step-ca manual + description = lib.mdDoc '' + Settings that go into {file}`ca.json`. See + [the step-ca manual](https://smallstep.com/docs/step-ca/configuration) for more information. The easiest way to - configure this module would be to run step ca init - to generate ca.json and then import it using - builtins.fromJSON. - This article + configure this module would be to run `step ca init` + to generate {file}`ca.json` and then import it using + `builtins.fromJSON`. + [This article](https://smallstep.com/docs/step-cli/basic-crypto-operations#run-an-offline-x509-certificate-authority) may also be useful if you want to customize certain aspects of certificate generation for your CA. - You need to change the database storage path to /var/lib/step-ca/db. + You need to change the database storage path to {file}`/var/lib/step-ca/db`. - - - The option - will be ignored and overwritten by - and - . - - + ::: {.warning} + The {option}`services.step-ca.settings.address` option + will be ignored and overwritten by + {option}`services.step-ca.address` and + {option}`services.step-ca.port`. + ::: ''; }; intermediatePasswordFile = lib.mkOption { type = lib.types.path; example = "/run/keys/smallstep-password"; - description = '' + description = lib.mdDoc '' Path to the file containing the password for the intermediate certificate private key. - - - Make sure to use a quoted absolute path instead of a path literal - to prevent it from being copied to the globally readable Nix - store. - - + ::: {.warning} + Make sure to use a quoted absolute path instead of a path literal + to prevent it from being copied to the globally readable Nix + store. + ::: ''; }; }; diff --git a/nixos/modules/services/security/tor.nix b/nixos/modules/services/security/tor.nix index 30fd6f569c7..730802d92cf 100644 --- a/nixos/modules/services/security/tor.nix +++ b/nixos/modules/services/security/tor.nix @@ -51,14 +51,14 @@ let type = with types; nullOr str; default = null; example = "0.0.0.0"; - description = '' + description = lib.mdDoc '' IPv4 or IPv6 (if between brackets) address. ''; }; optionUnix = mkOption { type = with types; nullOr path; default = null; - description = '' + description = lib.mdDoc '' Unix domain socket path to use. ''; }; @@ -224,11 +224,11 @@ in options = { services.tor = { - enable = mkEnableOption ''Tor daemon. + enable = mkEnableOption (lib.mdDoc ''Tor daemon. By default, the daemon is run without - relay, exit, bridge or client connectivity''; + relay, exit, bridge or client connectivity''); - openFirewall = mkEnableOption "opening of the relay port(s) in the firewall"; + openFirewall = mkEnableOption (lib.mdDoc "opening of the relay port(s) in the firewall"); package = mkOption { type = types.package; @@ -237,19 +237,19 @@ in description = lib.mdDoc "Tor package to use."; }; - enableGeoIP = mkEnableOption ''use of GeoIP databases. + enableGeoIP = mkEnableOption (lib.mdDoc ''use of GeoIP databases. Disabling this will disable by-country statistics for bridges and relays - and some client and third-party software functionality'' // { default = true; }; + and some client and third-party software functionality'') // { default = true; }; - controlSocket.enable = mkEnableOption ''control socket, - created in ${runDir}/control''; + controlSocket.enable = mkEnableOption (lib.mdDoc ''control socket, + created in `${runDir}/control`''); client = { - enable = mkEnableOption ''the routing of application connections. - You might want to disable this if you plan running a dedicated Tor relay''; + enable = mkEnableOption (lib.mdDoc ''the routing of application connections. + You might want to disable this if you plan running a dedicated Tor relay''); - transparentProxy.enable = mkEnableOption "transparent proxy"; - dns.enable = mkEnableOption "DNS resolver"; + transparentProxy.enable = mkEnableOption (lib.mdDoc "transparent proxy"); + dns.enable = mkEnableOption (lib.mdDoc "DNS resolver"); socksListenAddress = mkOption { type = optionSOCKSPort false; @@ -288,146 +288,104 @@ in }; relay = { - enable = mkEnableOption ''relaying of Tor traffic for others. + enable = mkEnableOption (lib.mdDoc "tor relaying") // { + description = lib.mdDoc '' + Whether to enable relaying of Tor traffic for others. - See - for details. + See + for details. - Setting this to true requires setting - - and - - options''; + Setting this to true requires setting + {option}`services.tor.relay.role` + and + {option}`services.tor.settings.ORPort` + options. + ''; + }; role = mkOption { type = types.enum [ "exit" "relay" "bridge" "private-bridge" ]; - description = '' + description = lib.mdDoc '' Your role in Tor network. There're several options: - - - exit - - - An exit relay. This allows Tor users to access regular - Internet services through your public IP. - + - `exit`: + An exit relay. This allows Tor users to access regular + Internet services through your public IP. - - Running an exit relay may expose you to abuse - complaints. See - - for more info. - + You can specify which services Tor users may access via + your exit relay using {option}`settings.ExitPolicy` option. - - You can specify which services Tor users may access via - your exit relay using option. - - - + - `relay`: + Regular relay. This allows Tor users to relay onion + traffic to other Tor nodes, but not to public + Internet. - - relay - - - Regular relay. This allows Tor users to relay onion - traffic to other Tor nodes, but not to public - Internet. - + See + + for more info. - - Note that some misconfigured and/or disrespectful - towards privacy sites will block you even if your - relay is not an exit relay. That is, just being listed - in a public relay directory can have unwanted - consequences. + - `bridge`: + Regular bridge. Works like a regular relay, but + doesn't list you in the public relay directory and + hides your Tor node behind obfs4proxy. - Which means you might not want to use - this role if you browse public Internet from the same - network as your relay, unless you want to write - e-mails to those sites (you should!). - + Using this option will make Tor advertise your bridge + to users through various mechanisms like + , though. - - See - - for more info. - - - + See + for more info. - - bridge - - - Regular bridge. Works like a regular relay, but - doesn't list you in the public relay directory and - hides your Tor node behind obfs4proxy. - + - `private-bridge`: + Private bridge. Works like regular bridge, but does + not advertise your node in any way. - - Using this option will make Tor advertise your bridge - to users through various mechanisms like - , though. - + Using this role means that you won't contribute to Tor + network in any way unless you advertise your node + yourself in some way. - - - WARNING: THE FOLLOWING PARAGRAPH IS NOT LEGAL ADVICE. - Consult with your lawyer when in doubt. - + Use this if you want to run a private bridge, for + example because you'll give out your bridge addr + manually to your friends. - - This role should be safe to use in most situations - (unless the act of forwarding traffic for others is - a punishable offence under your local laws, which - would be pretty insane as it would make ISP illegal). - - + Switching to this role after measurable time in + "bridge" role is pretty useless as some Tor users + would have learned about your node already. In the + latter case you can still change + {option}`port` option. - - See - for more info. - - - + See + for more info. - - private-bridge - - - Private bridge. Works like regular bridge, but does - not advertise your node in any way. - + ::: {.important} + Running an exit relay may expose you to abuse + complaints. See + + for more info. + ::: - - Using this role means that you won't contribute to Tor - network in any way unless you advertise your node - yourself in some way. - + ::: {.important} + Note that some misconfigured and/or disrespectful + towards privacy sites will block you even if your + relay is not an exit relay. That is, just being listed + in a public relay directory can have unwanted + consequences. - - Use this if you want to run a private bridge, for - example because you'll give out your bridge addr - manually to your friends. - + Which means you might not want to use + this role if you browse public Internet from the same + network as your relay, unless you want to write + e-mails to those sites (you should!). + ::: - - Switching to this role after measurable time in - "bridge" role is pretty useless as some Tor users - would have learned about your node already. In the - latter case you can still change - option. - + ::: {.important} + WARNING: THE FOLLOWING PARAGRAPH IS NOT LEGAL ADVICE. + Consult with your lawyer when in doubt. - - See - for more info. - - - - + The `bridge` role should be safe to use in most situations + (unless the act of forwarding traffic for others is + a punishable offence under your local laws, which + would be pretty insane as it would make ISP illegal). + ::: ''; }; diff --git a/nixos/modules/services/security/torify.nix b/nixos/modules/services/security/torify.nix index 770e445d733..4d311adebca 100644 --- a/nixos/modules/services/security/torify.nix +++ b/nixos/modules/services/security/torify.nix @@ -27,16 +27,16 @@ in enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to build tsocks wrapper script to relay application traffic via Tor. - - You shouldn't use this unless you know what you're - doing because your installation of Tor already comes with - its own superior (doesn't leak DNS queries) - torsocks wrapper which does pretty much - exactly the same thing as this. - + ::: {.important} + You shouldn't use this unless you know what you're + doing because your installation of Tor already comes with + its own superior (doesn't leak DNS queries) + `torsocks` wrapper which does pretty much + exactly the same thing as this. + ::: ''; }; diff --git a/nixos/modules/services/security/usbguard.nix b/nixos/modules/services/security/usbguard.nix index 24247593906..1b1fa84c4fa 100644 --- a/nixos/modules/services/security/usbguard.nix +++ b/nixos/modules/services/security/usbguard.nix @@ -39,7 +39,7 @@ in options = { services.usbguard = { - enable = mkEnableOption "USBGuard daemon"; + enable = mkEnableOption (lib.mdDoc "USBGuard daemon"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/security/vault.nix b/nixos/modules/services/security/vault.nix index c471bf01869..7b9e31a8d99 100644 --- a/nixos/modules/services/security/vault.nix +++ b/nixos/modules/services/security/vault.nix @@ -43,7 +43,7 @@ in { options = { services.vault = { - enable = mkEnableOption "Vault daemon"; + enable = mkEnableOption (lib.mdDoc "Vault daemon"); package = mkOption { type = types.package; @@ -141,17 +141,17 @@ in extraSettingsPaths = mkOption { type = types.listOf types.path; default = []; - description = '' + description = lib.mdDoc '' Configuration files to load besides the immutable one defined by the NixOS module. This can be used to avoid putting credentials in the Nix store, which can be read by any user. Each path can point to a JSON- or HCL-formatted file, or a directory - to be scanned for files with .hcl or - .json extensions. + to be scanned for files with `.hcl` or + `.json` extensions. To upload the confidential file with NixOps, use for example: - + ``` ''; }; }; diff --git a/nixos/modules/services/security/vaultwarden/default.nix b/nixos/modules/services/security/vaultwarden/default.nix index 9351bff448d..7e4863dd871 100644 --- a/nixos/modules/services/security/vaultwarden/default.nix +++ b/nixos/modules/services/security/vaultwarden/default.nix @@ -39,7 +39,7 @@ in { ]; options.services.vaultwarden = with types; { - enable = mkEnableOption "vaultwarden"; + enable = mkEnableOption (lib.mdDoc "vaultwarden"); dbBackend = mkOption { type = enum [ "sqlite" "mysql" "postgresql" ]; @@ -97,26 +97,26 @@ in { SMTP_FROM_NAME = "example.com Bitwarden server"; } ''; - description = '' + description = lib.mdDoc '' The configuration of vaultwarden is done through environment variables, - therefore it is recommended to use upper snake case (e.g. DISABLE_2FA_REMEMBER). + therefore it is recommended to use upper snake case (e.g. {env}`DISABLE_2FA_REMEMBER`). - However, camel case (e.g. disable2FARemember) is also supported: + However, camel case (e.g. `disable2FARemember`) is also supported: The NixOS module will convert it automatically to - upper case snake case (e.g. DISABLE_2FA_REMEMBER). + upper case snake case (e.g. {env}`DISABLE_2FA_REMEMBER`). In this conversion digits (0-9) are handled just like upper case characters, - so foo2 would be converted to FOO_2. - Names already in this format remain unchanged, so FOO2 remains FOO2 if passed as such, - even though foo2 would have been converted to FOO_2. + so `foo2` would be converted to {env}`FOO_2`. + Names already in this format remain unchanged, so `FOO2` remains `FOO2` if passed as such, + even though `foo2` would have been converted to {env}`FOO_2`. This allows working around any potential future conflicting naming conventions. Based on the attributes passed to this config option an environment file will be generated that is passed to vaultwarden's systemd service. The available configuration options can be found in - the environment template file. + [the environment template file](https://github.com/dani-garcia/vaultwarden/blob/${vaultwarden.version}/.env.template). - See for how + See ()[#opt-services.vaultwarden.environmentFile) for how to set up access to the Admin UI to invite initial users. ''; }; @@ -125,31 +125,31 @@ in { type = with types; nullOr path; default = null; example = "/var/lib/vaultwarden.env"; - description = '' - Additional environment file as defined in systemd.exec5. + description = lib.mdDoc '' + Additional environment file as defined in {manpage}`systemd.exec(5)`. - Secrets like ADMIN_TOKEN and SMTP_PASSWORD + Secrets like {env}`ADMIN_TOKEN` and {env}`SMTP_PASSWORD` may be passed to the service without adding them to the world-readable Nix store. Note that this file needs to be available on the host on which - vaultwarden is running. + `vaultwarden` is running. As a concrete example, to make the Admin UI available (from which new users can be invited initially), - the secret ADMIN_TOKEN needs to be defined as described - here. - Setting environmentFile to /var/lib/vaultwarden.env + the secret {env}`ADMIN_TOKEN` needs to be defined as described + [here](https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page). + Setting `environmentFile` to `/var/lib/vaultwarden.env` and ensuring permissions with e.g. - chown vaultwarden:vaultwarden /var/lib/vaultwarden.env - (the vaultwarden user will only exist after activating with - enable = true; before this), we can set the contents of the file to have + `chown vaultwarden:vaultwarden /var/lib/vaultwarden.env` + (the `vaultwarden` user will only exist after activating with + `enable = true;` before this), we can set the contents of the file to have contents such as: - -# Admin secret token, see -# https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page -ADMIN_TOKEN=...copy-paste a unique generated secret token here... - + ``` + # Admin secret token, see + # https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page + ADMIN_TOKEN=...copy-paste a unique generated secret token here... + ``` ''; }; diff --git a/nixos/modules/services/system/cachix-agent/default.nix b/nixos/modules/services/system/cachix-agent/default.nix index b730118d46d..2972e02b46c 100644 --- a/nixos/modules/services/system/cachix-agent/default.nix +++ b/nixos/modules/services/system/cachix-agent/default.nix @@ -8,7 +8,7 @@ in { meta.maintainers = [ lib.maintainers.domenkozar ]; options.services.cachix-agent = { - enable = mkEnableOption "Cachix Deploy Agent: https://docs.cachix.org/deploy/"; + enable = mkEnableOption (lib.mdDoc "Cachix Deploy Agent: https://docs.cachix.org/deploy/"); name = mkOption { type = types.str; diff --git a/nixos/modules/services/system/dbus.nix b/nixos/modules/services/system/dbus.nix index def04d944f0..c0de00bb914 100644 --- a/nixos/modules/services/system/dbus.nix +++ b/nixos/modules/services/system/dbus.nix @@ -29,7 +29,7 @@ in type = types.bool; default = false; internal = true; - description = '' + description = lib.mdDoc '' Whether to start the D-Bus message bus daemon, which is required by many other system services and applications. ''; @@ -70,7 +70,7 @@ in type = types.nullOr types.bool; default = null; visible = false; - description = '' + description = lib.mdDoc '' Removed option, do not use. ''; }; diff --git a/nixos/modules/services/system/earlyoom.nix b/nixos/modules/services/system/earlyoom.nix index b2e2d21002c..3f501d45346 100644 --- a/nixos/modules/services/system/earlyoom.nix +++ b/nixos/modules/services/system/earlyoom.nix @@ -11,7 +11,7 @@ let in { options.services.earlyoom = { - enable = mkEnableOption "Early out of memory killing"; + enable = mkEnableOption (lib.mdDoc "Early out of memory killing"); freeMemThreshold = mkOption { type = types.ints.between 1 100; @@ -72,7 +72,7 @@ in enableNotifications = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Send notifications about killed processes via the system d-bus. WARNING: enabling this option (while convenient) should *not* be done on a @@ -80,10 +80,10 @@ in local user to DoS your session by spamming notifications. To actually see the notifications in your GUI session, you need to have - systembus-notify running as your user, which this - option handles by enabling . + `systembus-notify` running as your user, which this + option handles by enabling {option}`services.systembus-notify`. - See README for details. + See [README](https://github.com/rfjakob/earlyoom#notifications) for details. ''; }; diff --git a/nixos/modules/services/system/kerberos/default.nix b/nixos/modules/services/system/kerberos/default.nix index 3ace9de5ea7..0c9e44a45c1 100644 --- a/nixos/modules/services/system/kerberos/default.nix +++ b/nixos/modules/services/system/kerberos/default.nix @@ -51,7 +51,7 @@ in ###### interface options = { services.kerberos_server = { - enable = lib.mkEnableOption "the kerberos authentification server"; + enable = lib.mkEnableOption (lib.mdDoc "the kerberos authentification server"); realms = mkOption { type = types.attrsOf (types.submodule realm); diff --git a/nixos/modules/services/system/nscd.nix b/nixos/modules/services/system/nscd.nix index f3dfd2af3d2..0a59feb7066 100644 --- a/nixos/modules/services/system/nscd.nix +++ b/nixos/modules/services/system/nscd.nix @@ -30,7 +30,7 @@ in user = mkOption { type = types.str; default = "nscd"; - description = '' + description = lib.mdDoc '' User account under which nscd runs. ''; }; @@ -38,7 +38,7 @@ in group = mkOption { type = types.str; default = "nscd"; - description = '' + description = lib.mdDoc '' User group under which nscd runs. ''; }; diff --git a/nixos/modules/services/system/saslauthd.nix b/nixos/modules/services/system/saslauthd.nix index c3fa7f7aefc..09720146aaa 100644 --- a/nixos/modules/services/system/saslauthd.nix +++ b/nixos/modules/services/system/saslauthd.nix @@ -16,7 +16,7 @@ in services.saslauthd = { - enable = mkEnableOption "saslauthd, the Cyrus SASL authentication daemon"; + enable = mkEnableOption (lib.mdDoc "saslauthd, the Cyrus SASL authentication daemon"); package = mkOption { default = pkgs.cyrus_sasl.bin; diff --git a/nixos/modules/services/system/self-deploy.nix b/nixos/modules/services/system/self-deploy.nix index ecba2e43dc2..a508cecef26 100644 --- a/nixos/modules/services/system/self-deploy.nix +++ b/nixos/modules/services/system/self-deploy.nix @@ -23,7 +23,7 @@ let in { options.services.self-deploy = { - enable = lib.mkEnableOption "self-deploy"; + enable = lib.mkEnableOption (lib.mdDoc "self-deploy"); nixFile = lib.mkOption { type = lib.types.path; diff --git a/nixos/modules/services/system/systembus-notify.nix b/nixos/modules/services/system/systembus-notify.nix index e918bc552ec..269197b3997 100644 --- a/nixos/modules/services/system/systembus-notify.nix +++ b/nixos/modules/services/system/systembus-notify.nix @@ -8,13 +8,13 @@ let in { options.services.systembus-notify = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' System bus notification support WARNING: enabling this option (while convenient) should *not* be done on a machine where you do not trust the other users as it allows any other local user to DoS your session by spamming notifications. - ''; + ''); }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/torrent/deluge.nix b/nixos/modules/services/torrent/deluge.nix index 3f4cd2ff6e0..70fad4d7d76 100644 --- a/nixos/modules/services/torrent/deluge.nix +++ b/nixos/modules/services/torrent/deluge.nix @@ -37,7 +37,7 @@ in { options = { services = { deluge = { - enable = mkEnableOption "Deluge daemon"; + enable = mkEnableOption (lib.mdDoc "Deluge daemon"); openFilesLimit = mkOption { default = openFilesLimit; @@ -157,7 +157,7 @@ in { }; deluge.web = { - enable = mkEnableOption "Deluge Web daemon"; + enable = mkEnableOption (lib.mdDoc "Deluge Web daemon"); port = mkOption { type = types.port; diff --git a/nixos/modules/services/torrent/flexget.nix b/nixos/modules/services/torrent/flexget.nix index 17d77bfae5f..2a9ffac18d9 100644 --- a/nixos/modules/services/torrent/flexget.nix +++ b/nixos/modules/services/torrent/flexget.nix @@ -14,7 +14,7 @@ let in { options = { services.flexget = { - enable = mkEnableOption "Run FlexGet Daemon"; + enable = mkEnableOption (lib.mdDoc "Run FlexGet Daemon"); user = mkOption { default = "deluge"; diff --git a/nixos/modules/services/torrent/magnetico.nix b/nixos/modules/services/torrent/magnetico.nix index ffc8577375b..b681c58dfe2 100644 --- a/nixos/modules/services/torrent/magnetico.nix +++ b/nixos/modules/services/torrent/magnetico.nix @@ -43,7 +43,7 @@ in { ###### interface options.services.magnetico = { - enable = mkEnableOption "Magnetico, Bittorrent DHT crawler"; + enable = mkEnableOption (lib.mdDoc "Magnetico, Bittorrent DHT crawler"); crawler.address = mkOption { type = types.str; @@ -116,43 +116,41 @@ in { myuser = "$2y$12$YE01LZ8jrbQbx6c0s2hdZO71dSjn2p/O9XsYJpz.5968yCysUgiaG"; } ''; - description = '' + description = lib.mdDoc '' The credentials to access the web interface, in case authentication is - enabled, in the format username:hash. If unset no + enabled, in the format `username:hash`. If unset no authentication will be required. Usernames must start with a lowercase ([a-z]) ASCII character, might contain non-consecutive underscores except at the end, and consists of small-case a-z characters and digits 0-9. The - htpasswd tool from the apacheHttpd + {command}`htpasswd` tool from the `apacheHttpd` package may be used to generate the hash: - htpasswd -bnBC 12 username password + {command}`htpasswd -bnBC 12 username password` - - - The hashes will be stored world-readable in the nix store. - Consider using the credentialsFile option if you - don't want this. - - + ::: {.warning} + The hashes will be stored world-readable in the nix store. + Consider using the `credentialsFile` option if you + don't want this. + ::: ''; }; web.credentialsFile = mkOption { type = types.nullOr types.path; default = null; - description = '' + description = lib.mdDoc '' The path to the file holding the credentials to access the web interface. If unset no authentication will be required. The file must constain user names and password hashes in the format - username:hash , one for each line. Usernames must + `username:hash `, one for each line. Usernames must start with a lowecase ([a-z]) ASCII character, might contain non-consecutive underscores except at the end, and consists of small-case a-z characters and digits 0-9. - The htpasswd tool from the apacheHttpd + The {command}`htpasswd` tool from the `apacheHttpd` package may be used to generate the hash: - htpasswd -bnBC 12 username password + {command}`htpasswd -bnBC 12 username password` ''; }; diff --git a/nixos/modules/services/torrent/opentracker.nix b/nixos/modules/services/torrent/opentracker.nix index 20b3d35a603..7d67491c119 100644 --- a/nixos/modules/services/torrent/opentracker.nix +++ b/nixos/modules/services/torrent/opentracker.nix @@ -5,7 +5,7 @@ let cfg = config.services.opentracker; in { options.services.opentracker = { - enable = mkEnableOption "opentracker"; + enable = mkEnableOption (lib.mdDoc "opentracker"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/torrent/rtorrent.nix b/nixos/modules/services/torrent/rtorrent.nix index a805e09923f..935c11e3eb0 100644 --- a/nixos/modules/services/torrent/rtorrent.nix +++ b/nixos/modules/services/torrent/rtorrent.nix @@ -9,7 +9,7 @@ let in { options.services.rtorrent = { - enable = mkEnableOption "rtorrent"; + enable = mkEnableOption (lib.mdDoc "rtorrent"); dataDir = mkOption { type = types.str; diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index 6a038dc0a32..5e0d13211bc 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -24,14 +24,18 @@ in ]; options = { services.transmission = { - enable = mkEnableOption ''the headless Transmission BitTorrent daemon. + enable = mkEnableOption (lib.mdDoc "transmission") // { + description = lib.mdDoc '' + Whether to enable the headless Transmission BitTorrent daemon. - Transmission daemon can be controlled via the RPC interface using - transmission-remote, the WebUI (http://127.0.0.1:9091/ by default), - or other clients like stig or tremc. + Transmission daemon can be controlled via the RPC interface using + transmission-remote, the WebUI (http://127.0.0.1:9091/ by default), + or other clients like stig or tremc. - Torrents are downloaded to /${downloadsDir} by default and are - accessible to users in the "transmission" group''; + Torrents are downloaded to [](#opt-services.transmission.home)/${downloadsDir} by default and are + accessible to users in the "transmission" group. + ''; + }; settings = mkOption { description = lib.mdDoc '' @@ -67,7 +71,7 @@ in options.incomplete-dir-enabled = mkOption { type = types.bool; default = true; - description = ""; + description = lib.mdDoc ""; }; options.message-level = mkOption { type = types.ints.between 0 3; @@ -104,9 +108,9 @@ in type = types.str; default = "127.0.0.1"; example = "0.0.0.0"; - description = '' + description = lib.mdDoc '' Where to listen for RPC connections. - Use \"0.0.0.0\" to listen on all interfaces. + Use `0.0.0.0` to listen on all interfaces. ''; }; options.rpc-port = mkOption { @@ -229,18 +233,22 @@ in ''; }; - openPeerPorts = mkEnableOption "opening of the peer port(s) in the firewall"; + openPeerPorts = mkEnableOption (lib.mdDoc "opening of the peer port(s) in the firewall"); - openRPCPort = mkEnableOption "opening of the RPC port in the firewall"; + openRPCPort = mkEnableOption (lib.mdDoc "opening of the RPC port in the firewall"); - performanceNetParameters = mkEnableOption ''tweaking of kernel parameters - to open many more connections at the same time. + performanceNetParameters = mkEnableOption (lib.mdDoc "performance tweaks") // { + description = lib.mdDoc '' + Whether to enable tweaking of kernel parameters + to open many more connections at the same time. - Note that you may also want to increase - peer-limit-global". - And be aware that these settings are quite aggressive - and might not suite your regular desktop use. - For instance, SSH sessions may time out more easily''; + Note that you may also want to increase + `peer-limit-global`. + And be aware that these settings are quite aggressive + and might not suite your regular desktop use. + For instance, SSH sessions may time out more easily. + ''; + }; }; }; diff --git a/nixos/modules/services/tracing/tempo.nix b/nixos/modules/services/tracing/tempo.nix index 201f850656d..4a098c31eff 100644 --- a/nixos/modules/services/tracing/tempo.nix +++ b/nixos/modules/services/tracing/tempo.nix @@ -8,7 +8,7 @@ let settingsFormat = pkgs.formats.yaml {}; in { options.services.tempo = { - enable = mkEnableOption "Grafana Tempo"; + enable = mkEnableOption (lib.mdDoc "Grafana Tempo"); settings = mkOption { type = settingsFormat.type; diff --git a/nixos/modules/services/video/epgstation/default.nix b/nixos/modules/services/video/epgstation/default.nix index 51f71389263..3d1d7a27c21 100644 --- a/nixos/modules/services/video/epgstation/default.nix +++ b/nixos/modules/services/video/epgstation/default.nix @@ -78,7 +78,7 @@ in ]; options.services.epgstation = { - enable = lib.mkEnableOption description; + enable = lib.mkEnableOption (lib.mdDoc description); package = lib.mkOption { default = pkgs.epgstation; @@ -101,16 +101,14 @@ in openFirewall = lib.mkOption { type = lib.types.bool; default = false; - description = '' + description = lib.mdDoc '' Open ports in the firewall for the EPGStation web interface. - - - Exposing EPGStation to the open internet is generally advised - against. Only use it inside a trusted local network, or consider - putting it behind a VPN if you want remote access. - - + ::: {.warning} + Exposing EPGStation to the open internet is generally advised + against. Only use it inside a trusted local network, or consider + putting it behind a VPN if you want remote access. + ::: ''; }; diff --git a/nixos/modules/services/video/mirakurun.nix b/nixos/modules/services/video/mirakurun.nix index 6891b84ff45..5484515e7cb 100644 --- a/nixos/modules/services/video/mirakurun.nix +++ b/nixos/modules/services/video/mirakurun.nix @@ -24,7 +24,7 @@ in { options = { services.mirakurun = { - enable = mkEnableOption "the Mirakurun DVR Tuner Server"; + enable = mkEnableOption (lib.mdDoc "the Mirakurun DVR Tuner Server"); port = mkOption { type = with types; nullOr port; @@ -38,16 +38,14 @@ in openFirewall = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Open ports in the firewall for Mirakurun. - - - Exposing Mirakurun to the open internet is generally advised - against. Only use it inside a trusted local network, or - consider putting it behind a VPN if you want remote access. - - + ::: {.warning} + Exposing Mirakurun to the open internet is generally advised + against. Only use it inside a trusted local network, or + consider putting it behind a VPN if you want remote access. + ::: ''; }; diff --git a/nixos/modules/services/video/replay-sorcery.nix b/nixos/modules/services/video/replay-sorcery.nix index f3cecfc248c..1be02f4d6da 100644 --- a/nixos/modules/services/video/replay-sorcery.nix +++ b/nixos/modules/services/video/replay-sorcery.nix @@ -9,12 +9,12 @@ in { options = with types; { services.replay-sorcery = { - enable = mkEnableOption "the ReplaySorcery service for instant-replays"; + enable = mkEnableOption (lib.mdDoc "the ReplaySorcery service for instant-replays"); - enableSysAdminCapability = mkEnableOption '' + enableSysAdminCapability = mkEnableOption (lib.mdDoc '' the system admin capability to support hardware accelerated video capture. This is equivalent to running ReplaySorcery as - root, so use with caution''; + root, so use with caution''); autoStart = mkOption { type = bool; diff --git a/nixos/modules/services/video/rtsp-simple-server.nix b/nixos/modules/services/video/rtsp-simple-server.nix index db6f0441bbf..2dd62edab78 100644 --- a/nixos/modules/services/video/rtsp-simple-server.nix +++ b/nixos/modules/services/video/rtsp-simple-server.nix @@ -10,7 +10,7 @@ in { options = { services.rtsp-simple-server = { - enable = mkEnableOption "RTSP Simple Server"; + enable = mkEnableOption (lib.mdDoc "RTSP Simple Server"); settings = mkOption { description = lib.mdDoc '' diff --git a/nixos/modules/services/wayland/cage.nix b/nixos/modules/services/wayland/cage.nix index c7accc5f9e1..330dce1d0c0 100644 --- a/nixos/modules/services/wayland/cage.nix +++ b/nixos/modules/services/wayland/cage.nix @@ -5,7 +5,7 @@ with lib; let cfg = config.services.cage; in { - options.services.cage.enable = mkEnableOption "cage kiosk service"; + options.services.cage.enable = mkEnableOption (lib.mdDoc "cage kiosk service"); options.services.cage.user = mkOption { type = types.str; diff --git a/nixos/modules/services/web-apps/atlassian/confluence.nix b/nixos/modules/services/web-apps/atlassian/confluence.nix index 6c5de3fbe4b..08cff328657 100644 --- a/nixos/modules/services/web-apps/atlassian/confluence.nix +++ b/nixos/modules/services/web-apps/atlassian/confluence.nix @@ -29,7 +29,7 @@ in { options = { services.confluence = { - enable = mkEnableOption "Atlassian Confluence service"; + enable = mkEnableOption (lib.mdDoc "Atlassian Confluence service"); user = mkOption { type = types.str; @@ -69,7 +69,7 @@ in }; proxy = { - enable = mkEnableOption "proxy support"; + enable = mkEnableOption (lib.mdDoc "proxy support"); name = mkOption { type = types.str; @@ -93,7 +93,7 @@ in }; sso = { - enable = mkEnableOption "SSO with Atlassian Crowd"; + enable = mkEnableOption (lib.mdDoc "SSO with Atlassian Crowd"); crowd = mkOption { type = types.str; diff --git a/nixos/modules/services/web-apps/atlassian/crowd.nix b/nixos/modules/services/web-apps/atlassian/crowd.nix index abe3a8bdb22..ac571e18880 100644 --- a/nixos/modules/services/web-apps/atlassian/crowd.nix +++ b/nixos/modules/services/web-apps/atlassian/crowd.nix @@ -34,7 +34,7 @@ in { options = { services.crowd = { - enable = mkEnableOption "Atlassian Crowd service"; + enable = mkEnableOption (lib.mdDoc "Atlassian Crowd service"); user = mkOption { type = types.str; @@ -86,7 +86,7 @@ in }; proxy = { - enable = mkEnableOption "reverse proxy support"; + enable = mkEnableOption (lib.mdDoc "reverse proxy support"); name = mkOption { type = types.str; diff --git a/nixos/modules/services/web-apps/atlassian/jira.nix b/nixos/modules/services/web-apps/atlassian/jira.nix index 5d62160ffb1..8d28eb162ef 100644 --- a/nixos/modules/services/web-apps/atlassian/jira.nix +++ b/nixos/modules/services/web-apps/atlassian/jira.nix @@ -29,7 +29,7 @@ in { options = { services.jira = { - enable = mkEnableOption "Atlassian JIRA service"; + enable = mkEnableOption (lib.mdDoc "Atlassian JIRA service"); user = mkOption { type = types.str; @@ -69,7 +69,7 @@ in }; proxy = { - enable = mkEnableOption "reverse proxy support"; + enable = mkEnableOption (lib.mdDoc "reverse proxy support"); name = mkOption { type = types.str; @@ -99,7 +99,7 @@ in }; sso = { - enable = mkEnableOption "SSO with Atlassian Crowd"; + enable = mkEnableOption (lib.mdDoc "SSO with Atlassian Crowd"); crowd = mkOption { type = types.str; diff --git a/nixos/modules/services/web-apps/baget.nix b/nixos/modules/services/web-apps/baget.nix index dd70d462d57..e4d5a1faddb 100644 --- a/nixos/modules/services/web-apps/baget.nix +++ b/nixos/modules/services/web-apps/baget.nix @@ -53,7 +53,7 @@ let in { options.services.baget = { - enable = mkEnableOption "BaGet NuGet-compatible server"; + enable = mkEnableOption (lib.mdDoc "BaGet NuGet-compatible server"); apiKeyFile = mkOption { type = types.path; diff --git a/nixos/modules/services/web-apps/bookstack.nix b/nixos/modules/services/web-apps/bookstack.nix index b939adc50fa..3fbccf54008 100644 --- a/nixos/modules/services/web-apps/bookstack.nix +++ b/nixos/modules/services/web-apps/bookstack.nix @@ -34,7 +34,7 @@ in { options.services.bookstack = { - enable = mkEnableOption "BookStack"; + enable = mkEnableOption (lib.mdDoc "BookStack"); user = mkOption { default = "bookstack"; @@ -234,7 +234,7 @@ in { options = { _secret = mkOption { type = nullOr str; - description = '' + description = lib.mdDoc '' The path to a file containing the value the option should be set to in the final configuration file. diff --git a/nixos/modules/services/web-apps/calibre-web.nix b/nixos/modules/services/web-apps/calibre-web.nix index 6bcf733452b..143decfc091 100644 --- a/nixos/modules/services/web-apps/calibre-web.nix +++ b/nixos/modules/services/web-apps/calibre-web.nix @@ -8,7 +8,7 @@ in { options = { services.calibre-web = { - enable = mkEnableOption "Calibre-Web"; + enable = mkEnableOption (lib.mdDoc "Calibre-Web"); listen = { ip = mkOption { diff --git a/nixos/modules/services/web-apps/code-server.nix b/nixos/modules/services/web-apps/code-server.nix index 84fc03deabf..1191fb53350 100644 --- a/nixos/modules/services/web-apps/code-server.nix +++ b/nixos/modules/services/web-apps/code-server.nix @@ -11,7 +11,7 @@ in { ###### interface options = { services.code-server = { - enable = mkEnableOption "code-server"; + enable = mkEnableOption (lib.mdDoc "code-server"); package = mkOption { default = pkgs.code-server; diff --git a/nixos/modules/services/web-apps/convos.nix b/nixos/modules/services/web-apps/convos.nix index 120481c6401..cd9f9d885d6 100644 --- a/nixos/modules/services/web-apps/convos.nix +++ b/nixos/modules/services/web-apps/convos.nix @@ -7,7 +7,7 @@ let in { options.services.convos = { - enable = mkEnableOption "Convos"; + enable = mkEnableOption (lib.mdDoc "Convos"); listenPort = mkOption { type = types.port; default = 3000; diff --git a/nixos/modules/services/web-apps/dex.nix b/nixos/modules/services/web-apps/dex.nix index 82fdcd212f9..a171487d4f2 100644 --- a/nixos/modules/services/web-apps/dex.nix +++ b/nixos/modules/services/web-apps/dex.nix @@ -19,13 +19,13 @@ let in { options.services.dex = { - enable = mkEnableOption "the OpenID Connect and OAuth2 identity provider"; + enable = mkEnableOption (lib.mdDoc "the OpenID Connect and OAuth2 identity provider"); environmentFile = mkOption { type = types.nullOr types.path; default = null; - description = '' - Environment file (see systemd.exec(5) + description = lib.mdDoc '' + Environment file (see `systemd.exec(5)` "EnvironmentFile=" section for the syntax) to define variables for dex. This option can be used to safely include secret keys into the dex configuration. ''; diff --git a/nixos/modules/services/web-apps/discourse.nix b/nixos/modules/services/web-apps/discourse.nix index a1ab3bfca4a..66b22ec87db 100644 --- a/nixos/modules/services/web-apps/discourse.nix +++ b/nixos/modules/services/web-apps/discourse.nix @@ -26,7 +26,7 @@ in { options = { services.discourse = { - enable = lib.mkEnableOption "Discourse, an open source discussion platform"; + enable = lib.mkEnableOption (lib.mdDoc "Discourse, an open source discussion platform"); package = lib.mkOption { type = lib.types.package; @@ -57,20 +57,20 @@ in type = with lib.types; nullOr path; default = null; example = "/run/keys/secret_key_base"; - description = '' + description = lib.mdDoc '' The path to a file containing the - secret_key_base secret. + `secret_key_base` secret. - Discourse uses secret_key_base to encrypt + Discourse uses `secret_key_base` to encrypt the cookie store, which contains session data, and to digest user auth tokens. Needs to be a 64 byte long string of hexadecimal characters. You can generate one by running - - $ openssl rand -hex 64 >/path/to/secret_key_base_file - + ``` + openssl rand -hex 64 >/path/to/secret_key_base_file + ``` This should be a string, not a nix path, since nix paths are copied into the world-readable nix store. diff --git a/nixos/modules/services/web-apps/documize.nix b/nixos/modules/services/web-apps/documize.nix index 4353e3c2445..f70da0829f4 100644 --- a/nixos/modules/services/web-apps/documize.nix +++ b/nixos/modules/services/web-apps/documize.nix @@ -12,7 +12,7 @@ let in { options.services.documize = { - enable = mkEnableOption "Documize Wiki"; + enable = mkEnableOption (lib.mdDoc "Documize Wiki"); stateDirectoryName = mkOption { type = types.str; @@ -85,37 +85,24 @@ in { dbtype = mkOption { type = types.enum [ "mysql" "percona" "mariadb" "postgresql" "sqlserver" ]; default = "postgresql"; - description = '' - Specify the database provider: - - mysql - percona - mariadb - postgresql - sqlserver - + description = lib.mdDoc '' + Specify the database provider: `mysql`, `percona`, `mariadb`, `postgresql`, `sqlserver` ''; }; db = mkOption { type = types.str; - description = '' + description = lib.mdDoc '' Database specific connection string for example: - - MySQL/Percona/MariaDB: - user:password@tcp(host:3306)/documize - - MySQLv8+: - user:password@tcp(host:3306)/documize?allowNativePasswords=true - - PostgreSQL: - host=localhost port=5432 dbname=documize user=admin password=secret sslmode=disable - - MSSQL: - sqlserver://username:password@localhost:1433?database=Documize or - sqlserver://sa@localhost/SQLExpress?database=Documize - - + - MySQL/Percona/MariaDB: + `user:password@tcp(host:3306)/documize` + - MySQLv8+: + `user:password@tcp(host:3306)/documize?allowNativePasswords=true` + - PostgreSQL: + `host=localhost port=5432 dbname=documize user=admin password=secret sslmode=disable` + - MSSQL: + `sqlserver://username:password@localhost:1433?database=Documize` or + `sqlserver://sa@localhost/SQLExpress?database=Documize` ''; }; diff --git a/nixos/modules/services/web-apps/dokuwiki.nix b/nixos/modules/services/web-apps/dokuwiki.nix index a148dec8199..c7165c17fd7 100644 --- a/nixos/modules/services/web-apps/dokuwiki.nix +++ b/nixos/modules/services/web-apps/dokuwiki.nix @@ -60,7 +60,7 @@ let siteOpts = { config, lib, name, ... }: { options = { - enable = mkEnableOption "DokuWiki web application."; + enable = mkEnableOption (lib.mdDoc "DokuWiki web application."); package = mkOption { type = types.package; @@ -137,11 +137,16 @@ let usersFile = mkOption { type = with types; nullOr str; default = if config.aclUse then "/var/lib/dokuwiki/${name}/users.auth.php" else null; - description = '' + description = lib.mdDoc '' Location of the dokuwiki users file. List of users. Format: - login:passwordhash:Real Name:email:groups,comma,separated - Create passwordHash easily by using:$ mkpasswd -5 password `pwgen 8 1` - Example: + + login:passwordhash:Real Name:email:groups,comma,separated + + Create passwordHash easily by using: + + mkpasswd -5 password `pwgen 8 1` + + Example: ''; example = "/var/lib/dokuwiki/${name}/users.auth.php"; }; @@ -160,9 +165,12 @@ let plugins = mkOption { type = types.listOf types.path; default = []; - description = '' + description = lib.mdDoc '' List of path(s) to respective plugin(s) which are copied from the 'plugin' directory. - These plugins need to be packaged before use, see example. + + ::: {.note} + These plugins need to be packaged before use, see example. + ::: ''; example = literalExpression '' let @@ -188,9 +196,12 @@ let templates = mkOption { type = types.listOf types.path; default = []; - description = '' + description = lib.mdDoc '' List of path(s) to respective template(s) which are copied from the 'tpl' directory. - These templates need to be packaged before use, see example. + + ::: {.note} + These templates need to be packaged before use, see example. + ::: ''; example = literalExpression '' let diff --git a/nixos/modules/services/web-apps/fluidd.nix b/nixos/modules/services/web-apps/fluidd.nix index 8d6d48b3dd2..d4b86b9dfb3 100644 --- a/nixos/modules/services/web-apps/fluidd.nix +++ b/nixos/modules/services/web-apps/fluidd.nix @@ -6,7 +6,7 @@ let in { options.services.fluidd = { - enable = mkEnableOption "Fluidd, a Klipper web interface for managing your 3d printer"; + enable = mkEnableOption (lib.mdDoc "Fluidd, a Klipper web interface for managing your 3d printer"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/web-apps/galene.nix b/nixos/modules/services/web-apps/galene.nix index 2fef43753d7..ded104792bc 100644 --- a/nixos/modules/services/web-apps/galene.nix +++ b/nixos/modules/services/web-apps/galene.nix @@ -12,7 +12,7 @@ in { options = { services.galene = { - enable = mkEnableOption "Galene Service."; + enable = mkEnableOption (lib.mdDoc "Galene Service."); stateDir = mkOption { default = defaultstateDir; diff --git a/nixos/modules/services/web-apps/gerrit.nix b/nixos/modules/services/web-apps/gerrit.nix index 5b36204ff05..ab2eeea09bd 100644 --- a/nixos/modules/services/web-apps/gerrit.nix +++ b/nixos/modules/services/web-apps/gerrit.nix @@ -59,7 +59,7 @@ in { options = { services.gerrit = { - enable = mkEnableOption "Gerrit service"; + enable = mkEnableOption (lib.mdDoc "Gerrit service"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/web-apps/gotify-server.nix b/nixos/modules/services/web-apps/gotify-server.nix index 9e278b41ad1..8db3a8ef3e8 100644 --- a/nixos/modules/services/web-apps/gotify-server.nix +++ b/nixos/modules/services/web-apps/gotify-server.nix @@ -7,7 +7,7 @@ let in { options = { services.gotify = { - enable = mkEnableOption "Gotify webserver"; + enable = mkEnableOption (lib.mdDoc "Gotify webserver"); port = mkOption { type = types.port; diff --git a/nixos/modules/services/web-apps/grocy.nix b/nixos/modules/services/web-apps/grocy.nix index 173dd63ddaa..6efc2ccfd30 100644 --- a/nixos/modules/services/web-apps/grocy.nix +++ b/nixos/modules/services/web-apps/grocy.nix @@ -6,7 +6,7 @@ let cfg = config.services.grocy; in { options.services.grocy = { - enable = mkEnableOption "grocy"; + enable = mkEnableOption (lib.mdDoc "grocy"); hostName = mkOption { type = types.str; diff --git a/nixos/modules/services/web-apps/healthchecks.nix b/nixos/modules/services/web-apps/healthchecks.nix index e58cc6f202b..2c55f5ec8eb 100644 --- a/nixos/modules/services/web-apps/healthchecks.nix +++ b/nixos/modules/services/web-apps/healthchecks.nix @@ -26,8 +26,8 @@ let in { options.services.healthchecks = { - enable = mkEnableOption "healthchecks" // { - description = '' + enable = mkEnableOption (lib.mdDoc "healthchecks") // { + description = lib.mdDoc '' Enable healthchecks. It is expected to be run behind a HTTP reverse proxy. ''; @@ -43,28 +43,28 @@ in user = mkOption { default = defaultUser; type = types.str; - description = '' + description = lib.mdDoc '' User account under which healthchecks runs. - + ::: {.note} If left as the default value this user will automatically be created on system activation, otherwise you are responsible for ensuring the user exists before the healthchecks service starts. - + ::: ''; }; group = mkOption { default = defaultUser; type = types.str; - description = '' + description = lib.mdDoc '' Group account under which healthchecks runs. - + ::: {.note} If left as the default value this group will automatically be created on system activation, otherwise you are responsible for ensuring the group exists before the healthchecks service starts. - + ::: ''; }; @@ -83,28 +83,28 @@ in dataDir = mkOption { type = types.str; default = "/var/lib/healthchecks"; - description = '' + description = lib.mdDoc '' The directory used to store all data for healthchecks. - + ::: {.note} If left as the default value this directory will automatically be created before the healthchecks server starts, otherwise you are responsible for ensuring the directory exists with appropriate ownership and permissions. - + ::: ''; }; settings = lib.mkOption { - description = '' - Environment variables which are read by healthchecks (local)_settings.py. + description = lib.mdDoc '' + Environment variables which are read by healthchecks `(local)_settings.py`. Settings which are explictly covered in options bewlow, are type-checked and/or transformed before added to the environment, everything else is passed as a string. - See https://healthchecks.io/docs/self_hosted_configuration/ + See for a full documentation of settings. - We add two variables to this list inside the packages local_settings.py. + We add two variables to this list inside the packages `local_settings.py.` - STATIC_ROOT to set a state directory for dynamically generated static files. - SECRET_KEY_FILE to read SECRET_KEY from a file at runtime and keep it out of /nix/store. ''; diff --git a/nixos/modules/services/web-apps/hedgedoc.nix b/nixos/modules/services/web-apps/hedgedoc.nix index fc66c3fa52a..e26dee68615 100644 --- a/nixos/modules/services/web-apps/hedgedoc.nix +++ b/nixos/modules/services/web-apps/hedgedoc.nix @@ -32,7 +32,7 @@ in ]; options.services.hedgedoc = { - enable = mkEnableOption "the HedgeDoc Markdown Editor"; + enable = mkEnableOption (lib.mdDoc "the HedgeDoc Markdown Editor"); groups = mkOption { type = types.listOf types.str; @@ -51,7 +51,7 @@ in }; settings = let options = { - debug = mkEnableOption "debug mode"; + debug = mkEnableOption (lib.mdDoc "debug mode"); domain = mkOption { type = types.nullOr types.str; default = null; @@ -990,27 +990,27 @@ in type = with types; nullOr path; default = null; example = "/var/lib/hedgedoc/hedgedoc.env"; - description = '' - Environment file as defined in systemd.exec5. + description = lib.mdDoc '' + Environment file as defined in {manpage}`systemd.exec(5)`. Secrets may be passed to the service without adding them to the world-readable Nix store, by specifying placeholder variables as the option value in Nix and setting these variables accordingly in the environment file. - + ``` # snippet of HedgeDoc-related config services.hedgedoc.configuration.dbURL = "postgres://hedgedoc:\''${DB_PASSWORD}@db-host:5432/hedgedocdb"; services.hedgedoc.configuration.minio.secretKey = "$MINIO_SECRET_KEY"; - + ``` - + ``` # content of the environment file DB_PASSWORD=verysecretdbpassword MINIO_SECRET_KEY=verysecretminiokey - + ``` Note that this file needs to be available on the host on which - HedgeDoc is running. + `HedgeDoc` is running. ''; }; diff --git a/nixos/modules/services/web-apps/hledger-web.nix b/nixos/modules/services/web-apps/hledger-web.nix index 4f02a637cdd..86716a02649 100644 --- a/nixos/modules/services/web-apps/hledger-web.nix +++ b/nixos/modules/services/web-apps/hledger-web.nix @@ -5,9 +5,9 @@ let in { options.services.hledger-web = { - enable = mkEnableOption "hledger-web service"; + enable = mkEnableOption (lib.mdDoc "hledger-web service"); - serveApi = mkEnableOption "Serve only the JSON web API, without the web UI."; + serveApi = mkEnableOption (lib.mdDoc "Serve only the JSON web API, without the web UI."); host = mkOption { type = types.str; diff --git a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix index b96baaec767..67d235ab447 100644 --- a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix +++ b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix @@ -12,7 +12,7 @@ in { meta.maintainers = with maintainers; [ das_j ]; options.services.icingaweb2 = with types; { - enable = mkEnableOption "the icingaweb2 web interface"; + enable = mkEnableOption (lib.mdDoc "the icingaweb2 web interface"); pool = mkOption { type = str; @@ -49,11 +49,11 @@ in { }; modules = { - doc.enable = mkEnableOption "the icingaweb2 doc module"; - migrate.enable = mkEnableOption "the icingaweb2 migrate module"; - setup.enable = mkEnableOption "the icingaweb2 setup module"; - test.enable = mkEnableOption "the icingaweb2 test module"; - translation.enable = mkEnableOption "the icingaweb2 translation module"; + doc.enable = mkEnableOption (lib.mdDoc "the icingaweb2 doc module"); + migrate.enable = mkEnableOption (lib.mdDoc "the icingaweb2 migrate module"); + setup.enable = mkEnableOption (lib.mdDoc "the icingaweb2 setup module"); + test.enable = mkEnableOption (lib.mdDoc "the icingaweb2 test module"); + translation.enable = mkEnableOption (lib.mdDoc "the icingaweb2 translation module"); }; modulePackages = mkOption { diff --git a/nixos/modules/services/web-apps/icingaweb2/module-monitoring.nix b/nixos/modules/services/web-apps/icingaweb2/module-monitoring.nix index 0579c602216..9a848870e9d 100644 --- a/nixos/modules/services/web-apps/icingaweb2/module-monitoring.nix +++ b/nixos/modules/services/web-apps/icingaweb2/module-monitoring.nix @@ -66,7 +66,7 @@ in { visible = false; default = name; type = str; - description = "Name of this backend"; + description = lib.mdDoc "Name of this backend"; }; resource = mkOption { @@ -98,7 +98,7 @@ in { visible = false; default = name; type = str; - description = "Name of this transport"; + description = lib.mdDoc "Name of this transport"; }; type = mkOption { diff --git a/nixos/modules/services/web-apps/ihatemoney/default.nix b/nixos/modules/services/web-apps/ihatemoney/default.nix index c771f0afa23..b0da0acfcf8 100644 --- a/nixos/modules/services/web-apps/ihatemoney/default.nix +++ b/nixos/modules/services/web-apps/ihatemoney/default.nix @@ -47,7 +47,7 @@ let in { options.services.ihatemoney = { - enable = mkEnableOption "ihatemoney webapp. Note that this will set uwsgi to emperor mode"; + enable = mkEnableOption (lib.mdDoc "ihatemoney webapp. Note that this will set uwsgi to emperor mode"); backend = mkOption { type = types.enum [ "sqlite" "postgresql" ]; default = "sqlite"; @@ -88,10 +88,10 @@ in default = true; description = lib.mdDoc "Use secure cookies. Disable this when ihatemoney is served via http instead of https"; }; - enableDemoProject = mkEnableOption "access to the demo project in ihatemoney"; - enablePublicProjectCreation = mkEnableOption "permission to create projects in ihatemoney by anyone"; - enableAdminDashboard = mkEnableOption "ihatemoney admin dashboard"; - enableCaptcha = mkEnableOption "a simplistic captcha for some forms"; + enableDemoProject = mkEnableOption (lib.mdDoc "access to the demo project in ihatemoney"); + enablePublicProjectCreation = mkEnableOption (lib.mdDoc "permission to create projects in ihatemoney by anyone"); + enableAdminDashboard = mkEnableOption (lib.mdDoc "ihatemoney admin dashboard"); + enableCaptcha = mkEnableOption (lib.mdDoc "a simplistic captcha for some forms"); legalLink = mkOption { type = types.nullOr types.str; default = null; diff --git a/nixos/modules/services/web-apps/invidious.nix b/nixos/modules/services/web-apps/invidious.nix index cf6e7f92f07..e106478628f 100644 --- a/nixos/modules/services/web-apps/invidious.nix +++ b/nixos/modules/services/web-apps/invidious.nix @@ -146,7 +146,7 @@ let in { options.services.invidious = { - enable = lib.mkEnableOption "Invidious"; + enable = lib.mkEnableOption (lib.mdDoc "Invidious"); package = lib.mkOption { type = types.package; diff --git a/nixos/modules/services/web-apps/invoiceplane.nix b/nixos/modules/services/web-apps/invoiceplane.nix index 2a936027bd4..156cc238e89 100644 --- a/nixos/modules/services/web-apps/invoiceplane.nix +++ b/nixos/modules/services/web-apps/invoiceplane.nix @@ -67,7 +67,7 @@ let { options = { - enable = mkEnableOption "InvoicePlane web application"; + enable = mkEnableOption (lib.mdDoc "InvoicePlane web application"); stateDir = mkOption { type = types.path; @@ -124,9 +124,12 @@ let invoiceTemplates = mkOption { type = types.listOf types.path; default = []; - description = '' + description = lib.mdDoc '' List of path(s) to respective template(s) which are copied from the 'invoice_templates/pdf' directory. - These templates need to be packaged before use, see example. + + ::: {.note} + These templates need to be packaged before use, see example. + ::: ''; example = literalExpression '' let diff --git a/nixos/modules/services/web-apps/isso.nix b/nixos/modules/services/web-apps/isso.nix index a5d3d8bd730..941e1dd0f9e 100644 --- a/nixos/modules/services/web-apps/isso.nix +++ b/nixos/modules/services/web-apps/isso.nix @@ -11,13 +11,13 @@ in { options = { services.isso = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' A commenting server similar to Disqus. Note: The application's author suppose to run isso behind a reverse proxy. The embedded solution offered by NixOS is also only suitable for small installations below 20 requests per second. - ''; + ''); settings = mkOption { description = lib.mdDoc '' diff --git a/nixos/modules/services/web-apps/jirafeau.nix b/nixos/modules/services/web-apps/jirafeau.nix index c95d8ffd524..293cbb3af42 100644 --- a/nixos/modules/services/web-apps/jirafeau.nix +++ b/nixos/modules/services/web-apps/jirafeau.nix @@ -36,7 +36,7 @@ in description = lib.mdDoc "Location of Jirafeau storage directory."; }; - enable = mkEnableOption "Jirafeau file upload application."; + enable = mkEnableOption (lib.mdDoc "Jirafeau file upload application."); extraConfig = mkOption { type = types.lines; @@ -45,12 +45,12 @@ in $cfg['style'] = 'courgette'; $cfg['organisation'] = 'ACME'; ''; - description = let + description = let documentationLink = "https://gitlab.com/mojo42/Jirafeau/-/blob/${cfg.package.version}/lib/config.original.php"; in - '' - Jirefeau configuration. Refer to for supported + lib.mdDoc '' + Jirefeau configuration. Refer to <${documentationLink}> for supported values. ''; }; @@ -73,10 +73,10 @@ in description = let nginxCoreDocumentation = "http://nginx.org/en/docs/http/ngx_http_core_module.html"; in - '' + lib.mdDoc '' Timeout for reading client request bodies and headers. Refer to - and - for accepted values. + <${nginxCoreDocumentation}#client_body_timeout> and + <${nginxCoreDocumentation}#client_header_timeout> for accepted values. ''; }; diff --git a/nixos/modules/services/web-apps/jitsi-meet.nix b/nixos/modules/services/web-apps/jitsi-meet.nix index ecc00c7899b..a42e249189f 100644 --- a/nixos/modules/services/web-apps/jitsi-meet.nix +++ b/nixos/modules/services/web-apps/jitsi-meet.nix @@ -46,7 +46,7 @@ let in { options.services.jitsi-meet = with types; { - enable = mkEnableOption "Jitsi Meet - Secure, Simple and Scalable Video Conferences"; + enable = mkEnableOption (lib.mdDoc "Jitsi Meet - Secure, Simple and Scalable Video Conferences"); hostName = mkOption { type = str; @@ -159,7 +159,7 @@ in ''; }; - caddy.enable = mkEnableOption "Whether to enable caddy reverse proxy to expose jitsi-meet"; + caddy.enable = mkEnableOption (lib.mdDoc "Whether to enable caddy reverse proxy to expose jitsi-meet"); prosody.enable = mkOption { type = bool; diff --git a/nixos/modules/services/web-apps/keycloak.nix b/nixos/modules/services/web-apps/keycloak.nix index 172a3e59335..da53d4ea76f 100644 --- a/nixos/modules/services/web-apps/keycloak.nix +++ b/nixos/modules/services/web-apps/keycloak.nix @@ -316,23 +316,21 @@ in default = "/"; example = "/auth"; apply = x: if !(hasPrefix "/") x then "/" + x else x; - description = '' - The path relative to / for serving + description = lib.mdDoc '' + The path relative to `/` for serving resources. - - - In versions of Keycloak using Wildfly (<17), - this defaulted to /auth. If - upgrading from the Wildfly version of Keycloak, - i.e. a NixOS version before 22.05, you'll likely - want to set this to /auth to - keep compatibility with your clients. + ::: {.note} + In versions of Keycloak using Wildfly (<17), + this defaulted to `/auth`. If + upgrading from the Wildfly version of Keycloak, + i.e. a NixOS version before 22.05, you'll likely + want to set this to `/auth` to + keep compatibility with your clients. - See - for more information on migrating from Wildfly to Quarkus. - - + See + for more information on migrating from Wildfly to Quarkus. + ::: ''; }; @@ -368,41 +366,21 @@ in type = enum [ "edge" "reencrypt" "passthrough" "none" ]; default = "none"; example = "edge"; - description = '' + description = lib.mdDoc '' The proxy address forwarding mode if the server is behind a reverse proxy. - - - edge - - - Enables communication through HTTP between the - proxy and Keycloak. - - - - - reencrypt - - - Requires communication through HTTPS between the - proxy and Keycloak. - - - - - passthrough - - - Enables communication through HTTP or HTTPS between - the proxy and Keycloak. - - - - + - `edge`: + Enables communication through HTTP between the + proxy and Keycloak. + - `reencrypt`: + Requires communication through HTTPS between the + proxy and Keycloak. + - `passthrough`: + Enables communication through HTTP or HTTPS between + the proxy and Keycloak. - See for more information. + See for more information. ''; }; }; diff --git a/nixos/modules/services/web-apps/komga.nix b/nixos/modules/services/web-apps/komga.nix index a2809e64a9c..31f475fc7b0 100644 --- a/nixos/modules/services/web-apps/komga.nix +++ b/nixos/modules/services/web-apps/komga.nix @@ -8,7 +8,7 @@ let in { options = { services.komga = { - enable = mkEnableOption "Komga, a free and open source comics/mangas media server"; + enable = mkEnableOption (lib.mdDoc "Komga, a free and open source comics/mangas media server"); port = mkOption { type = types.port; diff --git a/nixos/modules/services/web-apps/lemmy.nix b/nixos/modules/services/web-apps/lemmy.nix index 3e726149e93..c6889e2f404 100644 --- a/nixos/modules/services/web-apps/lemmy.nix +++ b/nixos/modules/services/web-apps/lemmy.nix @@ -12,7 +12,7 @@ in options.services.lemmy = { - enable = mkEnableOption "lemmy a federated alternative to reddit in rust"; + enable = mkEnableOption (lib.mdDoc "lemmy a federated alternative to reddit in rust"); jwtSecretPath = mkOption { type = types.path; @@ -27,7 +27,7 @@ in }; }; - caddy.enable = mkEnableOption "exposing lemmy with the caddy reverse proxy"; + caddy.enable = mkEnableOption (lib.mdDoc "exposing lemmy with the caddy reverse proxy"); settings = mkOption { default = { }; @@ -49,7 +49,7 @@ in }; options.federation = { - enabled = mkEnableOption "activitypub federation"; + enabled = mkEnableOption (lib.mdDoc "activitypub federation"); }; options.captcha = { @@ -65,7 +65,7 @@ in }; }; - options.database.createLocally = mkEnableOption "creation of database on the instance"; + options.database.createLocally = mkEnableOption (lib.mdDoc "creation of database on the instance"); }; }; diff --git a/nixos/modules/services/web-apps/limesurvey.nix b/nixos/modules/services/web-apps/limesurvey.nix index e0995e0b5a4..f6a1b559524 100644 --- a/nixos/modules/services/web-apps/limesurvey.nix +++ b/nixos/modules/services/web-apps/limesurvey.nix @@ -32,7 +32,7 @@ in # interface options.services.limesurvey = { - enable = mkEnableOption "Limesurvey web application."; + enable = mkEnableOption (lib.mdDoc "Limesurvey web application."); database = { type = mkOption { diff --git a/nixos/modules/services/web-apps/mastodon.nix b/nixos/modules/services/web-apps/mastodon.nix index 5abaad85b4f..779e7d4ad44 100644 --- a/nixos/modules/services/web-apps/mastodon.nix +++ b/nixos/modules/services/web-apps/mastodon.nix @@ -104,26 +104,26 @@ in { options = { services.mastodon = { - enable = lib.mkEnableOption "Mastodon, a federated social network server"; + enable = lib.mkEnableOption (lib.mdDoc "Mastodon, a federated social network server"); configureNginx = lib.mkOption { - description = '' + description = lib.mdDoc '' Configure nginx as a reverse proxy for mastodon. Note that this makes some assumptions on your setup, and sets settings that will affect other virtualHosts running on your nginx instance, if any. Alternatively you can configure a reverse-proxy of your choice to serve these paths: - / -> $(nix-instantiate --eval '<nixpkgs>' -A mastodon.outPath)/public + `/ -> $(nix-instantiate --eval '' -A mastodon.outPath)/public` - / -> 127.0.0.1:{{ webPort }} (If there was no file in the directory above.) + `/ -> 127.0.0.1:{{ webPort }} `(If there was no file in the directory above.) - /system/ -> /var/lib/mastodon/public-system/ + `/system/ -> /var/lib/mastodon/public-system/` - /api/v1/streaming/ -> 127.0.0.1:{{ streamingPort }} + `/api/v1/streaming/ -> 127.0.0.1:{{ streamingPort }}` Make sure that websockets are forwarded properly. You might want to set up caching of some requests. Take a look at mastodon's provided nginx configuration at - https://github.com/mastodon/mastodon/blob/master/dist/nginx.conf. + `https://github.com/mastodon/mastodon/blob/master/dist/nginx.conf`. ''; type = lib.types.bool; default = false; diff --git a/nixos/modules/services/web-apps/matomo.nix b/nixos/modules/services/web-apps/matomo.nix index f9927992a86..9e8d85161da 100644 --- a/nixos/modules/services/web-apps/matomo.nix +++ b/nixos/modules/services/web-apps/matomo.nix @@ -53,11 +53,11 @@ in { type = types.nullOr types.str; default = null; example = "lighttpd"; - description = '' - Name of the web server user that forwards requests to the fastcgi socket for Matomo if the nginx + description = lib.mdDoc '' + Name of the web server user that forwards requests to {option}`services.phpfpm.pools..socket` the fastcgi socket for Matomo if the nginx option is not used. Either this option or the nginx option is mandatory. If you want to use another webserver than nginx, you need to set this to that server's user - and pass fastcgi requests to index.php, matomo.php and piwik.php (legacy name) to this socket. + and pass fastcgi requests to `index.php`, `matomo.php` and `piwik.php` (legacy name) to this socket. ''; }; diff --git a/nixos/modules/services/web-apps/mattermost.nix b/nixos/modules/services/web-apps/mattermost.nix index 6e9e2abcaa8..71292c47d63 100644 --- a/nixos/modules/services/web-apps/mattermost.nix +++ b/nixos/modules/services/web-apps/mattermost.nix @@ -101,7 +101,7 @@ in { options = { services.mattermost = { - enable = mkEnableOption "Mattermost chat server"; + enable = mkEnableOption (lib.mdDoc "Mattermost chat server"); package = mkOption { type = types.package; @@ -234,7 +234,7 @@ in }; matterircd = { - enable = mkEnableOption "Mattermost IRC bridge"; + enable = mkEnableOption (lib.mdDoc "Mattermost IRC bridge"); package = mkOption { type = types.package; default = pkgs.matterircd; diff --git a/nixos/modules/services/web-apps/mediawiki.nix b/nixos/modules/services/web-apps/mediawiki.nix index 01083eff612..0260af77711 100644 --- a/nixos/modules/services/web-apps/mediawiki.nix +++ b/nixos/modules/services/web-apps/mediawiki.nix @@ -171,7 +171,7 @@ in options = { services.mediawiki = { - enable = mkEnableOption "MediaWiki"; + enable = mkEnableOption (lib.mdDoc "MediaWiki"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/web-apps/miniflux.nix b/nixos/modules/services/web-apps/miniflux.nix index 55e3664bee6..fad5701aeed 100644 --- a/nixos/modules/services/web-apps/miniflux.nix +++ b/nixos/modules/services/web-apps/miniflux.nix @@ -19,7 +19,7 @@ in { options = { services.miniflux = { - enable = mkEnableOption "miniflux and creates a local postgres database for it"; + enable = mkEnableOption (lib.mdDoc "miniflux and creates a local postgres database for it"); config = mkOption { type = types.attrsOf types.str; diff --git a/nixos/modules/services/web-apps/moodle.nix b/nixos/modules/services/web-apps/moodle.nix index 03dd57753ac..7c398aff899 100644 --- a/nixos/modules/services/web-apps/moodle.nix +++ b/nixos/modules/services/web-apps/moodle.nix @@ -62,7 +62,7 @@ in { # interface options.services.moodle = { - enable = mkEnableOption "Moodle web application"; + enable = mkEnableOption (lib.mdDoc "Moodle web application"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 84c6b077d03..fdbaa90ebb7 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -79,7 +79,7 @@ in { ]; options.services.nextcloud = { - enable = mkEnableOption "nextcloud"; + enable = mkEnableOption (lib.mdDoc "nextcloud"); hostName = mkOption { type = types.str; description = lib.mdDoc "FQDN for the nextcloud instance."; @@ -371,31 +371,31 @@ in { default = null; type = types.nullOr types.str; example = "DE"; - description = '' - - This option exists since Nextcloud 21! If older versions are used, - this will throw an eval-error! - + description = lib.mdDoc '' + ::: {.warning} + This option exists since Nextcloud 21! If older versions are used, + this will throw an eval-error! + ::: - ISO 3611-1 + [ISO 3611-1](https://www.iso.org/iso-3166-country-codes.html) country codes for automatic phone-number detection without a country code. - With e.g. DE set, the +49 can be omitted for + With e.g. `DE` set, the `+49` can be omitted for phone-numbers. ''; }; objectstore = { s3 = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' S3 object storage as primary storage. This mounts a bucket on an Amazon S3 object storage or compatible implementation into the virtual filesystem. Further details about this feature can be found in the - upstream documentation. - ''; + [upstream documentation](https://docs.nextcloud.com/server/22/admin_manual/configuration_files/primary_storage.html). + ''); bucket = mkOption { type = types.str; example = "nextcloud"; @@ -470,13 +470,13 @@ in { }; }; - enableImagemagick = mkEnableOption '' + enableImagemagick = mkEnableOption (lib.mdDoc '' the ImageMagick module for PHP. This is used by the theming app and for generating previews of certain images (e.g. SVG and HEIF). You may want to disable it for increased security. In that case, previews will still be available for some images (e.g. JPEG and PNG). - See . - '' // { + See . + '') // { default = true; }; @@ -519,8 +519,8 @@ in { type = with types; either str (listOf str); default = "05:00:00"; example = "Sun 14:00:00"; - description = '' - When to run the update. See `systemd.services.<name>.startAt`. + description = lib.mdDoc '' + When to run the update. See `systemd.services..startAt`. ''; }; }; @@ -529,29 +529,27 @@ in { default = occ; defaultText = literalMD "generated script"; internal = true; - description = '' + description = lib.mdDoc '' The nextcloud-occ program preconfigured to target this Nextcloud instance. ''; }; - globalProfiles = mkEnableOption "global profiles" // { - description = '' - Makes user-profiles globally available under nextcloud.tld/u/user.name. + globalProfiles = mkEnableOption (lib.mdDoc "global profiles") // { + description = lib.mdDoc '' + Makes user-profiles globally available under `nextcloud.tld/u/user.name`. Even though it's enabled by default in Nextcloud, it must be explicitly enabled here because it has the side-effect that personal information is even accessible to unauthenticated users by default. By default, the following properties are set to “Show to everyone” if this flag is enabled: - - About - Full name - Headline - Organisation - Profile picture - Role - Twitter - Website - + - About + - Full name + - Headline + - Organisation + - Profile picture + - Role + - Twitter + - Website Only has an effect in Nextcloud 23 and later. ''; diff --git a/nixos/modules/services/web-apps/nexus.nix b/nixos/modules/services/web-apps/nexus.nix index 64dc0b625db..1f4a758b87e 100644 --- a/nixos/modules/services/web-apps/nexus.nix +++ b/nixos/modules/services/web-apps/nexus.nix @@ -11,7 +11,7 @@ in { options = { services.nexus = { - enable = mkEnableOption "Sonatype Nexus3 OSS service"; + enable = mkEnableOption (lib.mdDoc "Sonatype Nexus3 OSS service"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/web-apps/nifi.nix b/nixos/modules/services/web-apps/nifi.nix index e3f30c710e0..f643e24d81d 100644 --- a/nixos/modules/services/web-apps/nifi.nix +++ b/nixos/modules/services/web-apps/nifi.nix @@ -27,7 +27,7 @@ let in { options = { services.nifi = { - enable = lib.mkEnableOption "Apache NiFi"; + enable = lib.mkEnableOption (lib.mdDoc "Apache NiFi"); package = lib.mkOption { type = lib.types.package; diff --git a/nixos/modules/services/web-apps/node-red.nix b/nixos/modules/services/web-apps/node-red.nix index e5b0998d3c4..f4d4ad9681a 100644 --- a/nixos/modules/services/web-apps/node-red.nix +++ b/nixos/modules/services/web-apps/node-red.nix @@ -17,7 +17,7 @@ let in { options.services.node-red = { - enable = mkEnableOption "the Node-RED service"; + enable = mkEnableOption (lib.mdDoc "the Node-RED service"); package = mkOption { default = pkgs.nodePackages.node-red; diff --git a/nixos/modules/services/web-apps/onlyoffice.nix b/nixos/modules/services/web-apps/onlyoffice.nix index 15fc3b03a83..ad0a527759c 100644 --- a/nixos/modules/services/web-apps/onlyoffice.nix +++ b/nixos/modules/services/web-apps/onlyoffice.nix @@ -7,9 +7,9 @@ let in { options.services.onlyoffice = { - enable = mkEnableOption "OnlyOffice DocumentServer"; + enable = mkEnableOption (lib.mdDoc "OnlyOffice DocumentServer"); - enableExampleServer = mkEnableOption "OnlyOffice example server"; + enableExampleServer = mkEnableOption (lib.mdDoc "OnlyOffice example server"); hostname = mkOption { type = types.str; diff --git a/nixos/modules/services/web-apps/openwebrx.nix b/nixos/modules/services/web-apps/openwebrx.nix index c409adbc710..72c5d6c7818 100644 --- a/nixos/modules/services/web-apps/openwebrx.nix +++ b/nixos/modules/services/web-apps/openwebrx.nix @@ -4,7 +4,7 @@ let in { options.services.openwebrx = with lib; { - enable = mkEnableOption "OpenWebRX Web interface for Software-Defined Radios on http://localhost:8073"; + enable = mkEnableOption (lib.mdDoc "OpenWebRX Web interface for Software-Defined Radios on http://localhost:8073"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/web-apps/outline.nix b/nixos/modules/services/web-apps/outline.nix index 363f3fce7c6..8a312d79584 100644 --- a/nixos/modules/services/web-apps/outline.nix +++ b/nixos/modules/services/web-apps/outline.nix @@ -12,7 +12,7 @@ in # https://github.com/outline/outline/blob/v0.65.2/shared/types.ts # The order is kept the same here to make updating easier. options.services.outline = { - enable = lib.mkEnableOption "outline"; + enable = lib.mkEnableOption (lib.mdDoc "outline"); package = lib.mkOption { default = pkgs.outline; @@ -29,13 +29,13 @@ in ${"''"}; }) ''; - description = "Outline package to use."; + description = lib.mdDoc "Outline package to use."; }; user = lib.mkOption { type = lib.types.str; default = defaultUser; - description = '' + description = lib.mdDoc '' User under which the service should run. If this is the default value, the user will be created, with the specified group as the primary group. @@ -45,7 +45,7 @@ in group = lib.mkOption { type = lib.types.str; default = defaultUser; - description = '' + description = lib.mdDoc '' Group under which the service should run. If this is the default value, the group will be created. ''; @@ -55,8 +55,8 @@ in type = lib.types.str; default = ""; example = "--env=production-ssl-disabled"; - description = '' - Optional arguments to pass to sequelize calls. + description = lib.mdDoc '' + Optional arguments to pass to `sequelize` calls. ''; }; @@ -67,7 +67,7 @@ in secretKeyFile = lib.mkOption { type = lib.types.str; default = "/var/lib/outline/secret_key"; - description = '' + description = lib.mdDoc '' File path that contains the application secret key. It must be 32 bytes long and hex-encoded. If the file does not exist, a new key will be generated and saved here. @@ -77,7 +77,7 @@ in utilsSecretFile = lib.mkOption { type = lib.types.str; default = "/var/lib/outline/utils_secret"; - description = '' + description = lib.mdDoc '' File path that contains the utility secret key. If the file does not exist, a new key will be generated and saved here. ''; @@ -86,49 +86,49 @@ in databaseUrl = lib.mkOption { type = lib.types.str; default = "local"; - description = '' + description = lib.mdDoc '' URI to use for the main PostgreSQL database. If this needs to include credentials that shouldn't be world-readable in the Nix store, set an environment file on the systemd service and override the - DATABASE_URL entry. Pass the string - local to setup a database on the local server. + `DATABASE_URL` entry. Pass the string + `local` to setup a database on the local server. ''; }; redisUrl = lib.mkOption { type = lib.types.str; default = "local"; - description = '' + description = lib.mdDoc '' Connection to a redis server. If this needs to include credentials that shouldn't be world-readable in the Nix store, set an environment file on the systemd service and override the - REDIS_URL entry. Pass the string - local to setup a local Redis database. + `REDIS_URL` entry. Pass the string + `local` to setup a local Redis database. ''; }; publicUrl = lib.mkOption { type = lib.types.str; default = "http://localhost:3000"; - description = "The fully qualified, publicly accessible URL"; + description = lib.mdDoc "The fully qualified, publicly accessible URL"; }; port = lib.mkOption { type = lib.types.port; default = 3000; - description = "Listening port."; + description = lib.mdDoc "Listening port."; }; storage = lib.mkOption { - description = '' + description = lib.mdDoc '' To support uploading of images for avatars and document attachments an s3-compatible storage must be provided. AWS S3 is recommended for redundency however if you want to keep all file storage local an - alternative such as minio + alternative such as [minio](https://github.com/minio/minio) can be used. A more detailed guide on setting up S3 is available - here. + [here](https://wiki.generaloutline.com/share/125de1cc-9ff6-424b-8415-0d58c809a40f). ''; example = lib.literalExpression '' { @@ -143,42 +143,42 @@ in options = { accessKey = lib.mkOption { type = lib.types.str; - description = "S3 access key."; + description = lib.mdDoc "S3 access key."; }; secretKeyFile = lib.mkOption { type = lib.types.path; - description = "File path that contains the S3 secret key."; + description = lib.mdDoc "File path that contains the S3 secret key."; }; region = lib.mkOption { type = lib.types.str; default = "xx-xxxx-x"; - description = "AWS S3 region name."; + description = lib.mdDoc "AWS S3 region name."; }; uploadBucketUrl = lib.mkOption { type = lib.types.str; - description = '' + description = lib.mdDoc '' URL endpoint of an S3-compatible API where uploads should be stored. ''; }; uploadBucketName = lib.mkOption { type = lib.types.str; - description = "Name of the bucket where uploads should be stored."; + description = lib.mdDoc "Name of the bucket where uploads should be stored."; }; uploadMaxSize = lib.mkOption { type = lib.types.int; default = 26214400; - description = "Maxmium file size for uploads."; + description = lib.mdDoc "Maxmium file size for uploads."; }; forcePathStyle = lib.mkOption { type = lib.types.bool; default = true; - description = "Force S3 path style."; + description = lib.mdDoc "Force S3 path style."; }; acl = lib.mkOption { type = lib.types.str; default = "private"; - description = "ACL setting."; + description = lib.mdDoc "ACL setting."; }; }; }; @@ -189,56 +189,56 @@ in # slackAuthentication = lib.mkOption { - description = '' + description = lib.mdDoc '' To configure Slack auth, you'll need to create an Application at https://api.slack.com/apps - When configuring the Client ID, add a redirect URL under "OAuth & Permissions" - to https://[publicUrl]/auth/slack.callback. + When configuring the Client ID, add a redirect URL under "OAuth & Permissions" + to `https://[publicUrl]/auth/slack.callback`. ''; default = null; type = lib.types.nullOr (lib.types.submodule { options = { clientId = lib.mkOption { type = lib.types.str; - description = "Authentication key."; + description = lib.mdDoc "Authentication key."; }; secretFile = lib.mkOption { type = lib.types.str; - description = "File path containing the authentication secret."; + description = lib.mdDoc "File path containing the authentication secret."; }; }; }); }; googleAuthentication = lib.mkOption { - description = '' + description = lib.mdDoc '' To configure Google auth, you'll need to create an OAuth Client ID at https://console.cloud.google.com/apis/credentials When configuring the Client ID, add an Authorized redirect URI to - https://[publicUrl]/auth/google.callback. + `https://[publicUrl]/auth/google.callback`. ''; default = null; type = lib.types.nullOr (lib.types.submodule { options = { clientId = lib.mkOption { type = lib.types.str; - description = "Authentication client identifier."; + description = lib.mdDoc "Authentication client identifier."; }; clientSecretFile = lib.mkOption { type = lib.types.str; - description = "File path containing the authentication secret."; + description = lib.mdDoc "File path containing the authentication secret."; }; }; }); }; azureAuthentication = lib.mkOption { - description = '' + description = lib.mdDoc '' To configure Microsoft/Azure auth, you'll need to create an OAuth Client. See - the guide + [the guide](https://wiki.generaloutline.com/share/dfa77e56-d4d2-4b51-8ff8-84ea6608faa4) for details on setting up your Azure App. ''; default = null; @@ -246,53 +246,53 @@ in options = { clientId = lib.mkOption { type = lib.types.str; - description = "Authentication client identifier."; + description = lib.mdDoc "Authentication client identifier."; }; clientSecretFile = lib.mkOption { type = lib.types.str; - description = "File path containing the authentication secret."; + description = lib.mdDoc "File path containing the authentication secret."; }; resourceAppId = lib.mkOption { type = lib.types.str; - description = "Authentication application resource ID."; + description = lib.mdDoc "Authentication application resource ID."; }; }; }); }; oidcAuthentication = lib.mkOption { - description = '' + description = lib.mdDoc '' To configure generic OIDC auth, you'll need some kind of identity provider. See the documentation for whichever IdP you use to fill out all the fields. The redirect URL is - https://[publicUrl]/auth/oidc.callback. + `https://[publicUrl]/auth/oidc.callback`. ''; default = null; type = lib.types.nullOr (lib.types.submodule { options = { clientId = lib.mkOption { type = lib.types.str; - description = "Authentication client identifier."; + description = lib.mdDoc "Authentication client identifier."; }; clientSecretFile = lib.mkOption { type = lib.types.str; - description = "File path containing the authentication secret."; + description = lib.mdDoc "File path containing the authentication secret."; }; authUrl = lib.mkOption { type = lib.types.str; - description = "OIDC authentication URL endpoint."; + description = lib.mdDoc "OIDC authentication URL endpoint."; }; tokenUrl = lib.mkOption { type = lib.types.str; - description = "OIDC token URL endpoint."; + description = lib.mdDoc "OIDC token URL endpoint."; }; userinfoUrl = lib.mkOption { type = lib.types.str; - description = "OIDC userinfo URL endpoint."; + description = lib.mdDoc "OIDC userinfo URL endpoint."; }; usernameClaim = lib.mkOption { type = lib.types.str; - description = '' + description = lib.mdDoc '' Specify which claims to derive user information from. Supports any valid JSON path with the JWT payload ''; @@ -300,12 +300,12 @@ in }; displayName = lib.mkOption { type = lib.types.str; - description = "Display name for OIDC authentication."; + description = lib.mdDoc "Display name for OIDC authentication."; default = "OpenID"; }; scopes = lib.mkOption { type = lib.types.listOf lib.types.str; - description = "OpenID authentication scopes."; + description = lib.mdDoc "OpenID authentication scopes."; default = [ "openid" "profile" "email" ]; }; }; @@ -319,28 +319,28 @@ in sslKeyFile = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; - description = '' + description = lib.mdDoc '' File path that contains the Base64-encoded private key for HTTPS termination. This is only required if you do not use an external reverse proxy. See - the documentation. + [the documentation](https://wiki.generaloutline.com/share/dfa77e56-d4d2-4b51-8ff8-84ea6608faa4). ''; }; sslCertFile = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; - description = '' + description = lib.mdDoc '' File path that contains the Base64-encoded certificate for HTTPS termination. This is only required if you do not use an external reverse proxy. See - the documentation. + [the documentation](https://wiki.generaloutline.com/share/dfa77e56-d4d2-4b51-8ff8-84ea6608faa4). ''; }; cdnUrl = lib.mkOption { type = lib.types.str; default = ""; - description = '' + description = lib.mdDoc '' If using a Cloudfront/Cloudflare distribution or similar it can be set using this option. This will cause paths to JavaScript files, stylesheets and images to be updated to the hostname defined here. In @@ -351,9 +351,9 @@ in forceHttps = lib.mkOption { type = lib.types.bool; default = true; - description = '' + description = lib.mdDoc '' Auto-redirect to HTTPS in production. The default is - true but you may set this to false + `true` but you may set this to `false` if you can be sure that SSL is terminated at an external loadbalancer. ''; }; @@ -361,7 +361,7 @@ in enableUpdateCheck = lib.mkOption { type = lib.types.bool; default = false; - description = '' + description = lib.mdDoc '' Have the installation check for updates by sending anonymized statistics to the maintainers. ''; @@ -370,7 +370,7 @@ in concurrency = lib.mkOption { type = lib.types.int; default = 1; - description = '' + description = lib.mdDoc '' How many processes should be spawned. For a rough estimate, divide your server's available memory by 512. ''; @@ -379,7 +379,7 @@ in maximumImportSize = lib.mkOption { type = lib.types.int; default = 5120000; - description = '' + description = lib.mdDoc '' The maximum size of document imports. Overriding this could be required if you have especially large Word documents with embedded imagery. ''; @@ -388,11 +388,11 @@ in debugOutput = lib.mkOption { type = lib.types.nullOr (lib.types.enum [ "http" ]); default = null; - description = "Set this to http log HTTP requests."; + description = lib.mdDoc "Set this to `http` log HTTP requests."; }; slackIntegration = lib.mkOption { - description = '' + description = lib.mdDoc '' For a complete Slack integration with search and posting to channels this configuration is also needed. See here for details: https://wiki.generaloutline.com/share/be25efd1-b3ef-4450-b8e5-c4a4fc11e02a @@ -402,16 +402,16 @@ in options = { verificationTokenFile = lib.mkOption { type = lib.types.str; - description = "File path containing the verification token."; + description = lib.mdDoc "File path containing the verification token."; }; appId = lib.mkOption { type = lib.types.str; - description = "Application ID."; + description = lib.mdDoc "Application ID."; }; messageActions = lib.mkOption { type = lib.types.bool; default = true; - description = "Whether to enable message actions."; + description = lib.mdDoc "Whether to enable message actions."; }; }; }); @@ -420,7 +420,7 @@ in googleAnalyticsId = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; - description = '' + description = lib.mdDoc '' Optionally enable Google Analytics to track page views in the knowledge base. ''; @@ -429,8 +429,8 @@ in sentryDsn = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; - description = '' - Optionally enable Sentry to + description = lib.mdDoc '' + Optionally enable [Sentry](https://sentry.io/) to track errors and performance. ''; }; @@ -438,14 +438,14 @@ in logo = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; - description = '' + description = lib.mdDoc '' Custom logo displayed on the authentication screen. This will be scaled to a height of 60px. ''; }; smtp = lib.mkOption { - description = '' + description = lib.mdDoc '' To support sending outgoing transactional emails such as "document updated" or "you've been invited" you'll need to provide authentication for an SMTP server. @@ -455,39 +455,39 @@ in options = { host = lib.mkOption { type = lib.types.str; - description = "Host name or IP adress of the SMTP server."; + description = lib.mdDoc "Host name or IP adress of the SMTP server."; }; port = lib.mkOption { type = lib.types.port; - description = "TCP port of the SMTP server."; + description = lib.mdDoc "TCP port of the SMTP server."; }; username = lib.mkOption { type = lib.types.str; - description = "Username to authenticate with."; + description = lib.mdDoc "Username to authenticate with."; }; passwordFile = lib.mkOption { type = lib.types.str; - description = '' + description = lib.mdDoc '' File path containing the password to authenticate with. ''; }; fromEmail = lib.mkOption { type = lib.types.str; - description = "Sender email in outgoing mail."; + description = lib.mdDoc "Sender email in outgoing mail."; }; replyEmail = lib.mkOption { type = lib.types.str; - description = "Reply address in outgoing mail."; + description = lib.mdDoc "Reply address in outgoing mail."; }; tlsCiphers = lib.mkOption { type = lib.types.str; default = ""; - description = "Override SMTP cipher configuration."; + description = lib.mdDoc "Override SMTP cipher configuration."; }; secure = lib.mkOption { type = lib.types.bool; default = true; - description = "Use a secure SMTP connection."; + description = lib.mdDoc "Use a secure SMTP connection."; }; }; }); @@ -516,24 +516,24 @@ in "zh_TW" ]; default = "en_US"; - description = '' + description = lib.mdDoc '' The default interface language. See - translate.getoutline.com + [translate.getoutline.com](https://translate.getoutline.com/) for a list of available language codes and their rough percentage translated. ''; }; - rateLimiter.enable = lib.mkEnableOption "rate limiter for the application web server"; + rateLimiter.enable = lib.mkEnableOption (lib.mdDoc "rate limiter for the application web server"); rateLimiter.requests = lib.mkOption { type = lib.types.int; default = 5000; - description = "Maximum number of requests in a throttling window."; + description = lib.mdDoc "Maximum number of requests in a throttling window."; }; rateLimiter.durationWindow = lib.mkOption { type = lib.types.int; default = 60; - description = "Length of a throttling window."; + description = lib.mdDoc "Length of a throttling window."; }; }; diff --git a/nixos/modules/services/web-apps/peertube.nix b/nixos/modules/services/web-apps/peertube.nix index c5a80e2d7d9..1ac6c15dace 100644 --- a/nixos/modules/services/web-apps/peertube.nix +++ b/nixos/modules/services/web-apps/peertube.nix @@ -69,7 +69,7 @@ let in { options.services.peertube = { - enable = lib.mkEnableOption "Enable Peertube’s service"; + enable = lib.mkEnableOption (lib.mdDoc "Enable Peertube’s service"); user = lib.mkOption { type = lib.types.str; diff --git a/nixos/modules/services/web-apps/pgpkeyserver-lite.nix b/nixos/modules/services/web-apps/pgpkeyserver-lite.nix index 2552441befe..0ab39b07931 100644 --- a/nixos/modules/services/web-apps/pgpkeyserver-lite.nix +++ b/nixos/modules/services/web-apps/pgpkeyserver-lite.nix @@ -18,7 +18,7 @@ in services.pgpkeyserver-lite = { - enable = mkEnableOption "pgpkeyserver-lite on a nginx vHost proxying to a gpg keyserver"; + enable = mkEnableOption (lib.mdDoc "pgpkeyserver-lite on a nginx vHost proxying to a gpg keyserver"); package = mkOption { default = pkgs.pgpkeyserver-lite; diff --git a/nixos/modules/services/web-apps/phylactery.nix b/nixos/modules/services/web-apps/phylactery.nix index d512b48539b..4801bd203b4 100644 --- a/nixos/modules/services/web-apps/phylactery.nix +++ b/nixos/modules/services/web-apps/phylactery.nix @@ -4,7 +4,7 @@ with lib; let cfg = config.services.phylactery; in { options.services.phylactery = { - enable = mkEnableOption "Whether to enable Phylactery server"; + enable = mkEnableOption (lib.mdDoc "Whether to enable Phylactery server"); host = mkOption { type = types.str; diff --git a/nixos/modules/services/web-apps/pict-rs.nix b/nixos/modules/services/web-apps/pict-rs.nix index ab5a9ed0735..ee9ff9b484f 100644 --- a/nixos/modules/services/web-apps/pict-rs.nix +++ b/nixos/modules/services/web-apps/pict-rs.nix @@ -10,7 +10,7 @@ in meta.doc = ./pict-rs.xml; options.services.pict-rs = { - enable = mkEnableOption "pict-rs server"; + enable = mkEnableOption (lib.mdDoc "pict-rs server"); dataDir = mkOption { type = types.path; default = "/var/lib/pict-rs"; diff --git a/nixos/modules/services/web-apps/plantuml-server.nix b/nixos/modules/services/web-apps/plantuml-server.nix index acd9292ceb4..5ebee48c3e0 100644 --- a/nixos/modules/services/web-apps/plantuml-server.nix +++ b/nixos/modules/services/web-apps/plantuml-server.nix @@ -11,7 +11,7 @@ in { options = { services.plantuml-server = { - enable = mkEnableOption "PlantUML server"; + enable = mkEnableOption (lib.mdDoc "PlantUML server"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/web-apps/plausible.nix b/nixos/modules/services/web-apps/plausible.nix index d938cc0ad83..e5dc1b10360 100644 --- a/nixos/modules/services/web-apps/plausible.nix +++ b/nixos/modules/services/web-apps/plausible.nix @@ -7,7 +7,7 @@ let in { options.services.plausible = { - enable = mkEnableOption "plausible"; + enable = mkEnableOption (lib.mdDoc "plausible"); releaseCookiePath = mkOption { type = with types; either str path; @@ -40,12 +40,12 @@ in { ''; }; - activate = mkEnableOption "activating the freshly created admin-user"; + activate = mkEnableOption (lib.mdDoc "activating the freshly created admin-user"); }; database = { clickhouse = { - setup = mkEnableOption "creating a clickhouse instance" // { default = true; }; + setup = mkEnableOption (lib.mdDoc "creating a clickhouse instance") // { default = true; }; url = mkOption { default = "http://localhost:8123/default"; type = types.str; @@ -55,7 +55,7 @@ in { }; }; postgres = { - setup = mkEnableOption "creating a postgresql instance" // { default = true; }; + setup = mkEnableOption (lib.mdDoc "creating a postgresql instance") // { default = true; }; dbname = mkOption { default = "plausible"; type = types.str; @@ -148,7 +148,7 @@ in { The path to the file with the password in case SMTP auth is enabled. ''; }; - enableSSL = mkEnableOption "SSL when connecting to the SMTP server"; + enableSSL = mkEnableOption (lib.mdDoc "SSL when connecting to the SMTP server"); retries = mkOption { type = types.ints.unsigned; default = 2; diff --git a/nixos/modules/services/web-apps/powerdns-admin.nix b/nixos/modules/services/web-apps/powerdns-admin.nix index c2d65f59e4d..e9f7f41055e 100644 --- a/nixos/modules/services/web-apps/powerdns-admin.nix +++ b/nixos/modules/services/web-apps/powerdns-admin.nix @@ -19,7 +19,7 @@ let in { options.services.powerdns-admin = { - enable = mkEnableOption "the PowerDNS web interface"; + enable = mkEnableOption (lib.mdDoc "the PowerDNS web interface"); extraArgs = mkOption { type = types.listOf types.str; diff --git a/nixos/modules/services/web-apps/prosody-filer.nix b/nixos/modules/services/web-apps/prosody-filer.nix index 1d40809c420..279b4104b0a 100644 --- a/nixos/modules/services/web-apps/prosody-filer.nix +++ b/nixos/modules/services/web-apps/prosody-filer.nix @@ -11,7 +11,7 @@ in { options = { services.prosody-filer = { - enable = mkEnableOption "Prosody Filer XMPP upload file server"; + enable = mkEnableOption (lib.mdDoc "Prosody Filer XMPP upload file server"); settings = mkOption { description = lib.mdDoc '' diff --git a/nixos/modules/services/web-apps/restya-board.nix b/nixos/modules/services/web-apps/restya-board.nix index ae80a7866a1..69f9b3ebe5b 100644 --- a/nixos/modules/services/web-apps/restya-board.nix +++ b/nixos/modules/services/web-apps/restya-board.nix @@ -25,7 +25,7 @@ in services.restya-board = { - enable = mkEnableOption "restya-board"; + enable = mkEnableOption (lib.mdDoc "restya-board"); dataDir = mkOption { type = types.path; diff --git a/nixos/modules/services/web-apps/rss-bridge.nix b/nixos/modules/services/web-apps/rss-bridge.nix index bef3d9de2a1..1a710f4a6a6 100644 --- a/nixos/modules/services/web-apps/rss-bridge.nix +++ b/nixos/modules/services/web-apps/rss-bridge.nix @@ -11,7 +11,7 @@ in { options = { services.rss-bridge = { - enable = mkEnableOption "rss-bridge"; + enable = mkEnableOption (lib.mdDoc "rss-bridge"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/web-apps/selfoss.nix b/nixos/modules/services/web-apps/selfoss.nix index 016e053c802..8debd4904e8 100644 --- a/nixos/modules/services/web-apps/selfoss.nix +++ b/nixos/modules/services/web-apps/selfoss.nix @@ -30,7 +30,7 @@ in { options = { services.selfoss = { - enable = mkEnableOption "selfoss"; + enable = mkEnableOption (lib.mdDoc "selfoss"); user = mkOption { type = types.str; diff --git a/nixos/modules/services/web-apps/shiori.nix b/nixos/modules/services/web-apps/shiori.nix index 494f8587306..7bd0a4d2b9b 100644 --- a/nixos/modules/services/web-apps/shiori.nix +++ b/nixos/modules/services/web-apps/shiori.nix @@ -6,7 +6,7 @@ let in { options = { services.shiori = { - enable = mkEnableOption "Shiori simple bookmarks manager"; + enable = mkEnableOption (lib.mdDoc "Shiori simple bookmarks manager"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/web-apps/snipe-it.nix b/nixos/modules/services/web-apps/snipe-it.nix index c0d29b048a3..264b72fe837 100644 --- a/nixos/modules/services/web-apps/snipe-it.nix +++ b/nixos/modules/services/web-apps/snipe-it.nix @@ -28,7 +28,7 @@ let in { options.services.snipe-it = { - enable = mkEnableOption "A free open source IT asset/license management system"; + enable = mkEnableOption (lib.mdDoc "A free open source IT asset/license management system"); user = mkOption { default = "snipeit"; @@ -250,7 +250,7 @@ in { options = { _secret = mkOption { type = nullOr (oneOf [ str path ]); - description = '' + description = lib.mdDoc '' The path to a file containing the value the option should be set to in the final configuration file. diff --git a/nixos/modules/services/web-apps/sogo.nix b/nixos/modules/services/web-apps/sogo.nix index a134282de83..ca1f426623f 100644 --- a/nixos/modules/services/web-apps/sogo.nix +++ b/nixos/modules/services/web-apps/sogo.nix @@ -18,7 +18,7 @@ in { options.services.sogo = with types; { - enable = mkEnableOption "SOGo groupware"; + enable = mkEnableOption (lib.mdDoc "SOGo groupware"); vhostName = mkOption { description = lib.mdDoc "Name of the nginx vhost"; diff --git a/nixos/modules/services/web-apps/trilium.nix b/nixos/modules/services/web-apps/trilium.nix index bb1061cf278..81ed7ca83bc 100644 --- a/nixos/modules/services/web-apps/trilium.nix +++ b/nixos/modules/services/web-apps/trilium.nix @@ -24,7 +24,7 @@ in { options.services.trilium-server = with lib; { - enable = mkEnableOption "trilium-server"; + enable = mkEnableOption (lib.mdDoc "trilium-server"); dataDir = mkOption { type = types.str; diff --git a/nixos/modules/services/web-apps/tt-rss.nix b/nixos/modules/services/web-apps/tt-rss.nix index f105b0aa3f7..870e8f4795b 100644 --- a/nixos/modules/services/web-apps/tt-rss.nix +++ b/nixos/modules/services/web-apps/tt-rss.nix @@ -121,7 +121,7 @@ let services.tt-rss = { - enable = mkEnableOption "tt-rss"; + enable = mkEnableOption (lib.mdDoc "tt-rss"); root = mkOption { type = types.path; diff --git a/nixos/modules/services/web-apps/vikunja.nix b/nixos/modules/services/web-apps/vikunja.nix index 7db61015980..c3552200d4e 100644 --- a/nixos/modules/services/web-apps/vikunja.nix +++ b/nixos/modules/services/web-apps/vikunja.nix @@ -10,7 +10,7 @@ let usePostgresql = cfg.database.type == "postgres"; in { options.services.vikunja = with lib; { - enable = mkEnableOption "vikunja service"; + enable = mkEnableOption (lib.mdDoc "vikunja service"); package-api = mkOption { default = pkgs.vikunja-api; type = types.package; diff --git a/nixos/modules/services/web-apps/whitebophir.nix b/nixos/modules/services/web-apps/whitebophir.nix index c4dee3c6eec..b673a7c1179 100644 --- a/nixos/modules/services/web-apps/whitebophir.nix +++ b/nixos/modules/services/web-apps/whitebophir.nix @@ -7,7 +7,7 @@ let in { options = { services.whitebophir = { - enable = mkEnableOption "whitebophir, an online collaborative whiteboard server (persistent state will be maintained under /var/lib/whitebophir)"; + enable = mkEnableOption (lib.mdDoc "whitebophir, an online collaborative whiteboard server (persistent state will be maintained under {file}`/var/lib/whitebophir`)"); package = mkOption { default = pkgs.whitebophir; diff --git a/nixos/modules/services/web-apps/wiki-js.nix b/nixos/modules/services/web-apps/wiki-js.nix index c648cfff6ce..9cdbe989a35 100644 --- a/nixos/modules/services/web-apps/wiki-js.nix +++ b/nixos/modules/services/web-apps/wiki-js.nix @@ -10,7 +10,7 @@ let configFile = format.generate "wiki-js.yml" cfg.settings; in { options.services.wiki-js = { - enable = mkEnableOption "wiki-js"; + enable = mkEnableOption (lib.mdDoc "wiki-js"); environmentFile = mkOption { type = types.nullOr types.path; @@ -85,25 +85,23 @@ in { ''; }; - offline = mkEnableOption "offline mode" // { - description = '' + offline = mkEnableOption (lib.mdDoc "offline mode") // { + description = lib.mdDoc '' Disable latest file updates and enable - sideloading. + [sideloading](https://docs.requarks.io/install/sideload). ''; }; }; }; - description = '' - Settings to configure wiki-js. This directly - corresponds to the upstream configuration options. + description = lib.mdDoc '' + Settings to configure `wiki-js`. This directly + corresponds to [the upstream configuration options](https://docs.requarks.io/install/config). Secrets can be injected via the environment by - - specifying - to contain secrets - and setting sensitive values to $(ENVIRONMENT_VAR) - with this value defined in the environment-file. - + - specifying [](#opt-services.wiki-js.environmentFile) + to contain secrets + - and setting sensitive values to `$(ENVIRONMENT_VAR)` + with this value defined in the environment-file. ''; }; }; diff --git a/nixos/modules/services/web-apps/wordpress.nix b/nixos/modules/services/web-apps/wordpress.nix index c841ded353e..f2e78d02855 100644 --- a/nixos/modules/services/web-apps/wordpress.nix +++ b/nixos/modules/services/web-apps/wordpress.nix @@ -97,9 +97,12 @@ let plugins = mkOption { type = types.listOf types.path; default = []; - description = '' + description = lib.mdDoc '' List of path(s) to respective plugin(s) which are copied from the 'plugins' directory. - These plugins need to be packaged before use, see example. + + ::: {.note} + These plugins need to be packaged before use, see example. + ::: ''; example = literalExpression '' let @@ -124,9 +127,12 @@ let themes = mkOption { type = types.listOf types.path; default = []; - description = '' + description = lib.mdDoc '' List of path(s) to respective theme(s) which are copied from the 'theme' directory. - These themes need to be packaged before use, see example. + + ::: {.note} + These themes need to be packaged before use, see example. + ::: ''; example = literalExpression '' let diff --git a/nixos/modules/services/web-apps/youtrack.nix b/nixos/modules/services/web-apps/youtrack.nix index 789880d61f6..0db8a98d1eb 100644 --- a/nixos/modules/services/web-apps/youtrack.nix +++ b/nixos/modules/services/web-apps/youtrack.nix @@ -21,7 +21,7 @@ in { options.services.youtrack = { - enable = mkEnableOption "YouTrack service"; + enable = mkEnableOption (lib.mdDoc "YouTrack service"); address = mkOption { description = lib.mdDoc '' diff --git a/nixos/modules/services/web-apps/zabbix.nix b/nixos/modules/services/web-apps/zabbix.nix index c6ac809a73b..0e43922f35d 100644 --- a/nixos/modules/services/web-apps/zabbix.nix +++ b/nixos/modules/services/web-apps/zabbix.nix @@ -40,7 +40,7 @@ in options.services = { zabbixWeb = { - enable = mkEnableOption "the Zabbix web interface"; + enable = mkEnableOption (lib.mdDoc "the Zabbix web interface"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/web-servers/agate.nix b/nixos/modules/services/web-servers/agate.nix index 3f7b298fa94..9d635c64a44 100644 --- a/nixos/modules/services/web-servers/agate.nix +++ b/nixos/modules/services/web-servers/agate.nix @@ -8,7 +8,7 @@ in { options = { services.agate = { - enable = mkEnableOption "Agate Server"; + enable = mkEnableOption (lib.mdDoc "Agate Server"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index a8c9fe26369..6b43d46fdea 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -404,7 +404,7 @@ in services.httpd = { - enable = mkEnableOption "the Apache HTTP Server"; + enable = mkEnableOption (lib.mdDoc "the Apache HTTP Server"); package = mkOption { type = types.package; @@ -445,11 +445,11 @@ in { name = "jk"; path = "''${pkgs.tomcat_connectors}/modules/mod_jk.so"; } ] ''; - description = '' + description = lib.mdDoc '' Additional Apache modules to be used. These can be specified as a string in the case of modules distributed with Apache, or as an attribute set specifying the - name and path of the + {var}`name` and {var}`path` of the module. ''; }; @@ -484,14 +484,14 @@ in user = mkOption { type = types.str; default = "wwwrun"; - description = '' + description = lib.mdDoc '' User account under which httpd children processes run. If you require the main httpd process to run as - root add the following configuration: - + `root` add the following configuration: + ``` systemd.services.httpd.serviceConfig.User = lib.mkForce "root"; - + ``` ''; }; diff --git a/nixos/modules/services/web-servers/apache-httpd/vhost-options.nix b/nixos/modules/services/web-servers/apache-httpd/vhost-options.nix index 4f84cad7351..0d60d533c99 100644 --- a/nixos/modules/services/web-servers/apache-httpd/vhost-options.nix +++ b/nixos/modules/services/web-servers/apache-httpd/vhost-options.nix @@ -45,16 +45,14 @@ in { ip = "192.154.1.1"; port = 80; } { ip = "*"; port = 8080; } ]; - description = '' + description = lib.mdDoc '' Listen addresses and ports for this virtual host. - - - This option overrides addSSL, forceSSL and onlySSL. - - - If you only want to set the addresses manually and not the ports, take a look at listenAddresses. - - + + ::: {.note} + This option overrides `addSSL`, `forceSSL` and `onlySSL`. + + If you only want to set the addresses manually and not the ports, take a look at `listenAddresses`. + ::: ''; }; @@ -118,12 +116,12 @@ in useACMEHost = mkOption { type = types.nullOr types.str; default = null; - description = '' + description = lib.mdDoc '' A host of an existing Let's Encrypt certificate to use. This is useful if you have many subdomains and want to avoid hitting the - rate limit. - Alternately, you can generate a certificate through . - Note that this option does not create any certificates, nor it does add subdomains to existing ones – you will need to create them manually using . + [rate limit](https://letsencrypt.org/docs/rate-limits). + Alternately, you can generate a certificate through {option}`enableACME`. + *Note that this option does not create any certificates, nor it does add subdomains to existing ones – you will need to create them manually using [](#opt-security.acme.certs).* ''; }; @@ -202,14 +200,14 @@ in file = "/home/eelco/some-file.png"; } ]; - description = '' + description = lib.mdDoc '' This option provides a simple way to serve individual, static files. - - This option has been deprecated and will be removed in a future - version of NixOS. You can achieve the same result by making use of - the locations.<name>.alias option. - + ::: {.note} + This option has been deprecated and will be removed in a future + version of NixOS. You can achieve the same result by making use of + the `locations..alias` option. + ::: ''; }; diff --git a/nixos/modules/services/web-servers/caddy/default.nix b/nixos/modules/services/web-servers/caddy/default.nix index 8ff01bcb90c..e364cb33be3 100644 --- a/nixos/modules/services/web-servers/caddy/default.nix +++ b/nixos/modules/services/web-servers/caddy/default.nix @@ -52,33 +52,33 @@ in # interface options.services.caddy = { - enable = mkEnableOption "Caddy web server"; + enable = mkEnableOption (lib.mdDoc "Caddy web server"); user = mkOption { default = "caddy"; type = types.str; - description = '' + description = lib.mdDoc '' User account under which caddy runs. - - If left as the default value this user will automatically be created - on system activation, otherwise you are responsible for - ensuring the user exists before the Caddy service starts. - + ::: {.note} + If left as the default value this user will automatically be created + on system activation, otherwise you are responsible for + ensuring the user exists before the Caddy service starts. + ::: ''; }; group = mkOption { default = "caddy"; type = types.str; - description = '' + description = lib.mdDoc '' Group account under which caddy runs. - - If left as the default value this user will automatically be created - on system activation, otherwise you are responsible for - ensuring the user exists before the Caddy service starts. - + ::: {.note} + If left as the default value this user will automatically be created + on system activation, otherwise you are responsible for + ensuring the user exists before the Caddy service starts. + ::: ''; }; @@ -94,34 +94,31 @@ in dataDir = mkOption { type = types.path; default = "/var/lib/caddy"; - description = '' + description = lib.mdDoc '' The data directory for caddy. - - - If left as the default value this directory will automatically be created - before the Caddy server starts, otherwise you are responsible for ensuring - the directory exists with appropriate ownership and permissions. - - - Caddy v2 replaced CADDYPATH with XDG directories. - See . - - + ::: {.note} + If left as the default value this directory will automatically be created + before the Caddy server starts, otherwise you are responsible for ensuring + the directory exists with appropriate ownership and permissions. + + Caddy v2 replaced `CADDYPATH` with XDG directories. + See . + ::: ''; }; logDir = mkOption { type = types.path; default = "/var/log/caddy"; - description = '' + description = lib.mdDoc '' Directory for storing Caddy access logs. - - If left as the default value this directory will automatically be created - before the Caddy server starts, otherwise the sysadmin is responsible for - ensuring the directory exists with appropriate ownership and permissions. - + ::: {.note} + If left as the default value this directory will automatically be created + before the Caddy server starts, otherwise the sysadmin is responsible for + ensuring the directory exists with appropriate ownership and permissions. + ::: ''; }; @@ -163,15 +160,15 @@ in default = "caddyfile"; example = "nginx"; type = types.str; - description = '' + description = lib.mdDoc '' Name of the config adapter to use. - See + See for the full list. - - Any value other than caddyfile is only valid when - providing your own . - + ::: {.note} + Any value other than `caddyfile` is only valid when + providing your own {option}`configFile`. + ::: ''; }; diff --git a/nixos/modules/services/web-servers/caddy/vhost-options.nix b/nixos/modules/services/web-servers/caddy/vhost-options.nix index 3945153fa2c..229b53efb49 100644 --- a/nixos/modules/services/web-servers/caddy/vhost-options.nix +++ b/nixos/modules/services/web-servers/caddy/vhost-options.nix @@ -33,14 +33,14 @@ in useACMEHost = mkOption { type = types.nullOr types.str; default = null; - description = '' + description = lib.mdDoc '' A host of an existing Let's Encrypt certificate to use. This is mostly useful if you use DNS challenges but Caddy does not currently support your provider. - Note that this option does not create any certificates, nor + *Note that this option does not create any certificates, nor does it add subdomains to existing ones – you will need to create them - manually using . + manually using [](#opt-security.acme.certs).* ''; }; diff --git a/nixos/modules/services/web-servers/darkhttpd.nix b/nixos/modules/services/web-servers/darkhttpd.nix index ca079ea0051..1e3a7166bc4 100644 --- a/nixos/modules/services/web-servers/darkhttpd.nix +++ b/nixos/modules/services/web-servers/darkhttpd.nix @@ -15,7 +15,7 @@ let in { options.services.darkhttpd = with types; { - enable = mkEnableOption "DarkHTTPd web server"; + enable = mkEnableOption (lib.mdDoc "DarkHTTPd web server"); port = mkOption { default = 80; diff --git a/nixos/modules/services/web-servers/hitch/default.nix b/nixos/modules/services/web-servers/hitch/default.nix index 78bae140556..6c8b3cda5f7 100644 --- a/nixos/modules/services/web-servers/hitch/default.nix +++ b/nixos/modules/services/web-servers/hitch/default.nix @@ -17,7 +17,7 @@ with lib; { options = { services.hitch = { - enable = mkEnableOption "Hitch Server"; + enable = mkEnableOption (lib.mdDoc "Hitch Server"); backend = mkOption { type = types.str; @@ -36,9 +36,9 @@ with lib; frontend = mkOption { type = types.either types.str (types.listOf types.str); default = "[127.0.0.1]:443"; - description = '' + description = lib.mdDoc '' The port and interface of the listen endpoint in the -+ form [HOST]:PORT[+CERT]. + form [HOST]:PORT[+CERT]. ''; apply = toList; }; diff --git a/nixos/modules/services/web-servers/hydron.nix b/nixos/modules/services/web-servers/hydron.nix index 292493c4c7b..4434965b217 100644 --- a/nixos/modules/services/web-servers/hydron.nix +++ b/nixos/modules/services/web-servers/hydron.nix @@ -4,7 +4,7 @@ let cfg = config.services.hydron; in with lib; { options.services.hydron = { - enable = mkEnableOption "hydron"; + enable = mkEnableOption (lib.mdDoc "hydron"); dataDir = mkOption { type = types.path; diff --git a/nixos/modules/services/web-servers/keter/default.nix b/nixos/modules/services/web-servers/keter/default.nix index 83e221add37..42ab6640b4c 100644 --- a/nixos/modules/services/web-servers/keter/default.nix +++ b/nixos/modules/services/web-servers/keter/default.nix @@ -8,22 +8,22 @@ in }; options.services.keter = { - enable = lib.mkEnableOption ''keter, a web app deployment manager. + enable = lib.mkEnableOption (lib.mdDoc ''keter, a web app deployment manager. Note that this module only support loading of webapps: Keep an old app running and swap the ports when the new one is booted. -''; +''); keterRoot = lib.mkOption { type = lib.types.str; default = "/var/lib/keter"; - description = "Mutable state folder for keter"; + description = lib.mdDoc "Mutable state folder for keter"; }; keterPackage = lib.mkOption { type = lib.types.package; default = pkgs.haskellPackages.keter; defaultText = lib.literalExpression "pkgs.haskellPackages.keter"; - description = "The keter package to be used"; + description = lib.mdDoc "The keter package to be used"; }; globalKeterConfig = lib.mkOption { @@ -47,31 +47,31 @@ Keep an old app running and swap the ports when the new one is booted. }]; } ''; - description = "Global config for keter"; + description = lib.mdDoc "Global config for keter"; }; bundle = { appName = lib.mkOption { type = lib.types.str; default = "myapp"; - description = "The name keter assigns to this bundle"; + description = lib.mdDoc "The name keter assigns to this bundle"; }; executable = lib.mkOption { type = lib.types.path; - description = "The executable to be run"; + description = lib.mdDoc "The executable to be run"; }; domain = lib.mkOption { type = lib.types.str; default = "example.com"; - description = "The domain keter will bind to"; + description = lib.mdDoc "The domain keter will bind to"; }; publicScript = lib.mkOption { type = lib.types.str; default = ""; - description = '' + description = lib.mdDoc '' Allows loading of public environment variables, these are emitted to the log so it shouldn't contain secrets. ''; @@ -81,7 +81,7 @@ Keep an old app running and swap the ports when the new one is booted. secretScript = lib.mkOption { type = lib.types.str; default = ""; - description = "Allows loading of private environment variables"; + description = lib.mdDoc "Allows loading of private environment variables"; example = "MY_AWS_KEY=$(cat /run/keys/AWS_ACCESS_KEY_ID)"; }; }; diff --git a/nixos/modules/services/web-servers/lighttpd/collectd.nix b/nixos/modules/services/web-servers/lighttpd/collectd.nix index 78d507f1d7d..9a4285e3e2d 100644 --- a/nixos/modules/services/web-servers/lighttpd/collectd.nix +++ b/nixos/modules/services/web-servers/lighttpd/collectd.nix @@ -25,7 +25,7 @@ in options.services.lighttpd.collectd = { - enable = mkEnableOption "collectd subservice accessible at http://yourserver/collectd"; + enable = mkEnableOption (lib.mdDoc "collectd subservice accessible at http://yourserver/collectd"); collectionCgi = mkOption { type = types.path; diff --git a/nixos/modules/services/web-servers/mighttpd2.nix b/nixos/modules/services/web-servers/mighttpd2.nix index 523b5de2d69..2d887af87c7 100644 --- a/nixos/modules/services/web-servers/mighttpd2.nix +++ b/nixos/modules/services/web-servers/mighttpd2.nix @@ -8,7 +8,7 @@ let routingFile = pkgs.writeText "mighty-routing" cfg.routing; in { options.services.mighttpd2 = { - enable = mkEnableOption "Mighttpd2 web server"; + enable = mkEnableOption (lib.mdDoc "Mighttpd2 web server"); config = mkOption { default = ""; diff --git a/nixos/modules/services/web-servers/minio.nix b/nixos/modules/services/web-servers/minio.nix index 60e3068521c..1a9eacb431b 100644 --- a/nixos/modules/services/web-servers/minio.nix +++ b/nixos/modules/services/web-servers/minio.nix @@ -14,7 +14,7 @@ in meta.maintainers = [ maintainers.bachp ]; options.services.minio = { - enable = mkEnableOption "Minio Object Storage"; + enable = mkEnableOption (lib.mdDoc "Minio Object Storage"); listenAddress = mkOption { default = ":9000"; diff --git a/nixos/modules/services/web-servers/molly-brown.nix b/nixos/modules/services/web-servers/molly-brown.nix index 31a2e856db4..6d7ca0c12ef 100644 --- a/nixos/modules/services/web-servers/molly-brown.nix +++ b/nixos/modules/services/web-servers/molly-brown.nix @@ -10,7 +10,7 @@ in { options.services.molly-brown = { - enable = mkEnableOption "Molly-Brown Gemini server"; + enable = mkEnableOption (lib.mdDoc "Molly-Brown Gemini server"); port = mkOption { default = 1965; @@ -34,16 +34,16 @@ in { certPath = mkOption { type = types.path; example = "/var/lib/acme/example.com/cert.pem"; - description = '' + description = lib.mdDoc '' Path to TLS certificate. An ACME certificate and key may be shared with an HTTP server, but only if molly-brown has permissions allowing it to read such keys. As an example: - + ``` systemd.services.molly-brown.serviceConfig.SupplementaryGroups = [ config.security.acme.certs."example.com".group ]; - + ``` ''; }; diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index 0c4b2246a1b..aa782b4267e 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -385,7 +385,7 @@ in { options = { services.nginx = { - enable = mkEnableOption "Nginx Web Server"; + enable = mkEnableOption (lib.mdDoc "Nginx Web Server"); statusPage = mkOption { default = false; @@ -499,21 +499,16 @@ in config = mkOption { type = types.str; default = ""; - description = '' - Verbatim nginx.conf configuration. + description = lib.mdDoc '' + Verbatim {file}`nginx.conf` configuration. This is mutually exclusive to any other config option for - nginx.conf except for - - - - - - - - + {file}`nginx.conf` except for + - [](#opt-services.nginx.appendConfig) + - [](#opt-services.nginx.httpConfig) + - [](#opt-services.nginx.logError) If additional verbatim config in addition to other options is needed, - should be used instead. + [](#opt-services.nginx.appendConfig) should be used instead. ''; }; diff --git a/nixos/modules/services/web-servers/nginx/vhost-options.nix b/nixos/modules/services/web-servers/nginx/vhost-options.nix index 96006f88758..ccf8804943a 100644 --- a/nixos/modules/services/web-servers/nginx/vhost-options.nix +++ b/nixos/modules/services/web-servers/nginx/vhost-options.nix @@ -75,12 +75,12 @@ with lib; useACMEHost = mkOption { type = types.nullOr types.str; default = null; - description = '' + description = lib.mdDoc '' A host of an existing Let's Encrypt certificate to use. This is useful if you have many subdomains and want to avoid hitting the - rate limit. - Alternately, you can generate a certificate through . - Note that this option does not create any certificates, nor it does add subdomains to existing ones – you will need to create them manually using . + [rate limit](https://letsencrypt.org/docs/rate-limits). + Alternately, you can generate a certificate through {option}`enableACME`. + *Note that this option does not create any certificates, nor it does add subdomains to existing ones – you will need to create them manually using [](#opt-security.acme.certs).* ''; }; diff --git a/nixos/modules/services/web-servers/phpfpm/default.nix b/nixos/modules/services/web-servers/phpfpm/default.nix index e24c77d056a..0bd1d5b29b3 100644 --- a/nixos/modules/services/web-servers/phpfpm/default.nix +++ b/nixos/modules/services/web-servers/phpfpm/default.nix @@ -40,9 +40,12 @@ let socket = mkOption { type = types.str; readOnly = true; - description = '' + description = lib.mdDoc '' Path to the unix socket file on which to accept FastCGI requests. - This option is read-only and managed by NixOS. + + ::: {.note} + This option is read-only and managed by NixOS. + ::: ''; example = "${runtimeDir}/.sock"; }; diff --git a/nixos/modules/services/web-servers/pomerium.nix b/nixos/modules/services/web-servers/pomerium.nix index 209de55e36e..90748f74d24 100644 --- a/nixos/modules/services/web-servers/pomerium.nix +++ b/nixos/modules/services/web-servers/pomerium.nix @@ -7,7 +7,7 @@ let in { options.services.pomerium = { - enable = mkEnableOption "the Pomerium authenticating reverse proxy"; + enable = mkEnableOption (lib.mdDoc "the Pomerium authenticating reverse proxy"); configFile = mkOption { type = with types; nullOr path; diff --git a/nixos/modules/services/web-servers/tomcat.nix b/nixos/modules/services/web-servers/tomcat.nix index 95c307dba61..d8bfee547c7 100644 --- a/nixos/modules/services/web-servers/tomcat.nix +++ b/nixos/modules/services/web-servers/tomcat.nix @@ -19,7 +19,7 @@ in options = { services.tomcat = { - enable = mkEnableOption "Apache Tomcat"; + enable = mkEnableOption (lib.mdDoc "Apache Tomcat"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/web-servers/traefik.nix b/nixos/modules/services/web-servers/traefik.nix index abef963201e..9e5603e0edc 100644 --- a/nixos/modules/services/web-servers/traefik.nix +++ b/nixos/modules/services/web-servers/traefik.nix @@ -50,7 +50,7 @@ let cfg.staticConfigFile; in { options.services.traefik = { - enable = mkEnableOption "Traefik web server"; + enable = mkEnableOption (lib.mdDoc "Traefik web server"); staticConfigFile = mkOption { default = null; diff --git a/nixos/modules/services/web-servers/trafficserver/default.nix b/nixos/modules/services/web-servers/trafficserver/default.nix index 51d6b9050f5..17dece8746a 100644 --- a/nixos/modules/services/web-servers/trafficserver/default.nix +++ b/nixos/modules/services/web-servers/trafficserver/default.nix @@ -33,7 +33,7 @@ let in { options.services.trafficserver = { - enable = mkEnableOption "Apache Traffic Server"; + enable = mkEnableOption (lib.mdDoc "Apache Traffic Server"); cache = mkOption { type = types.lines; diff --git a/nixos/modules/services/web-servers/ttyd.nix b/nixos/modules/services/web-servers/ttyd.nix index 0c47d9583cd..affd5bbeea3 100644 --- a/nixos/modules/services/web-servers/ttyd.nix +++ b/nixos/modules/services/web-servers/ttyd.nix @@ -30,7 +30,7 @@ in options = { services.ttyd = { - enable = mkEnableOption "ttyd daemon"; + enable = mkEnableOption (lib.mdDoc "ttyd daemon"); port = mkOption { type = types.port; diff --git a/nixos/modules/services/web-servers/unit/default.nix b/nixos/modules/services/web-servers/unit/default.nix index 5ad4a240bec..0aaac8a14e4 100644 --- a/nixos/modules/services/web-servers/unit/default.nix +++ b/nixos/modules/services/web-servers/unit/default.nix @@ -10,7 +10,7 @@ let in { options = { services.unit = { - enable = mkEnableOption "Unit App Server"; + enable = mkEnableOption (lib.mdDoc "Unit App Server"); package = mkOption { type = types.package; default = pkgs.unit; diff --git a/nixos/modules/services/web-servers/uwsgi.nix b/nixos/modules/services/web-servers/uwsgi.nix index af6c6c06612..510582feaae 100644 --- a/nixos/modules/services/web-servers/uwsgi.nix +++ b/nixos/modules/services/web-servers/uwsgi.nix @@ -167,22 +167,20 @@ in { "CAP_NET_RAW" # open raw sockets ] ''; - description = '' + description = lib.mdDoc '' Grant capabilities to the uWSGI instance. See the - capabilities(7) for available values. - - - uWSGI runs as an unprivileged user (even as Emperor) with the minimal - capabilities required. This option can be used to add fine-grained - permissions without running the service as root. - - - When in Emperor mode, any capability to be inherited by a vassal must - be specified again in the vassal configuration using cap. - See the uWSGI docs - for more information. - - + `capabilities(7)` for available values. + + ::: {.note} + uWSGI runs as an unprivileged user (even as Emperor) with the minimal + capabilities required. This option can be used to add fine-grained + permissions without running the service as root. + + When in Emperor mode, any capability to be inherited by a vassal must + be specified again in the vassal configuration using `cap`. + See the uWSGI [docs](https://uwsgi-docs.readthedocs.io/en/latest/Capabilities.html) + for more information. + ::: ''; }; }; diff --git a/nixos/modules/services/web-servers/varnish/default.nix b/nixos/modules/services/web-servers/varnish/default.nix index c812c366426..e34c22d2868 100644 --- a/nixos/modules/services/web-servers/varnish/default.nix +++ b/nixos/modules/services/web-servers/varnish/default.nix @@ -11,9 +11,9 @@ in { options = { services.varnish = { - enable = mkEnableOption "Varnish Server"; + enable = mkEnableOption (lib.mdDoc "Varnish Server"); - enableConfigCheck = mkEnableOption "checking the config during build time" // { default = true; }; + enableConfigCheck = mkEnableOption (lib.mdDoc "checking the config during build time") // { default = true; }; package = mkOption { type = types.package; diff --git a/nixos/modules/services/x11/colord.nix b/nixos/modules/services/x11/colord.nix index 31ccee6aa33..cb7b9096e5d 100644 --- a/nixos/modules/services/x11/colord.nix +++ b/nixos/modules/services/x11/colord.nix @@ -11,7 +11,7 @@ in { options = { services.colord = { - enable = mkEnableOption "colord, the color management daemon"; + enable = mkEnableOption (lib.mdDoc "colord, the color management daemon"); }; }; diff --git a/nixos/modules/services/x11/desktop-managers/cde.nix b/nixos/modules/services/x11/desktop-managers/cde.nix index 05cf011f62c..e0b4fb0e7bf 100644 --- a/nixos/modules/services/x11/desktop-managers/cde.nix +++ b/nixos/modules/services/x11/desktop-managers/cde.nix @@ -7,7 +7,7 @@ let cfg = xcfg.desktopManager.cde; in { options.services.xserver.desktopManager.cde = { - enable = mkEnableOption "Common Desktop Environment"; + enable = mkEnableOption (lib.mdDoc "Common Desktop Environment"); extraPackages = mkOption { type = with types; listOf package; diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix index a8e0bf9dddb..3d79a3b8513 100644 --- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix +++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix @@ -17,11 +17,11 @@ in { options = { services.cinnamon = { - apps.enable = mkEnableOption "Cinnamon default applications"; + apps.enable = mkEnableOption (lib.mdDoc "Cinnamon default applications"); }; services.xserver.desktopManager.cinnamon = { - enable = mkEnableOption "the cinnamon desktop manager"; + enable = mkEnableOption (lib.mdDoc "the cinnamon desktop manager"); sessionPath = mkOption { default = []; diff --git a/nixos/modules/services/x11/desktop-managers/default.nix b/nixos/modules/services/x11/desktop-managers/default.nix index a0fc3e4b5ab..510561246a2 100644 --- a/nixos/modules/services/x11/desktop-managers/default.nix +++ b/nixos/modules/services/x11/desktop-managers/default.nix @@ -64,10 +64,10 @@ in bgSupport = true; start = "..."; }; - description = '' + description = lib.mdDoc '' Internal option used to add some common line to desktop manager scripts before forwarding the value to the - displayManager. + `displayManager`. ''; apply = map (d: d // { manage = "desktop"; @@ -86,8 +86,8 @@ in type = types.nullOr types.str; default = null; example = "none"; - description = '' - Deprecated, please use instead. + description = lib.mdDoc '' + **Deprecated**, please use [](#opt-services.xserver.displayManager.defaultSession) instead. Default desktop manager loaded if none have been chosen. ''; diff --git a/nixos/modules/services/x11/desktop-managers/gnome.nix b/nixos/modules/services/x11/desktop-managers/gnome.nix index b69102f046a..7bb7ef27ed5 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome.nix @@ -165,11 +165,11 @@ in options = { services.gnome = { - core-os-services.enable = mkEnableOption "essential services for GNOME3"; - core-shell.enable = mkEnableOption "GNOME Shell services"; - core-utilities.enable = mkEnableOption "GNOME core utilities"; - core-developer-tools.enable = mkEnableOption "GNOME core developer tools"; - games.enable = mkEnableOption "GNOME games"; + core-os-services.enable = mkEnableOption (lib.mdDoc "essential services for GNOME3"); + core-shell.enable = mkEnableOption (lib.mdDoc "GNOME Shell services"); + core-utilities.enable = mkEnableOption (lib.mdDoc "GNOME core utilities"); + core-developer-tools.enable = mkEnableOption (lib.mdDoc "GNOME core developer tools"); + games.enable = mkEnableOption (lib.mdDoc "GNOME games"); }; services.xserver.desktopManager.gnome = { @@ -201,7 +201,7 @@ in favorite-apps=[ 'firefox.desktop', 'org.gnome.Calendar.desktop' ] ''' ''; - description = "List of desktop files to put as favorite apps into gnome-shell. These need to be installed somehow globally."; + description = lib.mdDoc "List of desktop files to put as favorite apps into gnome-shell. These need to be installed somehow globally."; }; extraGSettingsOverrides = mkOption { @@ -216,10 +216,10 @@ in description = lib.mdDoc "List of packages for which gsettings are overridden."; }; - debug = mkEnableOption "gnome-session debug messages"; + debug = mkEnableOption (lib.mdDoc "gnome-session debug messages"); flashback = { - enableMetacity = mkEnableOption "the standard GNOME Flashback session with Metacity"; + enableMetacity = mkEnableOption (lib.mdDoc "the standard GNOME Flashback session with Metacity"); customSessions = mkOption { type = types.listOf (types.submodule { diff --git a/nixos/modules/services/x11/desktop-managers/mate.nix b/nixos/modules/services/x11/desktop-managers/mate.nix index 1ca47313adc..c93f120bed7 100644 --- a/nixos/modules/services/x11/desktop-managers/mate.nix +++ b/nixos/modules/services/x11/desktop-managers/mate.nix @@ -19,7 +19,7 @@ in description = lib.mdDoc "Enable the MATE desktop environment"; }; - debug = mkEnableOption "mate-session debug messages"; + debug = mkEnableOption (lib.mdDoc "mate-session debug messages"); }; environment.mate.excludePackages = mkOption { diff --git a/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixos/modules/services/x11/desktop-managers/pantheon.nix index 94de7f4dd7d..90a8787ed22 100644 --- a/nixos/modules/services/x11/desktop-managers/pantheon.nix +++ b/nixos/modules/services/x11/desktop-managers/pantheon.nix @@ -26,10 +26,10 @@ in services.pantheon = { contractor = { - enable = mkEnableOption "contractor, a desktop-wide extension service used by Pantheon"; + enable = mkEnableOption (lib.mdDoc "contractor, a desktop-wide extension service used by Pantheon"); }; - apps.enable = mkEnableOption "Pantheon default applications"; + apps.enable = mkEnableOption (lib.mdDoc "Pantheon default applications"); }; @@ -76,7 +76,7 @@ in description = lib.mdDoc "List of packages for which gsettings are overridden."; }; - debug = mkEnableOption "gnome-session debug messages"; + debug = mkEnableOption (lib.mdDoc "gnome-session debug messages"); }; diff --git a/nixos/modules/services/x11/desktop-managers/phosh.nix b/nixos/modules/services/x11/desktop-managers/phosh.nix index 2f670d3492e..e889c0e34e7 100644 --- a/nixos/modules/services/x11/desktop-managers/phosh.nix +++ b/nixos/modules/services/x11/desktop-managers/phosh.nix @@ -33,14 +33,14 @@ let default = "false"; }; cursorTheme = mkOption { - description = '' + description = lib.mdDoc '' Cursor theme to use in Phosh. ''; type = types.str; default = "default"; }; outputs = mkOption { - description = '' + description = lib.mdDoc '' Output configurations. ''; type = types.attrsOf phocOutputType; @@ -56,7 +56,7 @@ let phocOutputType = types.submodule { options = { modeline = mkOption { - description = '' + description = lib.mdDoc '' One or more modelines. ''; type = types.either types.str (types.listOf types.str); @@ -67,7 +67,7 @@ let ]; }; mode = mkOption { - description = '' + description = lib.mdDoc '' Default video mode. ''; type = types.nullOr types.str; @@ -75,7 +75,7 @@ let example = "768x1024"; }; scale = mkOption { - description = '' + description = lib.mdDoc '' Display scaling factor. ''; type = types.nullOr ( @@ -89,7 +89,7 @@ let example = 2; }; rotate = mkOption { - description = '' + description = lib.mdDoc '' Screen transformation. ''; type = types.enum [ diff --git a/nixos/modules/services/x11/desktop-managers/retroarch.nix b/nixos/modules/services/x11/desktop-managers/retroarch.nix index c5504e51491..5552f37612a 100644 --- a/nixos/modules/services/x11/desktop-managers/retroarch.nix +++ b/nixos/modules/services/x11/desktop-managers/retroarch.nix @@ -6,7 +6,7 @@ let cfg = config.services.xserver.desktopManager.retroarch; in { options.services.xserver.desktopManager.retroarch = { - enable = mkEnableOption "RetroArch"; + enable = mkEnableOption (lib.mdDoc "RetroArch"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/x11/desktop-managers/surf-display.nix b/nixos/modules/services/x11/desktop-managers/surf-display.nix index 7d2ad5a3f2b..38ebb9d02b4 100644 --- a/nixos/modules/services/x11/desktop-managers/surf-display.nix +++ b/nixos/modules/services/x11/desktop-managers/surf-display.nix @@ -45,7 +45,7 @@ let in { options = { services.xserver.desktopManager.surf-display = { - enable = mkEnableOption "surf-display as a kiosk browser session"; + enable = mkEnableOption (lib.mdDoc "surf-display as a kiosk browser session"); defaultWwwUri = mkOption { type = types.str; diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index cfb7cfb098e..995ecd231c4 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -153,7 +153,7 @@ in internal = true; default = "${xorg.xauth}/bin/xauth"; defaultText = literalExpression ''"''${pkgs.xorg.xauth}/bin/xauth"''; - description = "Path to the xauth program used by display managers."; + description = lib.mdDoc "Path to the {command}`xauth` program used by display managers."; }; xserverBin = mkOption { @@ -235,15 +235,15 @@ in } ] ''; - description = '' + description = lib.mdDoc '' List of sessions supported with the command used to start each session. Each session script can set the - waitPID shell variable to make this script + {var}`waitPID` shell variable to make this script wait until the end of the user session. Each script is used to define either a window manager or a desktop manager. These can be differentiated by setting the attribute - manage either to "window" - or "desktop". + {var}`manage` either to `"window"` + or `"desktop"`. The list of desktop manager and window manager should appear inside the display manager with the desktop manager name @@ -252,7 +252,7 @@ in }; sessionData = mkOption { - description = "Data exported for display managers’ convenience"; + description = lib.mdDoc "Data exported for display managers’ convenience"; internal = true; default = {}; apply = val: { @@ -299,7 +299,7 @@ in importedVariables = mkOption { type = types.listOf (types.strMatching "[a-zA-Z_][a-zA-Z0-9_]*"); visible = false; - description = '' + description = lib.mdDoc '' Environment variables to import into the systemd user environment. ''; }; diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index 025d572957e..1c3881bef2d 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -67,9 +67,9 @@ in services.xserver.displayManager.gdm = { - enable = mkEnableOption "GDM, the GNOME Display Manager"; + enable = mkEnableOption (lib.mdDoc "GDM, the GNOME Display Manager"); - debug = mkEnableOption "debugging messages in GDM"; + debug = mkEnableOption (lib.mdDoc "debugging messages in GDM"); # Auto login options specific to GDM autoLogin.delay = mkOption { diff --git a/nixos/modules/services/x11/display-managers/lightdm-greeters/slick.nix b/nixos/modules/services/x11/display-managers/lightdm-greeters/slick.nix index d9d15522c92..00fa8af71dc 100644 --- a/nixos/modules/services/x11/display-managers/lightdm-greeters/slick.nix +++ b/nixos/modules/services/x11/display-managers/lightdm-greeters/slick.nix @@ -25,7 +25,7 @@ in { options = { services.xserver.displayManager.lightdm.greeters.slick = { - enable = mkEnableOption "lightdm-slick-greeter as the lightdm greeter"; + enable = mkEnableOption (lib.mdDoc "lightdm-slick-greeter as the lightdm greeter"); theme = { package = mkOption { @@ -84,7 +84,7 @@ in }; }; - draw-user-backgrounds = mkEnableOption "draw user backgrounds"; + draw-user-backgrounds = mkEnableOption (lib.mdDoc "draw user backgrounds"); extraConfig = mkOption { type = types.lines; diff --git a/nixos/modules/services/x11/display-managers/sx.nix b/nixos/modules/services/x11/display-managers/sx.nix index e3097736430..6a7fc1a040e 100644 --- a/nixos/modules/services/x11/display-managers/sx.nix +++ b/nixos/modules/services/x11/display-managers/sx.nix @@ -7,8 +7,8 @@ let cfg = config.services.xserver.displayManager.sx; in { options = { services.xserver.displayManager.sx = { - enable = mkEnableOption "sx pseudo-display manager" // { - description = '' + enable = mkEnableOption (lib.mdDoc "sx pseudo-display manager") // { + description = lib.mdDoc '' Whether to enable the "sx" pseudo-display manager, which allows users to start manually via the "sx" command from a vt shell. The X server runs under the user's id, not as root. The user must provide a diff --git a/nixos/modules/services/x11/display-managers/xpra.nix b/nixos/modules/services/x11/display-managers/xpra.nix index 15b3f70d46e..cb78f52d9b6 100644 --- a/nixos/modules/services/x11/display-managers/xpra.nix +++ b/nixos/modules/services/x11/display-managers/xpra.nix @@ -40,7 +40,7 @@ in description = lib.mdDoc "Authentication to use when connecting to xpra"; }; - pulseaudio = mkEnableOption "pulseaudio audio streaming"; + pulseaudio = mkEnableOption (lib.mdDoc "pulseaudio audio streaming"); extraOptions = mkOption { description = lib.mdDoc "Extra xpra options"; diff --git a/nixos/modules/services/x11/hardware/digimend.nix b/nixos/modules/services/x11/hardware/digimend.nix index b1b1682f00b..f82aac41a32 100644 --- a/nixos/modules/services/x11/hardware/digimend.nix +++ b/nixos/modules/services/x11/hardware/digimend.nix @@ -16,7 +16,7 @@ in services.xserver.digimend = { - enable = mkEnableOption "the digimend drivers for Huion/XP-Pen/etc. tablets"; + enable = mkEnableOption (lib.mdDoc "the digimend drivers for Huion/XP-Pen/etc. tablets"); }; diff --git a/nixos/modules/services/x11/hardware/libinput.nix b/nixos/modules/services/x11/hardware/libinput.nix index 6603498eeaf..8eb11e281d6 100644 --- a/nixos/modules/services/x11/hardware/libinput.nix +++ b/nixos/modules/services/x11/hardware/libinput.nix @@ -250,7 +250,7 @@ in { options = { services.xserver.libinput = { - enable = mkEnableOption "libinput"; + enable = mkEnableOption (lib.mdDoc "libinput"); mouse = mkConfigForDevice "mouse"; touchpad = mkConfigForDevice "touchpad"; }; diff --git a/nixos/modules/services/x11/imwheel.nix b/nixos/modules/services/x11/imwheel.nix index 9f4fc7e90c4..03cbdbfb09a 100644 --- a/nixos/modules/services/x11/imwheel.nix +++ b/nixos/modules/services/x11/imwheel.nix @@ -6,7 +6,7 @@ in { options = { services.xserver.imwheel = { - enable = mkEnableOption "IMWheel service"; + enable = mkEnableOption (lib.mdDoc "IMWheel service"); extraOptions = mkOption { type = types.listOf types.str; diff --git a/nixos/modules/services/x11/touchegg.nix b/nixos/modules/services/x11/touchegg.nix index 905e8521cf7..f1103c054c5 100644 --- a/nixos/modules/services/x11/touchegg.nix +++ b/nixos/modules/services/x11/touchegg.nix @@ -11,7 +11,7 @@ in { ###### interface options.services.touchegg = { - enable = mkEnableOption "touchegg, a multi-touch gesture recognizer"; + enable = mkEnableOption (lib.mdDoc "touchegg, a multi-touch gesture recognizer"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/x11/urserver.nix b/nixos/modules/services/x11/urserver.nix index 0beb62eb766..d0b6e0775e5 100644 --- a/nixos/modules/services/x11/urserver.nix +++ b/nixos/modules/services/x11/urserver.nix @@ -5,7 +5,7 @@ let cfg = config.services.urserver; in { - options.services.urserver.enable = lib.mkEnableOption "urserver"; + options.services.urserver.enable = lib.mkEnableOption (lib.mdDoc "urserver"); config = lib.mkIf cfg.enable { diff --git a/nixos/modules/services/x11/window-managers/2bwm.nix b/nixos/modules/services/x11/window-managers/2bwm.nix index fdbdf35b0f5..8483a74b9f6 100644 --- a/nixos/modules/services/x11/window-managers/2bwm.nix +++ b/nixos/modules/services/x11/window-managers/2bwm.nix @@ -13,7 +13,7 @@ in ###### interface options = { - services.xserver.windowManager."2bwm".enable = mkEnableOption "2bwm"; + services.xserver.windowManager."2bwm".enable = mkEnableOption (lib.mdDoc "2bwm"); }; diff --git a/nixos/modules/services/x11/window-managers/afterstep.nix b/nixos/modules/services/x11/window-managers/afterstep.nix index ba88a64c702..a0606359797 100644 --- a/nixos/modules/services/x11/window-managers/afterstep.nix +++ b/nixos/modules/services/x11/window-managers/afterstep.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.afterstep.enable = mkEnableOption "afterstep"; + services.xserver.windowManager.afterstep.enable = mkEnableOption (lib.mdDoc "afterstep"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/awesome.nix b/nixos/modules/services/x11/window-managers/awesome.nix index a134feabe43..c1231d3fbf3 100644 --- a/nixos/modules/services/x11/window-managers/awesome.nix +++ b/nixos/modules/services/x11/window-managers/awesome.nix @@ -21,7 +21,7 @@ in services.xserver.windowManager.awesome = { - enable = mkEnableOption "Awesome window manager"; + enable = mkEnableOption (lib.mdDoc "Awesome window manager"); luaModules = mkOption { default = []; diff --git a/nixos/modules/services/x11/window-managers/berry.nix b/nixos/modules/services/x11/window-managers/berry.nix index 0d2285e7a60..eb552860267 100644 --- a/nixos/modules/services/x11/window-managers/berry.nix +++ b/nixos/modules/services/x11/window-managers/berry.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.berry.enable = mkEnableOption "berry"; + services.xserver.windowManager.berry.enable = mkEnableOption (lib.mdDoc "berry"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/bspwm.nix b/nixos/modules/services/x11/window-managers/bspwm.nix index 4fcd2b7c720..c403f744cd4 100644 --- a/nixos/modules/services/x11/window-managers/bspwm.nix +++ b/nixos/modules/services/x11/window-managers/bspwm.nix @@ -9,7 +9,7 @@ in { options = { services.xserver.windowManager.bspwm = { - enable = mkEnableOption "bspwm"; + enable = mkEnableOption (lib.mdDoc "bspwm"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/x11/window-managers/clfswm.nix b/nixos/modules/services/x11/window-managers/clfswm.nix index cf8eec249c6..f2e4c2f91c9 100644 --- a/nixos/modules/services/x11/window-managers/clfswm.nix +++ b/nixos/modules/services/x11/window-managers/clfswm.nix @@ -9,7 +9,7 @@ in { options = { services.xserver.windowManager.clfswm = { - enable = mkEnableOption "clfswm"; + enable = mkEnableOption (lib.mdDoc "clfswm"); package = mkOption { type = types.package; default = pkgs.lispPackages.clfswm; diff --git a/nixos/modules/services/x11/window-managers/cwm.nix b/nixos/modules/services/x11/window-managers/cwm.nix index 03375a226bb..9a143e7bccc 100644 --- a/nixos/modules/services/x11/window-managers/cwm.nix +++ b/nixos/modules/services/x11/window-managers/cwm.nix @@ -7,7 +7,7 @@ let in { options = { - services.xserver.windowManager.cwm.enable = mkEnableOption "cwm"; + services.xserver.windowManager.cwm.enable = mkEnableOption (lib.mdDoc "cwm"); }; config = mkIf cfg.enable { services.xserver.windowManager.session = singleton diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix index 52083dcaaa2..36d5b3c8156 100644 --- a/nixos/modules/services/x11/window-managers/default.nix +++ b/nixos/modules/services/x11/window-managers/default.nix @@ -59,10 +59,10 @@ in name = "wmii"; start = "..."; }]; - description = '' + description = lib.mdDoc '' Internal option used to add some common line to window manager scripts before forwarding the value to the - displayManager. + `displayManager`. ''; apply = map (d: d // { manage = "window"; @@ -73,8 +73,8 @@ in type = types.nullOr types.str; default = null; example = "wmii"; - description = '' - Deprecated, please use instead. + description = lib.mdDoc '' + **Deprecated**, please use [](#opt-services.xserver.displayManager.defaultSession) instead. Default window manager loaded if none have been chosen. ''; diff --git a/nixos/modules/services/x11/window-managers/dwm.nix b/nixos/modules/services/x11/window-managers/dwm.nix index 7777913ce1e..2dac41dbe98 100644 --- a/nixos/modules/services/x11/window-managers/dwm.nix +++ b/nixos/modules/services/x11/window-managers/dwm.nix @@ -13,7 +13,7 @@ in ###### interface options = { - services.xserver.windowManager.dwm.enable = mkEnableOption "dwm"; + services.xserver.windowManager.dwm.enable = mkEnableOption (lib.mdDoc "dwm"); }; diff --git a/nixos/modules/services/x11/window-managers/e16.nix b/nixos/modules/services/x11/window-managers/e16.nix index 3e1a22c4dab..000feea12c2 100644 --- a/nixos/modules/services/x11/window-managers/e16.nix +++ b/nixos/modules/services/x11/window-managers/e16.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.e16.enable = mkEnableOption "e16"; + services.xserver.windowManager.e16.enable = mkEnableOption (lib.mdDoc "e16"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/evilwm.nix b/nixos/modules/services/x11/window-managers/evilwm.nix index 6f1db2110f8..842f84c2cfb 100644 --- a/nixos/modules/services/x11/window-managers/evilwm.nix +++ b/nixos/modules/services/x11/window-managers/evilwm.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.evilwm.enable = mkEnableOption "evilwm"; + services.xserver.windowManager.evilwm.enable = mkEnableOption (lib.mdDoc "evilwm"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/exwm.nix b/nixos/modules/services/x11/window-managers/exwm.nix index 5b0a15804ef..a97ed74ae88 100644 --- a/nixos/modules/services/x11/window-managers/exwm.nix +++ b/nixos/modules/services/x11/window-managers/exwm.nix @@ -18,7 +18,7 @@ in { options = { services.xserver.windowManager.exwm = { - enable = mkEnableOption "exwm"; + enable = mkEnableOption (lib.mdDoc "exwm"); loadScript = mkOption { default = "(require 'exwm)"; type = types.lines; @@ -48,10 +48,10 @@ in epkgs.proofgeneral ] ''; - description = '' + description = lib.mdDoc '' Extra packages available to Emacs. The value must be a function which receives the attrset defined in - emacs.pkgs as the sole argument. + {var}`emacs.pkgs` as the sole argument. ''; }; }; diff --git a/nixos/modules/services/x11/window-managers/fluxbox.nix b/nixos/modules/services/x11/window-managers/fluxbox.nix index b409335702a..24165fb6fb0 100644 --- a/nixos/modules/services/x11/window-managers/fluxbox.nix +++ b/nixos/modules/services/x11/window-managers/fluxbox.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.fluxbox.enable = mkEnableOption "fluxbox"; + services.xserver.windowManager.fluxbox.enable = mkEnableOption (lib.mdDoc "fluxbox"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/fvwm2.nix b/nixos/modules/services/x11/window-managers/fvwm2.nix index b5ef36f58d5..aaf3c5c4690 100644 --- a/nixos/modules/services/x11/window-managers/fvwm2.nix +++ b/nixos/modules/services/x11/window-managers/fvwm2.nix @@ -19,7 +19,7 @@ in options = { services.xserver.windowManager.fvwm2 = { - enable = mkEnableOption "Fvwm2 window manager"; + enable = mkEnableOption (lib.mdDoc "Fvwm2 window manager"); gestures = mkOption { default = false; diff --git a/nixos/modules/services/x11/window-managers/fvwm3.nix b/nixos/modules/services/x11/window-managers/fvwm3.nix index 43111f917d4..50c76b67eea 100644 --- a/nixos/modules/services/x11/window-managers/fvwm3.nix +++ b/nixos/modules/services/x11/window-managers/fvwm3.nix @@ -13,7 +13,7 @@ in options = { services.xserver.windowManager.fvwm3 = { - enable = mkEnableOption "Fvwm3 window manager"; + enable = mkEnableOption (lib.mdDoc "Fvwm3 window manager"); }; }; diff --git a/nixos/modules/services/x11/window-managers/hackedbox.nix b/nixos/modules/services/x11/window-managers/hackedbox.nix index 641cf1bdcbe..61e911961f5 100644 --- a/nixos/modules/services/x11/window-managers/hackedbox.nix +++ b/nixos/modules/services/x11/window-managers/hackedbox.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.hackedbox.enable = mkEnableOption "hackedbox"; + services.xserver.windowManager.hackedbox.enable = mkEnableOption (lib.mdDoc "hackedbox"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/herbstluftwm.nix b/nixos/modules/services/x11/window-managers/herbstluftwm.nix index af077c4d228..816cbb36caf 100644 --- a/nixos/modules/services/x11/window-managers/herbstluftwm.nix +++ b/nixos/modules/services/x11/window-managers/herbstluftwm.nix @@ -9,7 +9,7 @@ in { options = { services.xserver.windowManager.herbstluftwm = { - enable = mkEnableOption "herbstluftwm"; + enable = mkEnableOption (lib.mdDoc "herbstluftwm"); package = mkOption { type = types.package; diff --git a/nixos/modules/services/x11/window-managers/i3.nix b/nixos/modules/services/x11/window-managers/i3.nix index 87479f2ac45..64109e0c39f 100644 --- a/nixos/modules/services/x11/window-managers/i3.nix +++ b/nixos/modules/services/x11/window-managers/i3.nix @@ -8,7 +8,7 @@ in { options.services.xserver.windowManager.i3 = { - enable = mkEnableOption "i3 window manager"; + enable = mkEnableOption (lib.mdDoc "i3 window manager"); configFile = mkOption { default = null; diff --git a/nixos/modules/services/x11/window-managers/icewm.nix b/nixos/modules/services/x11/window-managers/icewm.nix index f4ae9222df6..48741aa41d8 100644 --- a/nixos/modules/services/x11/window-managers/icewm.nix +++ b/nixos/modules/services/x11/window-managers/icewm.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.icewm.enable = mkEnableOption "icewm"; + services.xserver.windowManager.icewm.enable = mkEnableOption (lib.mdDoc "icewm"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/jwm.nix b/nixos/modules/services/x11/window-managers/jwm.nix index 0e8dab2e922..40758029bc6 100644 --- a/nixos/modules/services/x11/window-managers/jwm.nix +++ b/nixos/modules/services/x11/window-managers/jwm.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.jwm.enable = mkEnableOption "jwm"; + services.xserver.windowManager.jwm.enable = mkEnableOption (lib.mdDoc "jwm"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/leftwm.nix b/nixos/modules/services/x11/window-managers/leftwm.nix index 3ef40df95df..2571735ba8b 100644 --- a/nixos/modules/services/x11/window-managers/leftwm.nix +++ b/nixos/modules/services/x11/window-managers/leftwm.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.leftwm.enable = mkEnableOption "leftwm"; + services.xserver.windowManager.leftwm.enable = mkEnableOption (lib.mdDoc "leftwm"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/lwm.nix b/nixos/modules/services/x11/window-managers/lwm.nix index e2aa062fd13..517abb23d4a 100644 --- a/nixos/modules/services/x11/window-managers/lwm.nix +++ b/nixos/modules/services/x11/window-managers/lwm.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.lwm.enable = mkEnableOption "lwm"; + services.xserver.windowManager.lwm.enable = mkEnableOption (lib.mdDoc "lwm"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/metacity.nix b/nixos/modules/services/x11/window-managers/metacity.nix index 600afe759b2..1f69147af5b 100644 --- a/nixos/modules/services/x11/window-managers/metacity.nix +++ b/nixos/modules/services/x11/window-managers/metacity.nix @@ -10,7 +10,7 @@ in { options = { - services.xserver.windowManager.metacity.enable = mkEnableOption "metacity"; + services.xserver.windowManager.metacity.enable = mkEnableOption (lib.mdDoc "metacity"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/x11/window-managers/mlvwm.nix b/nixos/modules/services/x11/window-managers/mlvwm.nix index 0ee1d7b097e..fe0433c24b6 100644 --- a/nixos/modules/services/x11/window-managers/mlvwm.nix +++ b/nixos/modules/services/x11/window-managers/mlvwm.nix @@ -8,7 +8,7 @@ in { options.services.xserver.windowManager.mlvwm = { - enable = mkEnableOption "Macintosh-like Virtual Window Manager"; + enable = mkEnableOption (lib.mdDoc "Macintosh-like Virtual Window Manager"); configFile = mkOption { default = null; diff --git a/nixos/modules/services/x11/window-managers/mwm.nix b/nixos/modules/services/x11/window-managers/mwm.nix index 31f7b725f74..9f8dc0939e5 100644 --- a/nixos/modules/services/x11/window-managers/mwm.nix +++ b/nixos/modules/services/x11/window-managers/mwm.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.mwm.enable = mkEnableOption "mwm"; + services.xserver.windowManager.mwm.enable = mkEnableOption (lib.mdDoc "mwm"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/notion.nix b/nixos/modules/services/x11/window-managers/notion.nix index 4ece0d241c9..0015e90a41c 100644 --- a/nixos/modules/services/x11/window-managers/notion.nix +++ b/nixos/modules/services/x11/window-managers/notion.nix @@ -8,7 +8,7 @@ in { options = { - services.xserver.windowManager.notion.enable = mkEnableOption "notion"; + services.xserver.windowManager.notion.enable = mkEnableOption (lib.mdDoc "notion"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/x11/window-managers/openbox.nix b/nixos/modules/services/x11/window-managers/openbox.nix index 165772d1aa0..bf5a500f431 100644 --- a/nixos/modules/services/x11/window-managers/openbox.nix +++ b/nixos/modules/services/x11/window-managers/openbox.nix @@ -7,7 +7,7 @@ in { options = { - services.xserver.windowManager.openbox.enable = mkEnableOption "openbox"; + services.xserver.windowManager.openbox.enable = mkEnableOption (lib.mdDoc "openbox"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/x11/window-managers/oroborus.nix b/nixos/modules/services/x11/window-managers/oroborus.nix index bd7e3396864..654b8708e48 100644 --- a/nixos/modules/services/x11/window-managers/oroborus.nix +++ b/nixos/modules/services/x11/window-managers/oroborus.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.oroborus.enable = mkEnableOption "oroborus"; + services.xserver.windowManager.oroborus.enable = mkEnableOption (lib.mdDoc "oroborus"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/pekwm.nix b/nixos/modules/services/x11/window-managers/pekwm.nix index 850335ce7dd..8818f568647 100644 --- a/nixos/modules/services/x11/window-managers/pekwm.nix +++ b/nixos/modules/services/x11/window-managers/pekwm.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.pekwm.enable = mkEnableOption "pekwm"; + services.xserver.windowManager.pekwm.enable = mkEnableOption (lib.mdDoc "pekwm"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/qtile.nix b/nixos/modules/services/x11/window-managers/qtile.nix index 4d455fdf7b2..523642591d9 100644 --- a/nixos/modules/services/x11/window-managers/qtile.nix +++ b/nixos/modules/services/x11/window-managers/qtile.nix @@ -8,7 +8,7 @@ in { options.services.xserver.windowManager.qtile = { - enable = mkEnableOption "qtile"; + enable = mkEnableOption (lib.mdDoc "qtile"); package = mkPackageOption pkgs "qtile" { }; }; diff --git a/nixos/modules/services/x11/window-managers/ratpoison.nix b/nixos/modules/services/x11/window-managers/ratpoison.nix index 0d58481d457..1de0fad3e54 100644 --- a/nixos/modules/services/x11/window-managers/ratpoison.nix +++ b/nixos/modules/services/x11/window-managers/ratpoison.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.ratpoison.enable = mkEnableOption "ratpoison"; + services.xserver.windowManager.ratpoison.enable = mkEnableOption (lib.mdDoc "ratpoison"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/sawfish.nix b/nixos/modules/services/x11/window-managers/sawfish.nix index b988b5e1829..1945a1af676 100644 --- a/nixos/modules/services/x11/window-managers/sawfish.nix +++ b/nixos/modules/services/x11/window-managers/sawfish.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.sawfish.enable = mkEnableOption "sawfish"; + services.xserver.windowManager.sawfish.enable = mkEnableOption (lib.mdDoc "sawfish"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/smallwm.nix b/nixos/modules/services/x11/window-managers/smallwm.nix index 091ba4f92b9..e92b18690d8 100644 --- a/nixos/modules/services/x11/window-managers/smallwm.nix +++ b/nixos/modules/services/x11/window-managers/smallwm.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.smallwm.enable = mkEnableOption "smallwm"; + services.xserver.windowManager.smallwm.enable = mkEnableOption (lib.mdDoc "smallwm"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/spectrwm.nix b/nixos/modules/services/x11/window-managers/spectrwm.nix index a1dc298d242..c464803a0b6 100644 --- a/nixos/modules/services/x11/window-managers/spectrwm.nix +++ b/nixos/modules/services/x11/window-managers/spectrwm.nix @@ -9,7 +9,7 @@ in { options = { - services.xserver.windowManager.spectrwm.enable = mkEnableOption "spectrwm"; + services.xserver.windowManager.spectrwm.enable = mkEnableOption (lib.mdDoc "spectrwm"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/x11/window-managers/stumpwm.nix b/nixos/modules/services/x11/window-managers/stumpwm.nix index 27a17178476..162af689dbb 100644 --- a/nixos/modules/services/x11/window-managers/stumpwm.nix +++ b/nixos/modules/services/x11/window-managers/stumpwm.nix @@ -8,7 +8,7 @@ in { options = { - services.xserver.windowManager.stumpwm.enable = mkEnableOption "stumpwm"; + services.xserver.windowManager.stumpwm.enable = mkEnableOption (lib.mdDoc "stumpwm"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/x11/window-managers/tinywm.nix b/nixos/modules/services/x11/window-managers/tinywm.nix index 8e5d9b9170c..7418a6ddc76 100644 --- a/nixos/modules/services/x11/window-managers/tinywm.nix +++ b/nixos/modules/services/x11/window-managers/tinywm.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.tinywm.enable = mkEnableOption "tinywm"; + services.xserver.windowManager.tinywm.enable = mkEnableOption (lib.mdDoc "tinywm"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/twm.nix b/nixos/modules/services/x11/window-managers/twm.nix index fc09901aae3..231817a26e6 100644 --- a/nixos/modules/services/x11/window-managers/twm.nix +++ b/nixos/modules/services/x11/window-managers/twm.nix @@ -13,7 +13,7 @@ in ###### interface options = { - services.xserver.windowManager.twm.enable = mkEnableOption "twm"; + services.xserver.windowManager.twm.enable = mkEnableOption (lib.mdDoc "twm"); }; diff --git a/nixos/modules/services/x11/window-managers/windowlab.nix b/nixos/modules/services/x11/window-managers/windowlab.nix index fb891a39fa4..9a0646b6ee7 100644 --- a/nixos/modules/services/x11/window-managers/windowlab.nix +++ b/nixos/modules/services/x11/window-managers/windowlab.nix @@ -7,7 +7,7 @@ in { options = { services.xserver.windowManager.windowlab.enable = - lib.mkEnableOption "windowlab"; + lib.mkEnableOption (lib.mdDoc "windowlab"); }; config = lib.mkIf cfg.enable { diff --git a/nixos/modules/services/x11/window-managers/windowmaker.nix b/nixos/modules/services/x11/window-managers/windowmaker.nix index b6272375805..a679e2b5bc8 100644 --- a/nixos/modules/services/x11/window-managers/windowmaker.nix +++ b/nixos/modules/services/x11/window-managers/windowmaker.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.windowmaker.enable = mkEnableOption "windowmaker"; + services.xserver.windowManager.windowmaker.enable = mkEnableOption (lib.mdDoc "windowmaker"); }; ###### implementation diff --git a/nixos/modules/services/x11/window-managers/wmderland.nix b/nixos/modules/services/x11/window-managers/wmderland.nix index 835c1b30281..ed515741f62 100644 --- a/nixos/modules/services/x11/window-managers/wmderland.nix +++ b/nixos/modules/services/x11/window-managers/wmderland.nix @@ -8,7 +8,7 @@ in { options.services.xserver.windowManager.wmderland = { - enable = mkEnableOption "wmderland"; + enable = mkEnableOption (lib.mdDoc "wmderland"); extraSessionCommands = mkOption { default = ""; diff --git a/nixos/modules/services/x11/window-managers/wmii.nix b/nixos/modules/services/x11/window-managers/wmii.nix index 9b50a99bf23..090aa31610a 100644 --- a/nixos/modules/services/x11/window-managers/wmii.nix +++ b/nixos/modules/services/x11/window-managers/wmii.nix @@ -7,7 +7,7 @@ let in { options = { - services.xserver.windowManager.wmii.enable = mkEnableOption "wmii"; + services.xserver.windowManager.wmii.enable = mkEnableOption (lib.mdDoc "wmii"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/services/x11/window-managers/xmonad.nix b/nixos/modules/services/x11/window-managers/xmonad.nix index f616802acc4..de5996448cb 100644 --- a/nixos/modules/services/x11/window-managers/xmonad.nix +++ b/nixos/modules/services/x11/window-managers/xmonad.nix @@ -41,18 +41,18 @@ in { options = { services.xserver.windowManager.xmonad = { - enable = mkEnableOption "xmonad"; + enable = mkEnableOption (lib.mdDoc "xmonad"); haskellPackages = mkOption { default = pkgs.haskellPackages; defaultText = literalExpression "pkgs.haskellPackages"; example = literalExpression "pkgs.haskell.packages.ghc8107"; type = types.attrs; - description = '' + description = lib.mdDoc '' haskellPackages used to build Xmonad and other packages. This can be used to change the GHC version used to build Xmonad and the packages listed in - extraPackages. + {var}`extraPackages`. ''; }; @@ -66,10 +66,10 @@ in { haskellPackages.monad-logger ] ''; - description = '' + description = lib.mdDoc '' Extra packages available to ghc when rebuilding Xmonad. The value must be a function which receives the attrset defined - in haskellPackages as the sole argument. + in {var}`haskellPackages` as the sole argument. ''; }; diff --git a/nixos/modules/services/x11/window-managers/yeahwm.nix b/nixos/modules/services/x11/window-managers/yeahwm.nix index 351bd7dfe48..9b40cecace2 100644 --- a/nixos/modules/services/x11/window-managers/yeahwm.nix +++ b/nixos/modules/services/x11/window-managers/yeahwm.nix @@ -8,7 +8,7 @@ in { ###### interface options = { - services.xserver.windowManager.yeahwm.enable = mkEnableOption "yeahwm"; + services.xserver.windowManager.yeahwm.enable = mkEnableOption (lib.mdDoc "yeahwm"); }; ###### implementation diff --git a/nixos/modules/services/x11/xautolock.nix b/nixos/modules/services/x11/xautolock.nix index ca3909d7b80..8200057660e 100644 --- a/nixos/modules/services/x11/xautolock.nix +++ b/nixos/modules/services/x11/xautolock.nix @@ -8,9 +8,9 @@ in { options = { services.xserver.xautolock = { - enable = mkEnableOption "xautolock"; - enableNotifier = mkEnableOption "xautolock.notify" // { - description = '' + enable = mkEnableOption (lib.mdDoc "xautolock"); + enableNotifier = mkEnableOption (lib.mdDoc "xautolock.notify") // { + description = lib.mdDoc '' Whether to enable the notifier feature of xautolock. This publishes a notification before the autolock. ''; diff --git a/nixos/modules/services/x11/xbanish.nix b/nixos/modules/services/x11/xbanish.nix index f494f2054a4..de893fae75a 100644 --- a/nixos/modules/services/x11/xbanish.nix +++ b/nixos/modules/services/x11/xbanish.nix @@ -7,7 +7,7 @@ let cfg = config.services.xbanish; in { options.services.xbanish = { - enable = mkEnableOption "xbanish"; + enable = mkEnableOption (lib.mdDoc "xbanish"); arguments = mkOption { description = lib.mdDoc "Arguments to pass to xbanish command"; diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 026f078daf6..83a71dcf23e 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -294,7 +294,7 @@ in drivers = mkOption { type = types.listOf types.attrs; internal = true; - description = '' + description = lib.mdDoc '' A list of attribute sets specifying drivers to be loaded by the X11 server. ''; @@ -431,23 +431,25 @@ in firstPrimary = head heads // { primary = true; }; newHeads = singleton firstPrimary ++ tail heads; in if heads != [] && !hasPrimary then newHeads else heads; - description = '' + description = lib.mdDoc '' Multiple monitor configuration, just specify a list of XRandR outputs. The individual elements should be either simple strings or an attribute set of output options. If the element is a string, it is denoting the physical output for a monitor, if it's an attribute set, you must at least provide the - option. + {option}`output` option. The monitors will be mapped from left to right in the order of the list. By default, the first monitor will be set as the primary monitor if none of the elements contain an option that has set - to true. + {option}`primary` to `true`. - Only one monitor is allowed to be primary. + ::: {.note} + Only one monitor is allowed to be primary. + ::: Be careful using this option with multiple graphic adapters or with drivers that have poor support for XRandR, unexpected things might diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix index 5a61d5463d2..ddb165a76cc 100644 --- a/nixos/modules/system/activation/activation-script.nix +++ b/nixos/modules/system/activation/activation-script.nix @@ -78,21 +78,21 @@ let { deps = mkOption { type = types.listOf types.str; default = [ ]; - description = "List of dependencies. The script will run after these."; + description = lib.mdDoc "List of dependencies. The script will run after these."; }; text = mkOption { type = types.lines; - description = "The content of the script."; + description = lib.mdDoc "The content of the script."; }; } // optionalAttrs withDry { supportsDryActivation = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether this activation script supports being dry-activated. These activation scripts will also be executed on dry-activate activations with the environment variable - NIXOS_ACTION being set to dry-activate. + `NIXOS_ACTION` being set to `dry-activate`. it's important that these activation scripts don't modify anything about the system when the variable is set. ''; @@ -139,7 +139,7 @@ in }; system.dryActivationScript = mkOption { - description = "The shell script that is to be run when dry-activating a system."; + description = lib.mdDoc "The shell script that is to be run when dry-activating a system."; readOnly = true; internal = true; default = systemActivationScript (removeAttrs config.system.activationScripts [ "script" ]) true; @@ -199,9 +199,9 @@ in example = literalExpression ''"''${pkgs.busybox}/bin/env"''; type = types.nullOr types.path; visible = false; - description = '' + description = lib.mdDoc '' The env(1) executable that is linked system-wide to - /usr/bin/env. + `/usr/bin/env`. ''; }; }; diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 76150cc9599..b71ddf95dc5 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -164,17 +164,17 @@ in specialisation = mkOption { default = {}; example = lib.literalExpression "{ fewJobsManyCores.configuration = { nix.settings = { core = 0; max-jobs = 1; }; }; }"; - description = '' + description = lib.mdDoc '' Additional configurations to build. If - inheritParentConfig is true, the system + `inheritParentConfig` is true, the system will be based on the overall system configuration. To switch to a specialised configuration - (e.g. fewJobsManyCores) at runtime, run: + (e.g. `fewJobsManyCores`) at runtime, run: - - # sudo /run/current-system/specialisation/fewJobsManyCores/bin/switch-to-configuration test - + ``` + sudo /run/current-system/specialisation/fewJobsManyCores/bin/switch-to-configuration test + ``` ''; type = types.attrsOf (types.submodule ( local@{ ... }: let @@ -207,7 +207,7 @@ in system.boot.loader.id = mkOption { internal = true; default = ""; - description = '' + description = lib.mdDoc '' Id string of the used bootloader. ''; }; @@ -217,7 +217,7 @@ in default = pkgs.stdenv.hostPlatform.linux-kernel.target; defaultText = literalExpression "pkgs.stdenv.hostPlatform.linux-kernel.target"; type = types.str; - description = '' + description = lib.mdDoc '' Name of the kernel file to be passed to the bootloader. ''; }; @@ -226,7 +226,7 @@ in internal = true; default = "initrd"; type = types.str; - description = '' + description = lib.mdDoc '' Name of the initrd file to be passed to the bootloader. ''; }; @@ -238,10 +238,10 @@ in # go to `true` instead of `echo`, hiding the useless path # from the log. default = "echo 'Warning: do not know how to make this configuration bootable; please enable a boot loader.' 1>&2; true"; - description = '' + description = lib.mdDoc '' A program that writes a bootloader installation script to the path passed in the first command line argument. - See nixos/modules/system/activation/switch-to-configuration.pl. + See `nixos/modules/system/activation/switch-to-configuration.pl`. ''; type = types.unique { message = '' @@ -280,7 +280,7 @@ in type = types.lines; internal = true; default = ""; - description = '' + description = lib.mdDoc '' This code will be added to the builder creating the system store path. ''; }; diff --git a/nixos/modules/system/boot/binfmt.nix b/nixos/modules/system/boot/binfmt.nix index 4d95af61ac9..260638ceed5 100644 --- a/nixos/modules/system/boot/binfmt.nix +++ b/nixos/modules/system/boot/binfmt.nix @@ -256,7 +256,7 @@ in { interpreterSandboxPath = mkOption { internal = true; default = null; - description = '' + description = lib.mdDoc '' Path of the interpreter to expose in the build sandbox. ''; type = types.nullOr types.path; diff --git a/nixos/modules/system/boot/grow-partition.nix b/nixos/modules/system/boot/grow-partition.nix index 87c981b24ce..034b2b9906f 100644 --- a/nixos/modules/system/boot/grow-partition.nix +++ b/nixos/modules/system/boot/grow-partition.nix @@ -12,7 +12,7 @@ with lib; ]; options = { - boot.growPartition = mkEnableOption "grow the root partition on boot"; + boot.growPartition = mkEnableOption (lib.mdDoc "grow the root partition on boot"); }; config = mkIf config.boot.growPartition { diff --git a/nixos/modules/system/boot/initrd-openvpn.nix b/nixos/modules/system/boot/initrd-openvpn.nix index 9f476e07208..b41e7524320 100644 --- a/nixos/modules/system/boot/initrd-openvpn.nix +++ b/nixos/modules/system/boot/initrd-openvpn.nix @@ -25,15 +25,13 @@ in boot.initrd.network.openvpn.configuration = mkOption { type = types.path; # Same type as boot.initrd.secrets - description = '' + description = lib.mdDoc '' The configuration file for OpenVPN. - - - Unless your bootloader supports initrd secrets, this configuration - is stored insecurely in the global Nix store. - - + ::: {.warning} + Unless your bootloader supports initrd secrets, this configuration + is stored insecurely in the global Nix store. + ::: ''; example = literalExpression "./configuration.ovpn"; }; diff --git a/nixos/modules/system/boot/initrd-ssh.nix b/nixos/modules/system/boot/initrd-ssh.nix index 265399e562f..256aa608ac4 100644 --- a/nixos/modules/system/boot/initrd-ssh.nix +++ b/nixos/modules/system/boot/initrd-ssh.nix @@ -47,31 +47,29 @@ in "/etc/secrets/initrd/ssh_host_rsa_key" "/etc/secrets/initrd/ssh_host_ed25519_key" ]; - description = '' + description = lib.mdDoc '' Specify SSH host keys to import into the initrd. To generate keys, use - ssh-keygen1: + {manpage}`ssh-keygen(1)` + as root: - - # ssh-keygen -t rsa -N "" -f /etc/secrets/initrd/ssh_host_rsa_key - # ssh-keygen -t ed25519 -N "" -f /etc/secrets/initrd/ssh_host_ed25519_key - + ``` + ssh-keygen -t rsa -N "" -f /etc/secrets/initrd/ssh_host_rsa_key + ssh-keygen -t ed25519 -N "" -f /etc/secrets/initrd/ssh_host_ed25519_key + ``` - - - Unless your bootloader supports initrd secrets, these keys - are stored insecurely in the global Nix store. Do NOT use - your regular SSH host private keys for this purpose or - you'll expose them to regular users! - - - Additionally, even if your initrd supports secrets, if - you're using initrd SSH to unlock an encrypted disk then - using your regular host keys exposes the private keys on - your unencrypted boot partition. - - + ::: {.warning} + Unless your bootloader supports initrd secrets, these keys + are stored insecurely in the global Nix store. Do NOT use + your regular SSH host private keys for this purpose or + you'll expose them to regular users! + + Additionally, even if your initrd supports secrets, if + you're using initrd SSH to unlock an encrypted disk then + using your regular host keys exposes the private keys on + your unencrypted boot partition. + ::: ''; }; diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix index 33e9eca62b0..8a1630f7e3e 100644 --- a/nixos/modules/system/boot/kernel.nix +++ b/nixos/modules/system/boot/kernel.nix @@ -25,7 +25,7 @@ in default = {}; example = literalExpression "{ debug = true; }"; internal = true; - description = '' + description = lib.mdDoc '' This option allows to enable or disable certain kernel features. It's not API, because it's about kernel feature sets, that make sense for specific use cases. Mostly along with programs, @@ -48,17 +48,17 @@ in # - some of it might not even evaluate correctly. defaultText = literalExpression "pkgs.linuxPackages"; example = literalExpression "pkgs.linuxKernel.packages.linux_5_10"; - description = '' + description = lib.mdDoc '' This option allows you to override the Linux kernel used by NixOS. Since things like external kernel module packages are tied to the kernel you're using, it also overrides those. This option is a function that takes Nixpkgs as an argument (as a convenience), and returns an attribute set containing at - the very least an attribute kernel. + the very least an attribute {var}`kernel`. Additional attributes may be needed depending on your configuration. For instance, if you use the NVIDIA X driver, then it also needs to contain an attribute - nvidia_x11. + {var}`nvidia_x11`. ''; }; @@ -73,9 +73,9 @@ in type = types.str; default = ""; example = "my secret seed"; - description = '' - Provides a custom seed for the RANDSTRUCT security - option of the Linux kernel. Note that RANDSTRUCT is + description = lib.mdDoc '' + Provides a custom seed for the {var}`RANDSTRUCT` security + option of the Linux kernel. Note that {var}`RANDSTRUCT` is only enabled in NixOS hardened kernels. Using a custom seed requires building the kernel and dependent packages locally, since this customization happens at build time. @@ -173,7 +173,7 @@ in type = types.listOf types.path; internal = true; default = []; - description = '' + description = lib.mdDoc '' Tree of kernel modules. This includes the kernel, plus modules built outside of the kernel. Combine these into a single tree of symlinks because modprobe only supports one directory. @@ -193,7 +193,7 @@ in ''; internal = true; type = types.listOf types.attrs; - description = '' + description = lib.mdDoc '' This option allows modules to specify the kernel config options that must be set (or unset) for the module to work. Please use the lib.kernelConfig functions to build list elements. diff --git a/nixos/modules/system/boot/kernel_config.nix b/nixos/modules/system/boot/kernel_config.nix index 997c404be16..31e9ec626ca 100644 --- a/nixos/modules/system/boot/kernel_config.nix +++ b/nixos/modules/system/boot/kernel_config.nix @@ -14,7 +14,7 @@ let default = null; internal = true; visible = true; - description = '' + description = lib.mdDoc '' Use this field for tristate kernel options expecting a "y" or "m" or "n". ''; }; diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix index 1ad7cd81094..1b075133ff4 100644 --- a/nixos/modules/system/boot/loader/grub/grub.nix +++ b/nixos/modules/system/boot/loader/grub/grub.nix @@ -417,23 +417,23 @@ in splashImage = mkOption { type = types.nullOr types.path; example = literalExpression "./my-background.png"; - description = '' + description = lib.mdDoc '' Background image used for GRUB. - Set to null to run GRUB in text mode. + Set to `null` to run GRUB in text mode. - + ::: {.note} For grub 1: It must be a 640x480, 14-colour image in XPM format, optionally compressed with - gzip or bzip2. - + {command}`gzip` or {command}`bzip2`. + ::: - + ::: {.note} For grub 2: File must be one of .png, .tga, .jpg, or .jpeg. JPEG images must not be progressive. The image will be scaled if necessary to fit the screen. - + ::: ''; }; @@ -441,36 +441,36 @@ in type = types.nullOr types.str; example = "#7EBAE4"; default = null; - description = '' + description = lib.mdDoc '' Background color to be used for GRUB to fill the areas the image isn't filling. - + ::: {.note} This options has no effect for GRUB 1. - + ::: ''; }; entryOptions = mkOption { default = "--class nixos --unrestricted"; type = types.nullOr types.str; - description = '' + description = lib.mdDoc '' Options applied to the primary NixOS menu entry. - + ::: {.note} This options has no effect for GRUB 1. - + ::: ''; }; subEntryOptions = mkOption { default = "--class nixos"; type = types.nullOr types.str; - description = '' + description = lib.mdDoc '' Options applied to the secondary NixOS submenu entry. - + ::: {.note} This options has no effect for GRUB 1. - + ::: ''; }; @@ -478,24 +478,24 @@ in type = types.nullOr types.path; example = literalExpression "pkgs.nixos-grub2-theme"; default = null; - description = '' + description = lib.mdDoc '' Grub theme to be used. - + ::: {.note} This options has no effect for GRUB 1. - + ::: ''; }; splashMode = mkOption { type = types.enum [ "normal" "stretch" ]; default = "stretch"; - description = '' + description = lib.mdDoc '' Whether to stretch the image or show the image in the top-left corner unstretched. - + ::: {.note} This options has no effect for GRUB 1. - + ::: ''; }; @@ -622,37 +622,35 @@ in efiInstallAsRemovable = mkOption { default = false; type = types.bool; - description = '' - Whether to invoke grub-install with - --removable. + description = lib.mdDoc '' + Whether to invoke `grub-install` with + `--removable`. Unless you turn this on, GRUB will install itself somewhere in - boot.loader.efi.efiSysMountPoint (exactly where + `boot.loader.efi.efiSysMountPoint` (exactly where depends on other config variables). If you've set - boot.loader.efi.canTouchEfiVariables *AND* you + `boot.loader.efi.canTouchEfiVariables` *AND* you are currently booted in UEFI mode, then GRUB will use - efibootmgr to modify the boot order in the + `efibootmgr` to modify the boot order in the EFI variables of your firmware to include this location. If you are *not* booted in UEFI mode at the time GRUB is being installed, the NVRAM will not be modified, and your system will not find GRUB at boot time. However, GRUB will still return success so you may miss - the warning that gets printed ("efibootmgr: EFI variables - are not supported on this system."). + the warning that gets printed ("`efibootmgr: EFI variables + are not supported on this system.`"). If you turn this feature on, GRUB will install itself in a - special location within efiSysMountPoint (namely - EFI/boot/boot$arch.efi) which the firmwares + special location within `efiSysMountPoint` (namely + `EFI/boot/boot$arch.efi`) which the firmwares are hardcoded to try first, regardless of NVRAM EFI variables. To summarize, turn this on if: - - You are installing NixOS and want it to boot in UEFI mode, - but you are currently booted in legacy mode - You want to make a drive that will boot regardless of - the NVRAM state of the computer (like a USB "removable" drive) - You simply dislike the idea of depending on NVRAM - state to make your drive bootable - + - You are installing NixOS and want it to boot in UEFI mode, + but you are currently booted in legacy mode + - You want to make a drive that will boot regardless of + the NVRAM state of the computer (like a USB "removable" drive) + - You simply dislike the idea of depending on NVRAM + state to make your drive bootable ''; }; diff --git a/nixos/modules/system/boot/loader/grub/memtest.nix b/nixos/modules/system/boot/loader/grub/memtest.nix index 150068e0e95..ccb6e8cc3ca 100644 --- a/nixos/modules/system/boot/loader/grub/memtest.nix +++ b/nixos/modules/system/boot/loader/grub/memtest.nix @@ -31,45 +31,29 @@ in default = []; example = [ "console=ttyS0,115200" ]; type = types.listOf types.str; - description = '' + description = lib.mdDoc '' Parameters added to the Memtest86+ command line. As of memtest86+ 5.01 the following list of (apparently undocumented) parameters are accepted: - - - - console=..., set up a serial console. + - `console=...`, set up a serial console. Examples: - console=ttyS0, - console=ttyS0,9600 or - console=ttyS0,115200n8. - + `console=ttyS0`, + `console=ttyS0,9600` or + `console=ttyS0,115200n8`. - - btrace, enable boot trace. - + - `btrace`, enable boot trace. - - maxcpus=N, limit number of CPUs. - + - `maxcpus=N`, limit number of CPUs. - - onepass, run one pass and exit if there - are no errors. - + - `onepass`, run one pass and exit if there + are no errors. - - tstlist=..., list of tests to run. - Example: 0,1,2. - + - `tstlist=...`, list of tests to run. + Example: `0,1,2`. - - cpumask=..., set a CPU mask, to select CPUs - to use for testing. - - - + - `cpumask=...`, set a CPU mask, to select CPUs + to use for testing. This list of command line options was obtained by reading the Memtest86+ source code. diff --git a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix index 426aa021c8b..1dde5507433 100644 --- a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix +++ b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix @@ -58,7 +58,7 @@ in version = mkOption { default = 2; type = types.enum [ 0 1 2 3 4 ]; - description = ""; + description = lib.mdDoc ""; }; uboot = { diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix index baf0a9fe9c4..a9d43d027e0 100644 --- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix +++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix @@ -104,29 +104,15 @@ in { type = types.enum [ "0" "1" "2" "auto" "max" "keep" ]; - description = '' + description = lib.mdDoc '' The resolution of the console. The following values are valid: - - - "0": Standard UEFI 80x25 mode - - - "1": 80x50 mode, not supported by all devices - - - "2": The first non-standard mode provided by the device firmware, if any - - - "auto": Pick a suitable mode automatically using heuristics - - - "max": Pick the highest-numbered available mode - - - "keep": Keep the mode selected by firmware (the default) - - + - `"0"`: Standard UEFI 80x25 mode + - `"1"`: 80x50 mode, not supported by all devices + - `"2"`: The first non-standard mode provided by the device firmware, if any + - `"auto"`: Pick a suitable mode automatically using heuristics + - `"max"`: Pick the highest-numbered available mode + - `"keep"`: Keep the mode selected by firmware (the default) ''; }; diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index 8cd16974916..a076ea24a42 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -523,7 +523,7 @@ in type = types.bool; default = false; internal = true; - description = '' + description = lib.mdDoc '' Whether to configure luks support in the initrd, when no luks devices are configured. ''; @@ -563,7 +563,7 @@ in default = name; example = "luksroot"; type = types.str; - description = "Name of the unencrypted device in /dev/mapper."; + description = lib.mdDoc "Name of the unencrypted device in {file}`/dev/mapper`."; }; device = mkOption { @@ -819,7 +819,7 @@ in default = []; example = [ "_netdev" ]; visible = false; - description = '' + description = lib.mdDoc '' Only used with systemd stage 1. Extra options to append to the last column of the generated crypttab file. diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index 71891ebbfef..0b38a94c25f 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -1864,7 +1864,7 @@ in }; systemd.network.units = mkOption { - description = "Definition of networkd units."; + description = lib.mdDoc "Definition of networkd units."; default = {}; internal = true; type = with types; attrsOf (submodule ( diff --git a/nixos/modules/system/boot/plymouth.nix b/nixos/modules/system/boot/plymouth.nix index 6e20d7dc5e0..9b6472fea42 100644 --- a/nixos/modules/system/boot/plymouth.nix +++ b/nixos/modules/system/boot/plymouth.nix @@ -62,7 +62,7 @@ in boot.plymouth = { - enable = mkEnableOption "Plymouth boot splash screen"; + enable = mkEnableOption (lib.mdDoc "Plymouth boot splash screen"); font = mkOption { default = "${pkgs.dejavu_fonts.minimal}/share/fonts/truetype/DejaVuSans.ttf"; diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 66b51cd7260..28c76fb169f 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -475,12 +475,12 @@ in type = types.str; default = ""; example = "/dev/sda3"; - description = '' + description = lib.mdDoc '' Device for manual resume attempt during boot. This should be used primarily if you want to resume from file. If left empty, the swap partitions are used. Specify here the device where the file resides. - You should also use boot.kernelParams to specify - «resume_offset». + You should also use {var}`boot.kernelParams` to specify + `«resume_offset»`. ''; }; @@ -575,7 +575,7 @@ in internal = true; default = ""; type = types.lines; - description = '' + description = lib.mdDoc '' Shell commands to be executed in the builder of the extra-utils derivation. This can be used to provide additional utilities in the initial ramdisk. @@ -586,7 +586,7 @@ in internal = true; default = ""; type = types.lines; - description = '' + description = lib.mdDoc '' Shell commands to be executed in the builder of the extra-utils derivation after patchelf has done its job. This can be used to test additional utilities @@ -598,7 +598,7 @@ in internal = true; default = ""; type = types.lines; - description = '' + description = lib.mdDoc '' Shell commands to be executed in the builder of the udev-rules derivation. This can be used to add additional udev rules in the initial ramdisk. @@ -613,14 +613,12 @@ in ); defaultText = literalMD "`zstd` if the kernel supports it (5.9+), `gzip` if not"; type = types.either types.str (types.functionTo types.str); - description = '' + description = lib.mdDoc '' The compressor to use on the initrd image. May be any of: - - The name of one of the predefined compressors, see pkgs/build-support/kernel/initrd-compressor-meta.nix for the definitions. - A function which, given the nixpkgs package set, returns the path to a compressor tool, e.g. pkgs: "''${pkgs.pigz}/bin/pigz" - (not recommended, because it does not work when cross-compiling) the full path to a compressor tool, e.g. "''${pkgs.pigz}/bin/pigz" - + - The name of one of the predefined compressors, see {file}`pkgs/build-support/kernel/initrd-compressor-meta.nix` for the definitions. + - A function which, given the nixpkgs package set, returns the path to a compressor tool, e.g. `pkgs: "''${pkgs.pigz}/bin/pigz"` + - (not recommended, because it does not work when cross-compiling) the full path to a compressor tool, e.g. `"''${pkgs.pigz}/bin/pigz"` The given program should read data from stdin and write it to stdout compressed. ''; @@ -662,16 +660,14 @@ in default = true; type = types.bool; description = - '' + lib.mdDoc '' Verbosity of the initrd. Please note that disabling verbosity removes only the mandatory messages generated by the NixOS scripts. For a completely silent boot, you might also want to set the two following configuration options: - - boot.consoleLogLevel = 0; - boot.kernelParams = [ "quiet" "udev.log_level=3" ]; - + - `boot.consoleLogLevel = 0;` + - `boot.kernelParams = [ "quiet" "udev.log_level=3" ];` ''; }; @@ -680,7 +676,7 @@ in default = false; type = types.bool; description = - '' + lib.mdDoc '' Whether the bootloader setup runs append-initrd-secrets. If not, any needed secrets must be copied into the initrd and thus added to the store. diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index 8b3bbfdd249..e843214f855 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -132,12 +132,15 @@ let in { options.boot.initrd.systemd = { - enable = mkEnableOption ''systemd in initrd. + enable = mkEnableOption (lib.mdDoc "systemd in initrd") // { + description = lib.mdDoc '' + Whether to enable systemd in initrd. - Note: This is in very early development and is highly - experimental. Most of the features NixOS supports in initrd are - not yet supported by the intrd generated with this option. - ''; + Note: This is in very early development and is highly + experimental. Most of the features NixOS supports in initrd are + not yet supported by the intrd generated with this option. + ''; + }; package = (mkPackageOption pkgs "systemd" { default = "systemdStage1"; diff --git a/nixos/modules/system/boot/systemd/shutdown.nix b/nixos/modules/system/boot/systemd/shutdown.nix index 5b190700c5d..b4b750fa9aa 100644 --- a/nixos/modules/system/boot/systemd/shutdown.nix +++ b/nixos/modules/system/boot/systemd/shutdown.nix @@ -9,7 +9,7 @@ in { options.systemd.shutdownRamfs = { - enable = lib.mkEnableOption "pivoting back to an initramfs for shutdown" // { default = true; }; + enable = lib.mkEnableOption (lib.mdDoc "pivoting back to an initramfs for shutdown") // { default = true; }; contents = lib.mkOption { description = lib.mdDoc "Set of files that have to be linked into the shutdown ramfs"; example = lib.literalExpression '' diff --git a/nixos/modules/system/boot/systemd/user.nix b/nixos/modules/system/boot/systemd/user.nix index 3200a58d73c..46d66fe4e68 100644 --- a/nixos/modules/system/boot/systemd/user.nix +++ b/nixos/modules/system/boot/systemd/user.nix @@ -97,7 +97,7 @@ in { default = []; type = types.listOf types.str; example = []; - description = '' + description = lib.mdDoc '' Additional units shipped with systemd that should be enabled for per-user systemd instances. ''; internal = true; diff --git a/nixos/modules/tasks/bcache.nix b/nixos/modules/tasks/bcache.nix index 0a13522de11..408ddc02373 100644 --- a/nixos/modules/tasks/bcache.nix +++ b/nixos/modules/tasks/bcache.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: { - options.boot.initrd.services.bcache.enable = (lib.mkEnableOption "bcache support in the initrd") // { + options.boot.initrd.services.bcache.enable = (lib.mkEnableOption (lib.mdDoc "bcache support in the initrd")) // { visible = false; # only works with systemd stage 1 }; diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix index 4cf974b2edc..99474760130 100644 --- a/nixos/modules/tasks/filesystems.nix +++ b/nixos/modules/tasks/filesystems.nix @@ -223,7 +223,7 @@ in system.fsPackages = mkOption { internal = true; default = [ ]; - description = "Packages supplying file system mounters and checkers."; + description = lib.mdDoc "Packages supplying file system mounters and checkers."; }; boot.supportedFilesystems = mkOption { @@ -237,7 +237,7 @@ in default = {}; type = types.attrsOf (types.submodule coreFileSystemOpts); internal = true; - description = '' + description = lib.mdDoc '' Special filesystems that are mounted very early during boot. ''; }; diff --git a/nixos/modules/tasks/filesystems/btrfs.nix b/nixos/modules/tasks/filesystems/btrfs.nix index 32bfaba95c2..bd85a1f8d1f 100644 --- a/nixos/modules/tasks/filesystems/btrfs.nix +++ b/nixos/modules/tasks/filesystems/btrfs.nix @@ -19,7 +19,7 @@ in # One could also do regular btrfs balances, but that shouldn't be necessary # during normal usage and as long as the filesystems aren't filled near capacity services.btrfs.autoScrub = { - enable = mkEnableOption "regular btrfs scrub"; + enable = mkEnableOption (lib.mdDoc "regular btrfs scrub"); fileSystems = mkOption { type = types.listOf types.path; diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 098f9031628..96222f3b4f6 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -277,12 +277,12 @@ in forceImportAll = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Forcibly import all ZFS pool(s). - If you set this option to false and NixOS subsequently fails to + If you set this option to `false` and NixOS subsequently fails to import your non-root ZFS pool(s), you should manually import each pool with - "zpool import -f <pool-name>", and then reboot. You should only need to do + "zpool import -f \", and then reboot. You should only need to do this once. ''; }; @@ -399,7 +399,7 @@ in }; services.zfs.autoScrub = { - enable = mkEnableOption "periodic scrubbing of ZFS pools"; + enable = mkEnableOption (lib.mdDoc "periodic scrubbing of ZFS pools"); interval = mkOption { default = "Sun, 02:00"; @@ -440,7 +440,7 @@ in }; services.zfs.zed = { - enableMail = mkEnableOption "ZED's ability to send emails" // { + enableMail = mkEnableOption (lib.mdDoc "ZED's ability to send emails") // { default = cfgZfs.package.enableMail; defaultText = literalExpression "config.${optZfs.package}.enableMail"; }; diff --git a/nixos/modules/tasks/lvm.nix b/nixos/modules/tasks/lvm.nix index 2f98e3e7da5..760133fafa2 100644 --- a/nixos/modules/tasks/lvm.nix +++ b/nixos/modules/tasks/lvm.nix @@ -10,18 +10,18 @@ in { default = pkgs.lvm2; internal = true; defaultText = literalExpression "pkgs.lvm2"; - description = '' + description = lib.mdDoc '' This option allows you to override the LVM package that's used on the system (udev rules, tmpfiles, systemd services). Defaults to pkgs.lvm2, pkgs.lvm2_dmeventd if dmeventd or pkgs.lvm2_vdo if vdo is enabled. ''; }; - dmeventd.enable = mkEnableOption "the LVM dmevent daemon"; - boot.thin.enable = mkEnableOption "support for booting from ThinLVs"; - boot.vdo.enable = mkEnableOption "support for booting from VDOLVs"; + dmeventd.enable = mkEnableOption (lib.mdDoc "the LVM dmevent daemon"); + boot.thin.enable = mkEnableOption (lib.mdDoc "support for booting from ThinLVs"); + boot.vdo.enable = mkEnableOption (lib.mdDoc "support for booting from VDOLVs"); }; - options.boot.initrd.services.lvm.enable = (mkEnableOption "enable booting from LVM2 in the initrd") // { + options.boot.initrd.services.lvm.enable = (mkEnableOption (lib.mdDoc "enable booting from LVM2 in the initrd")) // { visible = false; }; diff --git a/nixos/modules/tasks/powertop.nix b/nixos/modules/tasks/powertop.nix index e8064f9fa80..3839b7a4260 100644 --- a/nixos/modules/tasks/powertop.nix +++ b/nixos/modules/tasks/powertop.nix @@ -7,7 +7,7 @@ let in { ###### interface - options.powerManagement.powertop.enable = mkEnableOption "powertop auto tuning on startup"; + options.powerManagement.powertop.enable = mkEnableOption (lib.mdDoc "powertop auto tuning on startup"); ###### implementation diff --git a/nixos/modules/tasks/snapraid.nix b/nixos/modules/tasks/snapraid.nix index 634ffa03111..243d25f8842 100644 --- a/nixos/modules/tasks/snapraid.nix +++ b/nixos/modules/tasks/snapraid.nix @@ -6,7 +6,7 @@ let cfg = config.snapraid; in { options.snapraid = with types; { - enable = mkEnableOption "SnapRAID"; + enable = mkEnableOption (lib.mdDoc "SnapRAID"); dataDisks = mkOption { default = { }; example = { diff --git a/nixos/modules/tasks/swraid.nix b/nixos/modules/tasks/swraid.nix index 26d6bd914d5..7832bbf9201 100644 --- a/nixos/modules/tasks/swraid.nix +++ b/nixos/modules/tasks/swraid.nix @@ -5,7 +5,7 @@ in { options.boot.initrd.services.swraid = { - enable = (lib.mkEnableOption "swraid support using mdadm") // { + enable = (lib.mkEnableOption (lib.mdDoc "swraid support using mdadm")) // { visible = false; # only has effect when the new stage 1 is in place }; diff --git a/nixos/modules/testing/service-runner.nix b/nixos/modules/testing/service-runner.nix index 9060be3cca1..bdb35f128a7 100644 --- a/nixos/modules/testing/service-runner.nix +++ b/nixos/modules/testing/service-runner.nix @@ -107,7 +107,7 @@ let opts = { config, name, ... }: { options.runner = mkOption { internal = true; - description = '' + description = lib.mdDoc '' A script that runs the service outside of systemd, useful for testing or for using NixOS services outside of NixOS. diff --git a/nixos/modules/virtualisation/amazon-options.nix b/nixos/modules/virtualisation/amazon-options.nix index ef0ad52b905..227f3e433c1 100644 --- a/nixos/modules/virtualisation/amazon-options.nix +++ b/nixos/modules/virtualisation/amazon-options.nix @@ -8,7 +8,7 @@ in { enable = lib.mkOption { default = false; internal = true; - description = '' + description = lib.mdDoc '' Whether the EC2 instance uses a ZFS root. ''; }; @@ -44,7 +44,7 @@ in { hvm = lib.mkOption { default = lib.versionAtLeast config.system.stateVersion "17.03"; internal = true; - description = '' + description = lib.mdDoc '' Whether the EC2 instance is a HVM instance. ''; }; @@ -52,7 +52,7 @@ in { default = pkgs.stdenv.hostPlatform.isAarch64; defaultText = literalExpression "pkgs.stdenv.hostPlatform.isAarch64"; internal = true; - description = '' + description = lib.mdDoc '' Whether the EC2 instance is using EFI. ''; }; diff --git a/nixos/modules/virtualisation/anbox.nix b/nixos/modules/virtualisation/anbox.nix index 6ba71ede7df..c7e9e23c4c9 100644 --- a/nixos/modules/virtualisation/anbox.nix +++ b/nixos/modules/virtualisation/anbox.nix @@ -31,7 +31,7 @@ in options.virtualisation.anbox = { - enable = mkEnableOption "Anbox"; + enable = mkEnableOption (lib.mdDoc "Anbox"); image = mkOption { default = pkgs.anbox.image; diff --git a/nixos/modules/virtualisation/containerd.nix b/nixos/modules/virtualisation/containerd.nix index 96fa6761296..f6e3c838729 100644 --- a/nixos/modules/virtualisation/containerd.nix +++ b/nixos/modules/virtualisation/containerd.nix @@ -19,7 +19,7 @@ in { options.virtualisation.containerd = with lib.types; { - enable = lib.mkEnableOption "containerd container runtime"; + enable = lib.mkEnableOption (lib.mdDoc "containerd container runtime"); configFile = lib.mkOption { default = null; diff --git a/nixos/modules/virtualisation/cri-o.nix b/nixos/modules/virtualisation/cri-o.nix index d079626a700..95ce1fea58b 100644 --- a/nixos/modules/virtualisation/cri-o.nix +++ b/nixos/modules/virtualisation/cri-o.nix @@ -16,7 +16,7 @@ in }; options.virtualisation.cri-o = { - enable = mkEnableOption "Container Runtime Interface for OCI (CRI-O)"; + enable = mkEnableOption (lib.mdDoc "Container Runtime Interface for OCI (CRI-O)"); storageDriver = mkOption { type = types.enum [ "btrfs" "overlay" "vfs" ]; @@ -68,7 +68,7 @@ in type = types.package; default = crioPackage; internal = true; - description = '' + description = lib.mdDoc '' The final CRI-O package (including extra packages). ''; }; @@ -76,7 +76,7 @@ in networkDir = mkOption { type = types.nullOr types.path; default = null; - description = "Override the network_dir option."; + description = lib.mdDoc "Override the network_dir option."; internal = true; }; diff --git a/nixos/modules/virtualisation/ecs-agent.nix b/nixos/modules/virtualisation/ecs-agent.nix index af1736fcf0b..dd87df9a278 100644 --- a/nixos/modules/virtualisation/ecs-agent.nix +++ b/nixos/modules/virtualisation/ecs-agent.nix @@ -6,7 +6,7 @@ let cfg = config.services.ecs-agent; in { options.services.ecs-agent = { - enable = mkEnableOption "Amazon ECS agent"; + enable = mkEnableOption (lib.mdDoc "Amazon ECS agent"); package = mkOption { type = types.path; diff --git a/nixos/modules/virtualisation/hyperv-guest.nix b/nixos/modules/virtualisation/hyperv-guest.nix index e6ba38370f2..7c73e32be69 100644 --- a/nixos/modules/virtualisation/hyperv-guest.nix +++ b/nixos/modules/virtualisation/hyperv-guest.nix @@ -8,7 +8,7 @@ let in { options = { virtualisation.hypervGuest = { - enable = mkEnableOption "Hyper-V Guest Support"; + enable = mkEnableOption (lib.mdDoc "Hyper-V Guest Support"); videoMode = mkOption { type = types.str; diff --git a/nixos/modules/virtualisation/kvmgt.nix b/nixos/modules/virtualisation/kvmgt.nix index 5671e5b66db..1e02636f81f 100644 --- a/nixos/modules/virtualisation/kvmgt.nix +++ b/nixos/modules/virtualisation/kvmgt.nix @@ -17,11 +17,11 @@ let in { options = { virtualisation.kvmgt = { - enable = mkEnableOption '' + enable = mkEnableOption (lib.mdDoc '' KVMGT (iGVT-g) VGPU support. Allows Qemu/KVM guests to share host's Intel integrated graphics card. Currently only one graphical device can be shared. To allow users to access the device without root add them - to the kvm group: users.extraUsers.<yourusername>.extraGroups = [ "kvm" ]; - ''; + to the kvm group: `users.extraUsers..extraGroups = [ "kvm" ];` + ''); # multi GPU support is under the question device = mkOption { type = types.str; diff --git a/nixos/modules/virtualisation/lxc-container.nix b/nixos/modules/virtualisation/lxc-container.nix index d3a2e0ed151..f05f04baa35 100644 --- a/nixos/modules/virtualisation/lxc-container.nix +++ b/nixos/modules/virtualisation/lxc-container.nix @@ -5,22 +5,22 @@ with lib; let templateSubmodule = { ... }: { options = { - enable = mkEnableOption "this template"; + enable = mkEnableOption (lib.mdDoc "this template"); target = mkOption { - description = "Path in the container"; + description = lib.mdDoc "Path in the container"; type = types.path; }; template = mkOption { - description = ".tpl file for rendering the target"; + description = lib.mdDoc ".tpl file for rendering the target"; type = types.path; }; when = mkOption { - description = "Events which trigger a rewrite (create, copy)"; + description = lib.mdDoc "Events which trigger a rewrite (create, copy)"; type = types.listOf (types.str); }; properties = mkOption { - description = "Additional properties"; + description = lib.mdDoc "Additional properties"; type = types.attrs; default = {}; }; @@ -58,7 +58,7 @@ in options = { virtualisation.lxc = { templates = mkOption { - description = "Templates for LXD"; + description = lib.mdDoc "Templates for LXD"; type = types.attrsOf (types.submodule (templateSubmodule)); default = {}; example = literalExpression '' diff --git a/nixos/modules/virtualisation/lxcfs.nix b/nixos/modules/virtualisation/lxcfs.nix index b2457403463..fb0ba49f730 100644 --- a/nixos/modules/virtualisation/lxcfs.nix +++ b/nixos/modules/virtualisation/lxcfs.nix @@ -15,13 +15,13 @@ in { mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' This enables LXCFS, a FUSE filesystem for LXC. To use lxcfs in include the following configuration in your container configuration: - - virtualisation.lxc.defaultConfig = "lxc.include = ''${pkgs.lxcfs}/share/lxc/config/common.conf.d/00-lxcfs.conf"; - + ``` + virtualisation.lxc.defaultConfig = "lxc.include = ''${pkgs.lxcfs}/share/lxc/config/common.conf.d/00-lxcfs.conf"; + ``` ''; }; }; diff --git a/nixos/modules/virtualisation/lxd.nix b/nixos/modules/virtualisation/lxd.nix index f1eabee5ffa..764bb5e3b40 100644 --- a/nixos/modules/virtualisation/lxd.nix +++ b/nixos/modules/virtualisation/lxd.nix @@ -18,17 +18,17 @@ in { enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' This option enables lxd, a daemon that manages containers. Users in the "lxd" group can interact with the daemon (e.g. to start or stop containers) using the - lxc command line tool, among others. + {command}`lxc` command line tool, among others. Most of the time, you'll also want to start lxcfs, so that containers can "see" the limits: - - virtualisation.lxc.lxcfs.enable = true; - + ``` + virtualisation.lxc.lxcfs.enable = true; + ``` ''; }; diff --git a/nixos/modules/virtualisation/nixos-containers.nix b/nixos/modules/virtualisation/nixos-containers.nix index f15511f2df5..22be1d5bff9 100644 --- a/nixos/modules/virtualisation/nixos-containers.nix +++ b/nixos/modules/virtualisation/nixos-containers.nix @@ -550,7 +550,7 @@ in ephemeral = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Runs container in ephemeral mode with the empty root filesystem at boot. This way container will be bootstrapped from scratch on each boot and will be cleaned up on shutdown leaving no traces behind. @@ -558,8 +558,8 @@ in Note that this option might require to do some adjustments to the container configuration, e.g. you might want to set - systemd.network.networks.$interface.dhcpV4Config.ClientIdentifier to "mac" - if you use macvlans option. + {var}`systemd.network.networks.$interface.dhcpV4Config.ClientIdentifier` to "mac" + if you use {var}`macvlans` option. This way dhcp client identifier will be stable between the container restarts. Note that the container journal will not be linked to the host if this option is enabled. diff --git a/nixos/modules/virtualisation/openstack-options.nix b/nixos/modules/virtualisation/openstack-options.nix index e1985a20732..c71b581b02c 100644 --- a/nixos/modules/virtualisation/openstack-options.nix +++ b/nixos/modules/virtualisation/openstack-options.nix @@ -9,7 +9,7 @@ in enable = lib.mkOption { default = false; internal = true; - description = '' + description = lib.mdDoc '' Whether the OpenStack instance uses a ZFS root. ''; }; @@ -47,7 +47,7 @@ in default = pkgs.stdenv.hostPlatform.isAarch64; defaultText = literalExpression "pkgs.stdenv.hostPlatform.isAarch64"; internal = true; - description = '' + description = lib.mdDoc '' Whether the instance is using EFI. ''; }; diff --git a/nixos/modules/virtualisation/podman/default.nix b/nixos/modules/virtualisation/podman/default.nix index 90df074c647..118bf82cdd6 100644 --- a/nixos/modules/virtualisation/podman/default.nix +++ b/nixos/modules/virtualisation/podman/default.nix @@ -113,7 +113,7 @@ in type = types.package; default = podmanPackage; internal = true; - description = '' + description = lib.mdDoc '' The final Podman package (including extra packages). ''; }; diff --git a/nixos/modules/virtualisation/proxmox-lxc.nix b/nixos/modules/virtualisation/proxmox-lxc.nix index 9b9f99e5b81..3d966d725a9 100644 --- a/nixos/modules/virtualisation/proxmox-lxc.nix +++ b/nixos/modules/virtualisation/proxmox-lxc.nix @@ -7,14 +7,14 @@ with lib; privileged = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to enable privileged mounts ''; }; manageNetwork = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to manage network interfaces through nix options When false, systemd-networkd is enabled to accept network configuration from proxmox. @@ -23,7 +23,7 @@ with lib; manageHostName = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to manage hostname through nix options When false, the hostname is picked up from /etc/hostname populated by proxmox. diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index bdbcae1db55..0207bfba82a 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -465,14 +465,13 @@ in type = types.enum [ "host" "guest" ]; default = "host"; description = - '' + lib.mdDoc '' Controls the direction in which the ports are mapped: - - "host" means traffic from the host ports - is forwarded to the given guest port. - - - "guest" means traffic from the guest ports - is forwarded to the given host port. + - `"host"` means traffic from the host ports + is forwarded to the given guest port. + - `"guest"` means traffic from the guest ports + is forwarded to the given host port. ''; }; options.proto = mkOption { @@ -513,17 +512,19 @@ in ] ''; description = - '' + lib.mdDoc '' When using the SLiRP user networking (default), this option allows to forward ports to/from the host/guest. - - If the NixOS firewall on the virtual machine is enabled, you also - have to open the guest ports to enable the traffic between host and - guest. - + ::: {.warning} + If the NixOS firewall on the virtual machine is enabled, you also + have to open the guest ports to enable the traffic between host and + guest. + ::: - Currently QEMU supports only IPv4 forwarding. + ::: {.note} + Currently QEMU supports only IPv4 forwarding. + ::: ''; }; @@ -573,7 +574,7 @@ in type = types.str; default = ""; internal = true; - description = "Primary IP address used in /etc/hosts."; + description = lib.mdDoc "Primary IP address used in /etc/hosts."; }; virtualisation.host.pkgs = mkOption { diff --git a/nixos/modules/virtualisation/virtualbox-host.nix b/nixos/modules/virtualisation/virtualbox-host.nix index 4e47febed1b..5a2ec4939d9 100644 --- a/nixos/modules/virtualisation/virtualbox-host.nix +++ b/nixos/modules/virtualisation/virtualbox-host.nix @@ -18,25 +18,25 @@ in { options.virtualisation.virtualbox.host = { - enable = mkEnableOption "VirtualBox" // { - description = '' + enable = mkEnableOption (lib.mdDoc "VirtualBox") // { + description = lib.mdDoc '' Whether to enable VirtualBox. - - In order to pass USB devices from the host to the guests, the user - needs to be in the vboxusers group. - + ::: {.note} + In order to pass USB devices from the host to the guests, the user + needs to be in the `vboxusers` group. + ::: ''; }; - enableExtensionPack = mkEnableOption "VirtualBox extension pack" // { - description = '' + enableExtensionPack = mkEnableOption (lib.mdDoc "VirtualBox extension pack") // { + description = lib.mdDoc '' Whether to install the Oracle Extension Pack for VirtualBox. - - You must set nixpkgs.config.allowUnfree = true in - order to use this. This requires you accept the VirtualBox PUEL. - + ::: {.important} + You must set `nixpkgs.config.allowUnfree = true` in + order to use this. This requires you accept the VirtualBox PUEL. + ::: ''; }; @@ -60,15 +60,15 @@ in enableHardening = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Enable hardened VirtualBox, which ensures that only the binaries in the system path get access to the devices exposed by the kernel modules instead of all users in the vboxusers group. - - Disabling this can put your system's security at risk, as local users - in the vboxusers group can tamper with the VirtualBox device files. - + ::: {.important} + Disabling this can put your system's security at risk, as local users + in the vboxusers group can tamper with the VirtualBox device files. + ::: ''; }; diff --git a/nixos/modules/virtualisation/vmware-guest.nix b/nixos/modules/virtualisation/vmware-guest.nix index 61ff9da65af..3b4d484fc8b 100644 --- a/nixos/modules/virtualisation/vmware-guest.nix +++ b/nixos/modules/virtualisation/vmware-guest.nix @@ -13,7 +13,7 @@ in ]; options.virtualisation.vmware.guest = { - enable = mkEnableOption "VMWare Guest Support"; + enable = mkEnableOption (lib.mdDoc "VMWare Guest Support"); headless = mkOption { type = types.bool; default = false; diff --git a/nixos/modules/virtualisation/vmware-host.nix b/nixos/modules/virtualisation/vmware-host.nix index b4869f0210d..e1d695640be 100644 --- a/nixos/modules/virtualisation/vmware-host.nix +++ b/nixos/modules/virtualisation/vmware-host.nix @@ -20,21 +20,21 @@ in { options = with lib; { virtualisation.vmware.host = { - enable = mkEnableOption "VMware" // { - description = '' + enable = mkEnableOption (lib.mdDoc "VMware") // { + description = lib.mdDoc '' This enables VMware host virtualisation for running VMs. - - vmware-vmx will cause kcompactd0 due to - Transparent Hugepages feature in kernel. - Apply [ "transparent_hugepage=never" ] in - option to disable them. - + ::: {.important} + `vmware-vmx` will cause kcompactd0 due to + `Transparent Hugepages` feature in kernel. + Apply `[ "transparent_hugepage=never" ]` in + option {option}`boot.kernelParams` to disable them. + ::: - - If that didn't work disable TRANSPARENT_HUGEPAGE, - COMPACTION configs and recompile kernel. - + ::: {.note} + If that didn't work disable `TRANSPARENT_HUGEPAGE`, + `COMPACTION` configs and recompile kernel. + ::: ''; }; package = mkOption { diff --git a/nixos/modules/virtualisation/waydroid.nix b/nixos/modules/virtualisation/waydroid.nix index 84abf606581..a2cfd806f32 100644 --- a/nixos/modules/virtualisation/waydroid.nix +++ b/nixos/modules/virtualisation/waydroid.nix @@ -22,7 +22,7 @@ in { options.virtualisation.waydroid = { - enable = mkEnableOption "Waydroid"; + enable = mkEnableOption (lib.mdDoc "Waydroid"); }; config = mkIf cfg.enable { diff --git a/nixos/modules/virtualisation/xe-guest-utilities.nix b/nixos/modules/virtualisation/xe-guest-utilities.nix index 25ccbaebc07..792edc9b397 100644 --- a/nixos/modules/virtualisation/xe-guest-utilities.nix +++ b/nixos/modules/virtualisation/xe-guest-utilities.nix @@ -5,7 +5,7 @@ let in { options = { services.xe-guest-utilities = { - enable = mkEnableOption "the Xen guest utilities daemon"; + enable = mkEnableOption (lib.mdDoc "the Xen guest utilities daemon"); }; }; config = mkIf cfg.enable { diff --git a/nixos/modules/virtualisation/xen-dom0.nix b/nixos/modules/virtualisation/xen-dom0.nix index 25d06e3c721..8f361a7ac02 100644 --- a/nixos/modules/virtualisation/xen-dom0.nix +++ b/nixos/modules/virtualisation/xen-dom0.nix @@ -139,7 +139,7 @@ in }; }; - virtualisation.xen.trace = mkEnableOption "Xen tracing"; + virtualisation.xen.trace = mkEnableOption (lib.mdDoc "Xen tracing"); }; diff --git a/nixos/tests/common/acme/server/default.nix b/nixos/tests/common/acme/server/default.nix index 450d49e6039..fa1b9b545d0 100644 --- a/nixos/tests/common/acme/server/default.nix +++ b/nixos/tests/common/acme/server/default.nix @@ -81,8 +81,8 @@ in { type = types.str; readOnly = true; default = domain; - description = '' - A domain name to use with the nodes attribute to + description = lib.mdDoc '' + A domain name to use with the `nodes` attribute to identify the CA server. ''; }; @@ -90,10 +90,10 @@ in { type = types.path; readOnly = true; default = testCerts.ca.cert; - description = '' - A certificate file to use with the nodes attribute to + description = lib.mdDoc '' + A certificate file to use with the `nodes` attribute to inject the test CA certificate used in the ACME server into - . + {option}`security.pki.certificateFiles`. ''; }; }; diff --git a/nixos/tests/common/auto.nix b/nixos/tests/common/auto.nix index da6b14e9f16..f2ab82f88ff 100644 --- a/nixos/tests/common/auto.nix +++ b/nixos/tests/common/auto.nix @@ -19,17 +19,17 @@ in enable = mkOption { default = false; - description = '' + description = lib.mdDoc '' Whether to enable the fake "auto" display manager, which automatically logs in the user specified in the - option. This is mostly useful for + {option}`user` option. This is mostly useful for automated tests. ''; }; user = mkOption { default = "root"; - description = "The user account to login automatically."; + description = lib.mdDoc "The user account to login automatically."; }; }; diff --git a/nixos/tests/common/resolver.nix b/nixos/tests/common/resolver.nix index 09a74de20fa..3ddf730668c 100644 --- a/nixos/tests/common/resolver.nix +++ b/nixos/tests/common/resolver.nix @@ -10,15 +10,15 @@ type = lib.types.bool; default = true; internal = true; - description = '' + description = lib.mdDoc '' Whether to enable the resolver that automatically discovers zone in the test network. - This option is true by default, because the module + This option is `true` by default, because the module defining this option needs to be explicitly imported. The reason this option exists is for the - nixos/tests/common/acme/server module, which + {file}`nixos/tests/common/acme/server` module, which needs that option to disable the resolver once the user has set its own resolver. ''; diff --git a/nixos/tests/systemd-confinement.nix b/nixos/tests/systemd-confinement.nix index bde5b770ea5..428888d41a2 100644 --- a/nixos/tests/systemd-confinement.nix +++ b/nixos/tests/systemd-confinement.nix @@ -153,7 +153,7 @@ import ./make-test-python.nix { options.__testSteps = lib.mkOption { type = lib.types.lines; - description = "All of the test steps combined as a single script."; + description = lib.mdDoc "All of the test steps combined as a single script."; }; config.environment.systemPackages = lib.singleton testClient;