Merge master into haskell-updates

This commit is contained in:
github-actions[bot] 2024-04-14 00:16:39 +00:00 committed by GitHub
commit 8fc310056e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1947 changed files with 24850 additions and 18850 deletions

View File

@ -102,9 +102,11 @@ Given the requirements above, the package expression would become messy quickly:
} }
``` ```
Fortunately, there is [`wrapGAppsHook`]{#ssec-gnome-hooks-wrapgappshook}. It works in conjunction with other setup hooks that populate environment variables, and it will then wrap all executables in `bin` and `libexec` directories using said variables. Fortunately, there is [`wrapGAppsHook`]{#ssec-gnome-hooks-wrapgappshook}. It works in conjunction with other setup hooks that populate environment variables, and it will then wrap all executables in `bin` and `libexec` directories using said variables. For convenience, it also adds `dconf.lib` for a GIO module implementing a GSettings backend using `dconf`, `gtk3` for GSettings schemas, and `librsvg` for GdkPixbuf loader to the closure.
For convenience, it also adds `dconf.lib` for a GIO module implementing a GSettings backend using `dconf`, `gtk3` for GSettings schemas, and `librsvg` for GdkPixbuf loader to the closure. There is also [`wrapGAppsHook4`]{#ssec-gnome-hooks-wrapgappshook4}, which replaces GTK 3 with GTK 4. And in case you are packaging a program without a graphical interface, you might want to use [`wrapGAppsNoGuiHook`]{#ssec-gnome-hooks-wrapgappsnoguihook}, which runs the same script as `wrapGAppsHook` but does not bring `gtk3` and `librsvg` into the closure. There is also [`wrapGAppsHook4`]{#ssec-gnome-hooks-wrapgappshook4}, which replaces GTK 3 with GTK 4. Instead of `wrapGAppsHook`, this should be used for all GTK4 applications.
In case you are packaging a program without a graphical interface, you might want to use [`wrapGAppsNoGuiHook`]{#ssec-gnome-hooks-wrapgappsnoguihook}, which runs the same script as `wrapGAppsHook` but does not bring `gtk3` and `librsvg` into the closure.
- `wrapGAppsHook` itself will add the packages `share` directory to `XDG_DATA_DIRS`. - `wrapGAppsHook` itself will add the packages `share` directory to `XDG_DATA_DIRS`.

View File

@ -146,7 +146,7 @@ let
scrubOptionValue literalExpression literalExample scrubOptionValue literalExpression literalExample
showOption showOptionWithDefLocs showFiles showOption showOptionWithDefLocs showFiles
unknownModule mkOption mkPackageOption mkPackageOptionMD unknownModule mkOption mkPackageOption mkPackageOptionMD
mdDoc literalMD; literalMD;
inherit (self.types) isType setType defaultTypeMerge defaultFunctor inherit (self.types) isType setType defaultTypeMerge defaultFunctor
isOptionType mkOptionType; isOptionType mkOptionType;
inherit (self.asserts) inherit (self.asserts)

View File

@ -136,7 +136,7 @@ let
# TODO: Change the type of this option to a submodule with a # TODO: Change the type of this option to a submodule with a
# freeformType, so that individual arguments can be documented # freeformType, so that individual arguments can be documented
# separately # separately
description = lib.mdDoc '' description = ''
Additional arguments passed to each module in addition to ones Additional arguments passed to each module in addition to ones
like `lib`, `config`, like `lib`, `config`,
and `pkgs`, `modulesPath`. and `pkgs`, `modulesPath`.
@ -187,14 +187,14 @@ let
type = types.bool; type = types.bool;
internal = true; internal = true;
default = true; default = true;
description = lib.mdDoc "Whether to check whether all option definitions have matching declarations."; description = "Whether to check whether all option definitions have matching declarations.";
}; };
_module.freeformType = mkOption { _module.freeformType = mkOption {
type = types.nullOr types.optionType; type = types.nullOr types.optionType;
internal = true; internal = true;
default = null; default = null;
description = lib.mdDoc '' description = ''
If set, merge all definitions that don't have an associated option If set, merge all definitions that don't have an associated option
together using this type. The result then gets combined with the together using this type. The result then gets combined with the
values of all declared options to produce the final ` values of all declared options to produce the final `
@ -209,7 +209,7 @@ let
_module.specialArgs = mkOption { _module.specialArgs = mkOption {
readOnly = true; readOnly = true;
internal = true; internal = true;
description = lib.mdDoc '' description = ''
Externally provided module arguments that can't be modified from Externally provided module arguments that can't be modified from
within a configuration, but can be used in module imports. within a configuration, but can be used in module imports.
''; '';

View File

@ -400,9 +400,11 @@ rec {
literalExample = lib.warn "lib.literalExample is deprecated, use lib.literalExpression instead, or use lib.literalMD for a non-Nix description." literalExpression; literalExample = lib.warn "lib.literalExample is deprecated, use lib.literalExpression instead, or use lib.literalMD for a non-Nix description." literalExpression;
/* Transition marker for documentation that's already migrated to markdown /* Transition marker for documentation that's already migrated to markdown
syntax. This is a no-op and no longer needed. syntax. Has been a no-op for some while and been removed from nixpkgs.
Kept here to alert downstream users who may not be aware of the migration's
completion that it should be removed from modules.
*/ */
mdDoc = lib.id; mdDoc = lib.warn "lib.mdDoc was removed from nixpkgs. Option descriptions are now in Markdown by default, you can remove any remaining uses of it.";
/* For use in the `defaultText` and `example` option attributes. Causes the /* For use in the `defaultText` and `example` option attributes. Causes the
given MD text to be inserted verbatim in the documentation, for when given MD text to be inserted verbatim in the documentation, for when

View File

@ -5301,6 +5301,12 @@
fingerprint = "D245 D484 F357 8CB1 7FD6 DA6B 67DB 29BF F3C9 6757"; fingerprint = "D245 D484 F357 8CB1 7FD6 DA6B 67DB 29BF F3C9 6757";
}]; }];
}; };
dragonginger = {
email = "dragonginger10@gmail.com";
github = "dragonginger10";
githubId = 20759788;
name = "JP Lippold";
};
dramaturg = { dramaturg = {
email = "seb@ds.ag"; email = "seb@ds.ag";
github = "dramaturg"; github = "dramaturg";
@ -13973,6 +13979,10 @@
githubId = 56316606; githubId = 56316606;
name = "Amneesh Singh"; name = "Amneesh Singh";
}; };
nayala = {
name = "Nia";
matrix = "@fly:asra.gr";
};
nazarewk = { nazarewk = {
name = "Krzysztof Nazarewski"; name = "Krzysztof Nazarewski";
matrix = "@nazarewk:matrix.org"; matrix = "@nazarewk:matrix.org";
@ -19242,6 +19252,12 @@
githubId = 1939855; githubId = 1939855;
name = "Kimmo Suominen"; name = "Kimmo Suominen";
}; };
supa = {
email = "supa.codes@gmail.com";
github = "0Supa";
githubId = 36031171;
name = "Supa";
};
superbo = { superbo = {
email = "supernbo@gmail.com"; email = "supernbo@gmail.com";
github = "SuperBo"; github = "SuperBo";

View File

@ -23,7 +23,7 @@ in {
options.amazonImage = { options.amazonImage = {
name = mkOption { name = mkOption {
type = types.str; type = types.str;
description = lib.mdDoc "The name of the generated derivation"; description = "The name of the generated derivation";
default = "nixos-amazon-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}"; default = "nixos-amazon-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
}; };
@ -35,7 +35,7 @@ in {
] ]
''; '';
default = []; default = [];
description = lib.mdDoc '' description = ''
This option lists files to be copied to fixed locations in the This option lists files to be copied to fixed locations in the
generated image. Glob patterns work. generated image. Glob patterns work.
''; '';
@ -45,13 +45,13 @@ in {
type = with types; either (enum [ "auto" ]) int; type = with types; either (enum [ "auto" ]) int;
default = 3072; default = 3072;
example = 8192; example = 8192;
description = lib.mdDoc "The size in MB of the image"; description = "The size in MB of the image";
}; };
format = mkOption { format = mkOption {
type = types.enum [ "raw" "qcow2" "vpc" ]; type = types.enum [ "raw" "qcow2" "vpc" ];
default = "vpc"; default = "vpc";
description = lib.mdDoc "The image format to output"; description = "The image format to output";
}; };
}; };

View File

@ -16,26 +16,26 @@ in
options.openstackImage = { options.openstackImage = {
name = mkOption { name = mkOption {
type = types.str; type = types.str;
description = lib.mdDoc "The name of the generated derivation"; description = "The name of the generated derivation";
default = "nixos-openstack-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}"; default = "nixos-openstack-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
}; };
ramMB = mkOption { ramMB = mkOption {
type = types.int; type = types.int;
default = 1024; default = 1024;
description = lib.mdDoc "RAM allocation for build VM"; description = "RAM allocation for build VM";
}; };
sizeMB = mkOption { sizeMB = mkOption {
type = types.int; type = types.int;
default = 8192; default = 8192;
description = lib.mdDoc "The size in MB of the image"; description = "The size in MB of the image";
}; };
format = mkOption { format = mkOption {
type = types.enum [ "raw" "qcow2" ]; type = types.enum [ "raw" "qcow2" ];
default = "qcow2"; default = "qcow2";
description = lib.mdDoc "The image format to output"; description = "The image format to output";
}; };
}; };

View File

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

View File

@ -40,7 +40,7 @@ in
###### interface ###### interface
options.console = { options.console = {
enable = mkEnableOption (lib.mdDoc "virtual console") // { enable = mkEnableOption "virtual console" // {
default = true; default = true;
}; };
@ -48,7 +48,7 @@ in
type = with types; nullOr (either str path); type = with types; nullOr (either str path);
default = null; default = null;
example = "LatArCyrHeb-16"; example = "LatArCyrHeb-16";
description = mdDoc '' description = ''
The font used for the virtual consoles. The font used for the virtual consoles.
Can be `null`, a font name, or a path to a PSF font file. Can be `null`, a font name, or a path to a PSF font file.
@ -65,7 +65,7 @@ in
type = with types; either str path; type = with types; either str path;
default = "us"; default = "us";
example = "fr"; example = "fr";
description = lib.mdDoc '' description = ''
The keyboard mapping table for the virtual consoles. The keyboard mapping table for the virtual consoles.
''; '';
}; };
@ -79,7 +79,7 @@ in
"002b36" "cb4b16" "586e75" "657b83" "002b36" "cb4b16" "586e75" "657b83"
"839496" "6c71c4" "93a1a1" "fdf6e3" "839496" "6c71c4" "93a1a1" "fdf6e3"
]; ];
description = lib.mdDoc '' description = ''
The 16 colors palette used by the virtual consoles. The 16 colors palette used by the virtual consoles.
Leave empty to use the default colors. Leave empty to use the default colors.
Colors must be in hexadecimal format and listed in Colors must be in hexadecimal format and listed in
@ -91,7 +91,7 @@ in
packages = mkOption { packages = mkOption {
type = types.listOf types.package; type = types.listOf types.package;
default = [ ]; default = [ ];
description = lib.mdDoc '' description = ''
List of additional packages that provide console fonts, keymaps and List of additional packages that provide console fonts, keymaps and
other resources for virtual consoles use. other resources for virtual consoles use.
''; '';
@ -100,7 +100,7 @@ in
useXkbConfig = mkOption { useXkbConfig = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
If set, configure the virtual console keymap from the xserver If set, configure the virtual console keymap from the xserver
keyboard settings. keyboard settings.
''; '';
@ -109,7 +109,7 @@ in
earlySetup = mkOption { earlySetup = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Enable setting virtual console options as early as possible (in initrd). Enable setting virtual console options as early as possible (in initrd).
''; '';
}; };

View File

@ -9,7 +9,7 @@ with lib;
environment.enableDebugInfo = mkOption { environment.enableDebugInfo = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = mdDoc '' description = ''
Some NixOS packages provide debug symbols. However, these are Some NixOS packages provide debug symbols. However, these are
not included in the system closure by default to save disk not included in the system closure by default to save disk
space. Enabling this option causes the debug symbols to appear space. Enabling this option causes the debug symbols to appear

View File

@ -7,7 +7,7 @@ let
in in
{ {
options.services.fanout = { options.services.fanout = {
enable = lib.mkEnableOption (lib.mdDoc "fanout"); enable = lib.mkEnableOption "fanout";
fanoutDevices = lib.mkOption { fanoutDevices = lib.mkOption {
type = lib.types.int; type = lib.types.int;
default = 1; default = 1;

View File

@ -278,7 +278,7 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
If enabled, a Fontconfig configuration file will be built If enabled, a Fontconfig configuration file will be built
pointing to a set of default fonts. If you don't care about pointing to a set of default fonts. If you don't care about
running X11 applications or any other program that uses running X11 applications or any other program that uses
@ -291,7 +291,7 @@ in
internal = true; internal = true;
type = with types; listOf path; type = with types; listOf path;
default = [ ]; default = [ ];
description = lib.mdDoc '' description = ''
Fontconfig configuration packages. Fontconfig configuration packages.
''; '';
}; };
@ -299,7 +299,7 @@ in
antialias = mkOption { antialias = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
Enable font antialiasing. At high resolution (> 200 DPI), Enable font antialiasing. At high resolution (> 200 DPI),
antialiasing has no visible effect; users of such displays may want antialiasing has no visible effect; users of such displays may want
to disable this option. to disable this option.
@ -309,7 +309,7 @@ in
localConf = mkOption { localConf = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
description = lib.mdDoc '' description = ''
System-wide customization file contents, has higher priority than System-wide customization file contents, has higher priority than
`defaultFonts` settings. `defaultFonts` settings.
''; '';
@ -319,7 +319,7 @@ in
monospace = mkOption { monospace = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = ["DejaVu Sans Mono"]; default = ["DejaVu Sans Mono"];
description = lib.mdDoc '' description = ''
System-wide default monospace font(s). Multiple fonts may be System-wide default monospace font(s). Multiple fonts may be
listed in case multiple languages must be supported. listed in case multiple languages must be supported.
''; '';
@ -328,7 +328,7 @@ in
sansSerif = mkOption { sansSerif = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = ["DejaVu Sans"]; default = ["DejaVu Sans"];
description = lib.mdDoc '' description = ''
System-wide default sans serif font(s). Multiple fonts may be System-wide default sans serif font(s). Multiple fonts may be
listed in case multiple languages must be supported. listed in case multiple languages must be supported.
''; '';
@ -337,7 +337,7 @@ in
serif = mkOption { serif = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = ["DejaVu Serif"]; default = ["DejaVu Serif"];
description = lib.mdDoc '' description = ''
System-wide default serif font(s). Multiple fonts may be listed System-wide default serif font(s). Multiple fonts may be listed
in case multiple languages must be supported. in case multiple languages must be supported.
''; '';
@ -346,7 +346,7 @@ in
emoji = mkOption { emoji = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = ["Noto Color Emoji"]; default = ["Noto Color Emoji"];
description = lib.mdDoc '' description = ''
System-wide default emoji font(s). Multiple fonts may be listed System-wide default emoji font(s). Multiple fonts may be listed
in case a font does not support all emoji. in case a font does not support all emoji.
@ -363,7 +363,7 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
Enable font hinting. Hinting aligns glyphs to pixel boundaries to Enable font hinting. Hinting aligns glyphs to pixel boundaries to
improve rendering sharpness at low resolution. At high resolution improve rendering sharpness at low resolution. At high resolution
(> 200 dpi) hinting will do nothing (at best); users of such (> 200 dpi) hinting will do nothing (at best); users of such
@ -374,7 +374,7 @@ in
autohint = mkOption { autohint = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Enable the autohinter in place of the default interpreter. Enable the autohinter in place of the default interpreter.
The results are usually lower quality than correctly-hinted The results are usually lower quality than correctly-hinted
fonts, but better than unhinted fonts. fonts, but better than unhinted fonts.
@ -384,7 +384,7 @@ in
style = mkOption { style = mkOption {
type = types.enum ["none" "slight" "medium" "full"]; type = types.enum ["none" "slight" "medium" "full"];
default = "slight"; default = "slight";
description = lib.mdDoc '' description = ''
Hintstyle is the amount of font reshaping done to line up Hintstyle is the amount of font reshaping done to line up
to the grid. to the grid.
@ -407,7 +407,7 @@ in
includeUserConf = mkOption { includeUserConf = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
Include the user configuration from Include the user configuration from
{file}`~/.config/fontconfig/fonts.conf` or {file}`~/.config/fontconfig/fonts.conf` or
{file}`~/.config/fontconfig/conf.d`. {file}`~/.config/fontconfig/conf.d`.
@ -419,7 +419,7 @@ in
rgba = mkOption { rgba = mkOption {
default = "none"; default = "none";
type = types.enum ["rgb" "bgr" "vrgb" "vbgr" "none"]; type = types.enum ["rgb" "bgr" "vrgb" "vbgr" "none"];
description = lib.mdDoc '' description = ''
Subpixel order. The overwhelming majority of displays are Subpixel order. The overwhelming majority of displays are
`rgb` in their normal orientation. Select `rgb` in their normal orientation. Select
`vrgb` for mounting such a display 90 degrees `vrgb` for mounting such a display 90 degrees
@ -435,7 +435,7 @@ in
lcdfilter = mkOption { lcdfilter = mkOption {
default = "default"; default = "default";
type = types.enum ["none" "default" "light" "legacy"]; type = types.enum ["none" "default" "light" "legacy"];
description = lib.mdDoc '' description = ''
FreeType LCD filter. At high resolution (> 200 DPI), LCD filtering FreeType LCD filter. At high resolution (> 200 DPI), LCD filtering
has no visible effect; users of such displays may want to select has no visible effect; users of such displays may want to select
`none`. `none`.
@ -447,7 +447,7 @@ in
cache32Bit = mkOption { cache32Bit = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Generate system fonts cache for 32-bit applications. Generate system fonts cache for 32-bit applications.
''; '';
}; };
@ -455,7 +455,7 @@ in
allowBitmaps = mkOption { allowBitmaps = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
Allow bitmap fonts. Set to `false` to ban all Allow bitmap fonts. Set to `false` to ban all
bitmap fonts. bitmap fonts.
''; '';
@ -464,7 +464,7 @@ in
allowType1 = mkOption { allowType1 = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Allow Type-1 fonts. Default is `false` because of Allow Type-1 fonts. Default is `false` because of
poor rendering. poor rendering.
''; '';
@ -473,7 +473,7 @@ in
useEmbeddedBitmaps = mkOption { useEmbeddedBitmaps = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc "Use embedded bitmaps in fonts like Calibri."; description = "Use embedded bitmaps in fonts like Calibri.";
}; };
}; };

View File

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

View File

@ -7,7 +7,7 @@ with lib;
fonts.enableGhostscriptFonts = mkOption { fonts.enableGhostscriptFonts = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Whether to add the fonts provided by Ghostscript (such as Whether to add the fonts provided by Ghostscript (such as
various URW fonts and the Base-14 Postscript fonts) to the various URW fonts and the Base-14 Postscript fonts) to the
list of system fonts, making them available to X11 list of system fonts, making them available to X11

View File

@ -16,13 +16,13 @@ in
type = with lib.types; listOf path; type = with lib.types; listOf path;
default = []; default = [];
example = lib.literalExpression "[ pkgs.dejavu_fonts ]"; example = lib.literalExpression "[ pkgs.dejavu_fonts ]";
description = lib.mdDoc "List of primary font packages."; description = "List of primary font packages.";
}; };
enableDefaultPackages = lib.mkOption { enableDefaultPackages = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Enable a basic set of fonts providing several styles Enable a basic set of fonts providing several styles
and families and reasonable coverage of Unicode. and families and reasonable coverage of Unicode.
''; '';

View File

@ -7,7 +7,7 @@ with lib;
type = types.bool; type = types.bool;
default = config.services.xserver.enable; default = config.services.xserver.enable;
defaultText = literalExpression "config.services.xserver.enable"; defaultText = literalExpression "config.services.xserver.enable";
description = lib.mdDoc '' description = ''
Whether to build icon theme caches for GTK applications. Whether to build icon theme caches for GTK applications.
''; '';
}; };

View File

@ -21,7 +21,7 @@ with lib;
} }
''; '';
example = literalExpression "pkgs.glibcLocales"; example = literalExpression "pkgs.glibcLocales";
description = lib.mdDoc '' description = ''
Customized pkg.glibcLocales package. Customized pkg.glibcLocales package.
Changing this option can disable handling of i18n.defaultLocale Changing this option can disable handling of i18n.defaultLocale
@ -33,7 +33,7 @@ with lib;
type = types.str; type = types.str;
default = "en_US.UTF-8"; default = "en_US.UTF-8";
example = "nl_NL.UTF-8"; example = "nl_NL.UTF-8";
description = lib.mdDoc '' description = ''
The default locale. It determines the language for program The default locale. It determines the language for program
messages, the format for dates and times, sort order, and so on. messages, the format for dates and times, sort order, and so on.
It also determines the character set, such as UTF-8. It also determines the character set, such as UTF-8.
@ -44,7 +44,7 @@ with lib;
type = types.attrsOf types.str; type = types.attrsOf types.str;
default = {}; default = {};
example = { LC_MESSAGES = "en_US.UTF-8"; LC_TIME = "de_DE.UTF-8"; }; example = { LC_MESSAGES = "en_US.UTF-8"; LC_TIME = "de_DE.UTF-8"; };
description = lib.mdDoc '' description = ''
A set of additional system-wide locale settings other than A set of additional system-wide locale settings other than
`LANG` which can be configured with `LANG` which can be configured with
{option}`i18n.defaultLocale`. {option}`i18n.defaultLocale`.
@ -72,7 +72,7 @@ with lib;
)) ))
''; '';
example = ["en_US.UTF-8/UTF-8" "nl_NL.UTF-8/UTF-8" "nl_NL/ISO-8859-1"]; example = ["en_US.UTF-8/UTF-8" "nl_NL.UTF-8/UTF-8" "nl_NL/ISO-8859-1"];
description = lib.mdDoc '' description = ''
List of locales that the system should support. The value List of locales that the system should support. The value
`"all"` means that all locales supported by `"all"` means that all locales supported by
Glibc will be installed. A full list of supported locales Glibc will be installed. A full list of supported locales

View File

@ -7,11 +7,11 @@ let
in in
{ {
options.networking.iproute2 = { options.networking.iproute2 = {
enable = mkEnableOption (lib.mdDoc "copying IP route configuration files"); enable = mkEnableOption "copying IP route configuration files";
rttablesExtraConfig = mkOption { rttablesExtraConfig = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
description = lib.mdDoc '' description = ''
Verbatim lines to add to /etc/iproute2/rt_tables Verbatim lines to add to /etc/iproute2/rt_tables
''; '';
}; };

View File

@ -59,36 +59,36 @@ in
users.ldap = { users.ldap = {
enable = mkEnableOption (lib.mdDoc "authentication against an LDAP server"); enable = mkEnableOption "authentication against an LDAP server";
loginPam = mkOption { loginPam = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc "Whether to include authentication against LDAP in login PAM."; description = "Whether to include authentication against LDAP in login PAM.";
}; };
nsswitch = mkOption { nsswitch = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc "Whether to include lookup against LDAP in NSS."; description = "Whether to include lookup against LDAP in NSS.";
}; };
server = mkOption { server = mkOption {
type = types.str; type = types.str;
example = "ldap://ldap.example.org/"; example = "ldap://ldap.example.org/";
description = lib.mdDoc "The URL of the LDAP server."; description = "The URL of the LDAP server.";
}; };
base = mkOption { base = mkOption {
type = types.str; type = types.str;
example = "dc=example,dc=org"; example = "dc=example,dc=org";
description = lib.mdDoc "The distinguished name of the search base."; description = "The distinguished name of the search base.";
}; };
useTLS = mkOption { useTLS = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
If enabled, use TLS (encryption) over an LDAP (port 389) If enabled, use TLS (encryption) over an LDAP (port 389)
connection. The alternative is to specify an LDAPS server (port connection. The alternative is to specify an LDAPS server (port
636) in {option}`users.ldap.server` or to forego 636) in {option}`users.ldap.server` or to forego
@ -99,7 +99,7 @@ in
timeLimit = mkOption { timeLimit = mkOption {
default = 0; default = 0;
type = types.int; type = types.int;
description = lib.mdDoc '' description = ''
Specifies the time limit (in seconds) to use when performing Specifies the time limit (in seconds) to use when performing
searches. A value of zero (0), which is the default, is to searches. A value of zero (0), which is the default, is to
wait indefinitely for searches to be completed. wait indefinitely for searches to be completed.
@ -110,7 +110,7 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Whether to let the nslcd daemon (nss-pam-ldapd) handle the Whether to let the nslcd daemon (nss-pam-ldapd) handle the
LDAP lookups for NSS and PAM. This can improve performance, LDAP lookups for NSS and PAM. This can improve performance,
and if you need to bind to the LDAP server with a password, and if you need to bind to the LDAP server with a password,
@ -125,17 +125,17 @@ in
extraConfig = mkOption { extraConfig = mkOption {
default = ""; default = "";
type = types.lines; type = types.lines;
description = lib.mdDoc '' description = ''
Extra configuration options that will be added verbatim at Extra configuration options that will be added verbatim at
the end of the nslcd configuration file (`nslcd.conf(5)`). the end of the nslcd configuration file (`nslcd.conf(5)`).
'' ; '';
} ; } ;
rootpwmoddn = mkOption { rootpwmoddn = mkOption {
default = ""; default = "";
example = "cn=admin,dc=example,dc=com"; example = "cn=admin,dc=example,dc=com";
type = types.str; type = types.str;
description = lib.mdDoc '' description = ''
The distinguished name to use to bind to the LDAP server The distinguished name to use to bind to the LDAP server
when the root user tries to modify a user's password. when the root user tries to modify a user's password.
''; '';
@ -145,7 +145,7 @@ in
default = ""; default = "";
example = "/run/keys/nslcd.rootpwmodpw"; example = "/run/keys/nslcd.rootpwmodpw";
type = types.str; type = types.str;
description = lib.mdDoc '' description = ''
The path to a file containing the credentials with which to bind to The path to a file containing the credentials with which to bind to
the LDAP server if the root user tries to change a user's password. the LDAP server if the root user tries to change a user's password.
''; '';
@ -157,7 +157,7 @@ in
default = ""; default = "";
example = "cn=admin,dc=example,dc=com"; example = "cn=admin,dc=example,dc=com";
type = types.str; type = types.str;
description = lib.mdDoc '' description = ''
The distinguished name to bind to the LDAP server with. If this The distinguished name to bind to the LDAP server with. If this
is not specified, an anonymous bind will be done. is not specified, an anonymous bind will be done.
''; '';
@ -166,7 +166,7 @@ in
passwordFile = mkOption { passwordFile = mkOption {
default = "/etc/ldap/bind.password"; default = "/etc/ldap/bind.password";
type = types.str; type = types.str;
description = lib.mdDoc '' description = ''
The path to a file containing the credentials to use when binding The path to a file containing the credentials to use when binding
to the LDAP server (if not binding anonymously). to the LDAP server (if not binding anonymously).
''; '';
@ -175,7 +175,7 @@ in
timeLimit = mkOption { timeLimit = mkOption {
default = 30; default = 30;
type = types.int; type = types.int;
description = lib.mdDoc '' description = ''
Specifies the time limit (in seconds) to use when connecting Specifies the time limit (in seconds) to use when connecting
to the directory server. This is distinct from the time limit to the directory server. This is distinct from the time limit
specified in {option}`users.ldap.timeLimit` and affects specified in {option}`users.ldap.timeLimit` and affects
@ -186,7 +186,7 @@ in
policy = mkOption { policy = mkOption {
default = "hard_open"; default = "hard_open";
type = types.enum [ "hard_open" "hard_init" "soft" ]; type = types.enum [ "hard_open" "hard_init" "soft" ];
description = lib.mdDoc '' description = ''
Specifies the policy to use for reconnecting to an unavailable Specifies the policy to use for reconnecting to an unavailable
LDAP server. The default is `hard_open`, which LDAP server. The default is `hard_open`, which
reconnects if opening the connection to the directory server reconnects if opening the connection to the directory server
@ -205,13 +205,13 @@ in
extraConfig = mkOption { extraConfig = mkOption {
default = ""; default = "";
type = types.lines; type = types.lines;
description = lib.mdDoc '' description = ''
Extra configuration options that will be added verbatim at Extra configuration options that will be added verbatim at
the end of the ldap configuration file (`ldap.conf(5)`). the end of the ldap configuration file (`ldap.conf(5)`).
If {option}`users.ldap.daemon` is enabled, this If {option}`users.ldap.daemon` is enabled, this
configuration will not be used. In that case, use configuration will not be used. In that case, use
{option}`users.ldap.daemon.extraConfig` instead. {option}`users.ldap.daemon.extraConfig` instead.
'' ; '';
}; };
}; };

View File

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
inherit (lib) last splitString mkOption types mdDoc optionals; inherit (lib) last splitString mkOption types optionals;
libDir = pkgs.stdenv.hostPlatform.libDir; libDir = pkgs.stdenv.hostPlatform.libDir;
ldsoBasename = builtins.unsafeDiscardStringContext (last (splitString "/" pkgs.stdenv.cc.bintools.dynamicLinker)); ldsoBasename = builtins.unsafeDiscardStringContext (last (splitString "/" pkgs.stdenv.cc.bintools.dynamicLinker));
@ -14,7 +14,7 @@ in {
environment.ldso = mkOption { environment.ldso = mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;
default = null; default = null;
description = mdDoc '' description = ''
The executable to link into the normal FHS location of the ELF loader. The executable to link into the normal FHS location of the ELF loader.
''; '';
}; };
@ -22,7 +22,7 @@ in {
environment.ldso32 = mkOption { environment.ldso32 = mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;
default = null; default = null;
description = mdDoc '' description = ''
The executable to link into the normal FHS location of the 32-bit ELF loader. The executable to link into the normal FHS location of the 32-bit ELF loader.
This currently only works on x86_64 architectures. This currently only works on x86_64 architectures.

View File

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

View File

@ -77,7 +77,7 @@ in
environment.memoryAllocator.provider = mkOption { environment.memoryAllocator.provider = mkOption {
type = types.enum ([ "libc" ] ++ attrNames providers); type = types.enum ([ "libc" ] ++ attrNames providers);
default = "libc"; default = "libc";
description = lib.mdDoc '' description = ''
The system-wide memory allocator. The system-wide memory allocator.
Briefly, the system-wide memory allocator providers are: Briefly, the system-wide memory allocator providers are:

View File

@ -10,41 +10,41 @@ in
options = { options = {
users.mysql = { users.mysql = {
enable = mkEnableOption (lib.mdDoc "authentication against a MySQL/MariaDB database"); enable = mkEnableOption "authentication against a MySQL/MariaDB database";
host = mkOption { host = mkOption {
type = types.str; type = types.str;
example = "localhost"; example = "localhost";
description = lib.mdDoc "The hostname of the MySQL/MariaDB server"; description = "The hostname of the MySQL/MariaDB server";
}; };
database = mkOption { database = mkOption {
type = types.str; type = types.str;
example = "auth"; example = "auth";
description = lib.mdDoc "The name of the database containing the users"; description = "The name of the database containing the users";
}; };
user = mkOption { user = mkOption {
type = types.str; type = types.str;
example = "nss-user"; example = "nss-user";
description = lib.mdDoc "The username to use when connecting to the database"; description = "The username to use when connecting to the database";
}; };
passwordFile = mkOption { passwordFile = mkOption {
type = types.path; type = types.path;
example = "/run/secrets/mysql-auth-db-passwd"; example = "/run/secrets/mysql-auth-db-passwd";
description = lib.mdDoc "The path to the file containing the password for the user"; description = "The path to the file containing the password for the user";
}; };
pam = mkOption { pam = mkOption {
description = lib.mdDoc "Settings for `pam_mysql`"; description = "Settings for `pam_mysql`";
type = types.submodule { type = types.submodule {
options = { options = {
table = mkOption { table = mkOption {
type = types.str; type = types.str;
example = "users"; example = "users";
description = lib.mdDoc "The name of table that maps unique login names to the passwords."; description = "The name of table that maps unique login names to the passwords.";
}; };
updateTable = mkOption { updateTable = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "users_updates"; example = "users_updates";
description = lib.mdDoc '' description = ''
The name of the table used for password alteration. If not defined, the value 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.
''; '';
@ -52,18 +52,18 @@ in
userColumn = mkOption { userColumn = mkOption {
type = types.str; type = types.str;
example = "username"; example = "username";
description = lib.mdDoc "The name of the column that contains a unix login name."; description = "The name of the column that contains a unix login name.";
}; };
passwordColumn = mkOption { passwordColumn = mkOption {
type = types.str; type = types.str;
example = "password"; example = "password";
description = lib.mdDoc "The name of the column that contains a (encrypted) password string."; description = "The name of the column that contains a (encrypted) password string.";
}; };
statusColumn = mkOption { statusColumn = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "status"; example = "status";
description = lib.mdDoc '' description = ''
The name of the column or an SQL expression that indicates the status of 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 the user. The status is expressed by the combination of two bitfields
shown below: shown below:
@ -93,7 +93,7 @@ in
"8" "sha512" "8" "sha512"
"9" "sha256" "9" "sha256"
]; ];
description = lib.mdDoc '' description = ''
The method to encrypt the user's password: The method to encrypt the user's password:
- `0` (or `"plain"`): - `0` (or `"plain"`):
@ -125,18 +125,18 @@ in
type = types.nullOr (types.enum [ "md5" "sha256" "sha512" "blowfish" ]); type = types.nullOr (types.enum [ "md5" "sha256" "sha512" "blowfish" ]);
default = null; default = null;
example = "blowfish"; example = "blowfish";
description = lib.mdDoc "The default encryption method to use for `passwordCrypt = 1`."; description = "The default encryption method to use for `passwordCrypt = 1`.";
}; };
where = mkOption { where = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "host.name='web' AND user.active=1"; example = "host.name='web' AND user.active=1";
description = lib.mdDoc "Additional criteria for the query."; description = "Additional criteria for the query.";
}; };
verbose = mkOption { verbose = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
If enabled, produces logs with detailed messages that describes what 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.
''; '';
@ -144,7 +144,7 @@ in
disconnectEveryOperation = mkOption { disconnectEveryOperation = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
By default, `pam_mysql` keeps the connection to the MySQL By default, `pam_mysql` keeps the connection to the MySQL
database until the session is closed. If this option is set to true it 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 disconnects every time the PAM operation has finished. This option may
@ -155,17 +155,17 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc "Enables logging of authentication attempts in the MySQL database."; description = "Enables logging of authentication attempts in the MySQL database.";
}; };
table = mkOption { table = mkOption {
type = types.str; type = types.str;
example = "logs"; example = "logs";
description = lib.mdDoc "The name of the table to which logs are written."; description = "The name of the table to which logs are written.";
}; };
msgColumn = mkOption { msgColumn = mkOption {
type = types.str; type = types.str;
example = "msg"; example = "msg";
description = lib.mdDoc '' description = ''
The name of the column in the log table to which the description The name of the column in the log table to which the description
of the performed operation is stored. of the performed operation is stored.
''; '';
@ -173,7 +173,7 @@ in
userColumn = mkOption { userColumn = mkOption {
type = types.str; type = types.str;
example = "user"; example = "user";
description = lib.mdDoc '' description = ''
The name of the column in the log table to which the name of the The name of the column in the log table to which the name of the
user being authenticated is stored. user being authenticated is stored.
''; '';
@ -181,7 +181,7 @@ in
pidColumn = mkOption { pidColumn = mkOption {
type = types.str; type = types.str;
example = "pid"; example = "pid";
description = lib.mdDoc '' description = ''
The name of the column in the log table to which the pid of the The name of the column in the log table to which the pid of the
process utilising the `pam_mysql` authentication process utilising the `pam_mysql` authentication
service is stored. service is stored.
@ -190,7 +190,7 @@ in
hostColumn = mkOption { hostColumn = mkOption {
type = types.str; type = types.str;
example = "host"; example = "host";
description = lib.mdDoc '' description = ''
The name of the column in the log table to which the name of the user The name of the column in the log table to which the name of the user
being authenticated is stored. being authenticated is stored.
''; '';
@ -198,7 +198,7 @@ in
rHostColumn = mkOption { rHostColumn = mkOption {
type = types.str; type = types.str;
example = "rhost"; example = "rhost";
description = lib.mdDoc '' description = ''
The name of the column in the log table to which the name of the remote 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 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)`.
@ -207,7 +207,7 @@ in
timeColumn = mkOption { timeColumn = mkOption {
type = types.str; type = types.str;
example = "timestamp"; example = "timestamp";
description = lib.mdDoc '' description = ''
The name of the column in the log table to which the timestamp of the The name of the column in the log table to which the timestamp of the
log entry is stored. log entry is stored.
''; '';
@ -217,7 +217,7 @@ in
}; };
}; };
nss = mkOption { nss = mkOption {
description = lib.mdDoc '' description = ''
Settings for `libnss-mysql`. Settings for `libnss-mysql`.
All examples are from the [minimal example](https://github.com/saknopper/libnss-mysql/tree/master/sample/minimal) All examples are from the [minimal example](https://github.com/saknopper/libnss-mysql/tree/master/sample/minimal)
@ -234,7 +234,7 @@ in
WHERE username='%1$s' \ WHERE username='%1$s' \
LIMIT 1 LIMIT 1
''; '';
description = lib.mdDoc '' description = ''
SQL query for the [getpwnam](https://man7.org/linux/man-pages/man3/getpwnam.3.html) SQL query for the [getpwnam](https://man7.org/linux/man-pages/man3/getpwnam.3.html)
syscall. syscall.
''; '';
@ -248,7 +248,7 @@ in
WHERE uid='%1$u' \ WHERE uid='%1$u' \
LIMIT 1 LIMIT 1
''; '';
description = lib.mdDoc '' description = ''
SQL query for the [getpwuid](https://man7.org/linux/man-pages/man3/getpwuid.3.html) SQL query for the [getpwuid](https://man7.org/linux/man-pages/man3/getpwuid.3.html)
syscall. syscall.
''; '';
@ -262,7 +262,7 @@ in
WHERE username='%1$s' \ WHERE username='%1$s' \
LIMIT 1 LIMIT 1
''; '';
description = lib.mdDoc '' description = ''
SQL query for the [getspnam](https://man7.org/linux/man-pages/man3/getspnam.3.html) SQL query for the [getspnam](https://man7.org/linux/man-pages/man3/getspnam.3.html)
syscall. syscall.
''; '';
@ -273,7 +273,7 @@ in
example = literalExpression '' example = literalExpression ''
SELECT username,'x',uid,'5000','MySQL User', CONCAT('/home/',username),'/run/sw/current-system/bin/bash' FROM users SELECT username,'x',uid,'5000','MySQL User', CONCAT('/home/',username),'/run/sw/current-system/bin/bash' FROM users
''; '';
description = lib.mdDoc '' description = ''
SQL query for the [getpwent](https://man7.org/linux/man-pages/man3/getpwent.3.html) SQL query for the [getpwent](https://man7.org/linux/man-pages/man3/getpwent.3.html)
syscall. syscall.
''; '';
@ -284,7 +284,7 @@ in
example = literalExpression '' example = literalExpression ''
SELECT username,password,'1','0','99999','0','0','-1','0' FROM users SELECT username,password,'1','0','99999','0','0','-1','0' FROM users
''; '';
description = lib.mdDoc '' description = ''
SQL query for the [getspent](https://man7.org/linux/man-pages/man3/getspent.3.html) SQL query for the [getspent](https://man7.org/linux/man-pages/man3/getspent.3.html)
syscall. syscall.
''; '';
@ -295,7 +295,7 @@ in
example = literalExpression '' example = literalExpression ''
SELECT name,password,gid FROM groups WHERE name='%1$s' LIMIT 1 SELECT name,password,gid FROM groups WHERE name='%1$s' LIMIT 1
''; '';
description = lib.mdDoc '' description = ''
SQL query for the [getgrnam](https://man7.org/linux/man-pages/man3/getgrnam.3.html) SQL query for the [getgrnam](https://man7.org/linux/man-pages/man3/getgrnam.3.html)
syscall. syscall.
''; '';
@ -306,7 +306,7 @@ in
example = literalExpression '' example = literalExpression ''
SELECT name,password,gid FROM groups WHERE gid='%1$u' LIMIT 1 SELECT name,password,gid FROM groups WHERE gid='%1$u' LIMIT 1
''; '';
description = lib.mdDoc '' description = ''
SQL query for the [getgrgid](https://man7.org/linux/man-pages/man3/getgrgid.3.html) SQL query for the [getgrgid](https://man7.org/linux/man-pages/man3/getgrgid.3.html)
syscall. syscall.
''; '';
@ -317,7 +317,7 @@ in
example = literalExpression '' example = literalExpression ''
SELECT name,password,gid FROM groups SELECT name,password,gid FROM groups
''; '';
description = lib.mdDoc '' description = ''
SQL query for the [getgrent](https://man7.org/linux/man-pages/man3/getgrent.3.html) SQL query for the [getgrent](https://man7.org/linux/man-pages/man3/getgrent.3.html)
syscall. syscall.
''; '';
@ -328,7 +328,7 @@ in
example = literalExpression '' example = literalExpression ''
SELECT username FROM grouplist WHERE gid='%1$u' SELECT username FROM grouplist WHERE gid='%1$u'
''; '';
description = lib.mdDoc '' description = ''
SQL query for the [memsbygid](https://man7.org/linux/man-pages/man3/memsbygid.3.html) SQL query for the [memsbygid](https://man7.org/linux/man-pages/man3/memsbygid.3.html)
syscall. syscall.
''; '';
@ -339,7 +339,7 @@ in
example = literalExpression '' example = literalExpression ''
SELECT gid FROM grouplist WHERE username='%1$s' SELECT gid FROM grouplist WHERE username='%1$s'
''; '';
description = lib.mdDoc '' description = ''
SQL query for the [gidsbymem](https://man7.org/linux/man-pages/man3/gidsbymem.3.html) SQL query for the [gidsbymem](https://man7.org/linux/man-pages/man3/gidsbymem.3.html)
syscall. syscall.
''; '';

View File

@ -28,7 +28,7 @@ in
"192.168.0.2" = [ "fileserver.local" "nameserver.local" ]; "192.168.0.2" = [ "fileserver.local" "nameserver.local" ];
}; };
''; '';
description = lib.mdDoc '' description = ''
Locally defined maps of hostnames to IP addresses. Locally defined maps of hostnames to IP addresses.
''; '';
}; };
@ -37,7 +37,7 @@ in
type = types.listOf types.path; type = types.listOf types.path;
defaultText = literalMD "Hosts from {option}`networking.hosts` and {option}`networking.extraHosts`"; defaultText = literalMD "Hosts from {option}`networking.hosts` and {option}`networking.extraHosts`";
example = literalExpression ''[ "''${pkgs.my-blocklist-package}/share/my-blocklist/hosts" ]''; example = literalExpression ''[ "''${pkgs.my-blocklist-package}/share/my-blocklist/hosts" ]'';
description = lib.mdDoc '' description = ''
Files that should be concatenated together to form {file}`/etc/hosts`. Files that should be concatenated together to form {file}`/etc/hosts`.
''; '';
}; };
@ -46,7 +46,7 @@ in
type = types.lines; type = types.lines;
default = ""; default = "";
example = "192.168.0.1 lanlocalhost"; example = "192.168.0.1 lanlocalhost";
description = lib.mdDoc '' description = ''
Additional verbatim entries to be appended to {file}`/etc/hosts`. Additional verbatim entries to be appended to {file}`/etc/hosts`.
For adding hosts from derivation results, use {option}`networking.hostFiles` instead. For adding hosts from derivation results, use {option}`networking.hostFiles` instead.
''; '';
@ -60,7 +60,7 @@ in
"3.nixos.pool.ntp.org" "3.nixos.pool.ntp.org"
]; ];
type = types.listOf types.str; type = types.listOf types.str;
description = lib.mdDoc '' description = ''
The set of NTP servers from which to synchronise. The set of NTP servers from which to synchronise.
''; '';
}; };
@ -70,7 +70,7 @@ in
default = lib.mkOption { default = lib.mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
description = lib.mdDoc '' description = ''
This option specifies the default value for httpProxy, httpsProxy, ftpProxy and rsyncProxy. This option specifies the default value for httpProxy, httpsProxy, ftpProxy and rsyncProxy.
''; '';
example = "http://127.0.0.1:3128"; example = "http://127.0.0.1:3128";
@ -80,7 +80,7 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = cfg.proxy.default; default = cfg.proxy.default;
defaultText = literalExpression "config.${opt.proxy.default}"; defaultText = literalExpression "config.${opt.proxy.default}";
description = lib.mdDoc '' description = ''
This option specifies the http_proxy environment variable. This option specifies the http_proxy environment variable.
''; '';
example = "http://127.0.0.1:3128"; example = "http://127.0.0.1:3128";
@ -90,7 +90,7 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = cfg.proxy.default; default = cfg.proxy.default;
defaultText = literalExpression "config.${opt.proxy.default}"; defaultText = literalExpression "config.${opt.proxy.default}";
description = lib.mdDoc '' description = ''
This option specifies the https_proxy environment variable. This option specifies the https_proxy environment variable.
''; '';
example = "http://127.0.0.1:3128"; example = "http://127.0.0.1:3128";
@ -100,7 +100,7 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = cfg.proxy.default; default = cfg.proxy.default;
defaultText = literalExpression "config.${opt.proxy.default}"; defaultText = literalExpression "config.${opt.proxy.default}";
description = lib.mdDoc '' description = ''
This option specifies the ftp_proxy environment variable. This option specifies the ftp_proxy environment variable.
''; '';
example = "http://127.0.0.1:3128"; example = "http://127.0.0.1:3128";
@ -110,7 +110,7 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = cfg.proxy.default; default = cfg.proxy.default;
defaultText = literalExpression "config.${opt.proxy.default}"; defaultText = literalExpression "config.${opt.proxy.default}";
description = lib.mdDoc '' description = ''
This option specifies the rsync_proxy environment variable. This option specifies the rsync_proxy environment variable.
''; '';
example = "http://127.0.0.1:3128"; example = "http://127.0.0.1:3128";
@ -120,7 +120,7 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = cfg.proxy.default; default = cfg.proxy.default;
defaultText = literalExpression "config.${opt.proxy.default}"; defaultText = literalExpression "config.${opt.proxy.default}";
description = lib.mdDoc '' description = ''
This option specifies the all_proxy environment variable. This option specifies the all_proxy environment variable.
''; '';
example = "http://127.0.0.1:3128"; example = "http://127.0.0.1:3128";
@ -129,7 +129,7 @@ in
noProxy = lib.mkOption { noProxy = lib.mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
description = lib.mdDoc '' description = ''
This option specifies the no_proxy environment variable. This option specifies the no_proxy environment variable.
If a default proxy is used and noProxy is null, If a default proxy is used and noProxy is null,
then noProxy will be set to 127.0.0.1,localhost. then noProxy will be set to 127.0.0.1,localhost.
@ -141,7 +141,7 @@ in
type = types.attrs; type = types.attrs;
internal = true; internal = true;
default = {}; default = {};
description = lib.mdDoc '' description = ''
Environment variables used for the network proxy. Environment variables used for the network proxy.
''; '';
}; };

View File

@ -23,7 +23,7 @@ in
nix = { nix = {
channel = { channel = {
enable = mkOption { enable = mkOption {
description = lib.mdDoc '' description = ''
Whether the `nix-channel` command and state files are made available on the machine. Whether the `nix-channel` command and state files are made available on the machine.
The following files are initialized when enabled: The following files are initialized when enabled:
@ -57,7 +57,7 @@ in
] ]
else []; else [];
''; '';
description = lib.mdDoc '' description = ''
The default Nix expression search path, used by the Nix The default Nix expression search path, used by the Nix
evaluator to look up paths enclosed in angle brackets evaluator to look up paths enclosed in angle brackets
(e.g. `<nixpkgs>`). (e.g. `<nixpkgs>`).
@ -70,7 +70,7 @@ in
internal = true; internal = true;
type = types.str; type = types.str;
default = "https://nixos.org/channels/nixos-unstable"; default = "https://nixos.org/channels/nixos-unstable";
description = lib.mdDoc "Default NixOS channel to which the root user is subscribed."; description = "Default NixOS channel to which the root user is subscribed.";
}; };
}; };
}; };

View File

@ -40,25 +40,25 @@ in
from = mkOption { from = mkOption {
type = referenceAttrs; type = referenceAttrs;
example = { type = "indirect"; id = "nixpkgs"; }; example = { type = "indirect"; id = "nixpkgs"; };
description = lib.mdDoc "The flake reference to be rewritten."; description = "The flake reference to be rewritten.";
}; };
to = mkOption { to = mkOption {
type = referenceAttrs; type = referenceAttrs;
example = { type = "github"; owner = "my-org"; repo = "my-nixpkgs"; }; example = { type = "github"; owner = "my-org"; repo = "my-nixpkgs"; };
description = lib.mdDoc "The flake reference {option}`from` is rewritten to."; description = "The flake reference {option}`from` is rewritten to.";
}; };
flake = mkOption { flake = mkOption {
type = types.nullOr types.attrs; type = types.nullOr types.attrs;
default = null; default = null;
example = literalExpression "nixpkgs"; example = literalExpression "nixpkgs";
description = lib.mdDoc '' description = ''
The flake input {option}`from` is rewritten to. The flake input {option}`from` is rewritten to.
''; '';
}; };
exact = mkOption { exact = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
Whether the {option}`from` reference needs to match exactly. If set, Whether the {option}`from` reference needs to match exactly. If set,
a {option}`from` reference like `nixpkgs` does not a {option}`from` reference like `nixpkgs` does not
match with a reference like `nixpkgs/nixos-20.03`. match with a reference like `nixpkgs/nixos-20.03`.
@ -79,7 +79,7 @@ in
} }
)); ));
default = { }; default = { };
description = lib.mdDoc '' description = ''
A system-wide flake registry. A system-wide flake registry.
''; '';
}; };

View File

@ -58,7 +58,7 @@ in
hostName = mkOption { hostName = mkOption {
type = types.str; type = types.str;
example = "nixbuilder.example.org"; example = "nixbuilder.example.org";
description = lib.mdDoc '' description = ''
The hostname of the build machine. The hostname of the build machine.
''; '';
}; };
@ -66,7 +66,7 @@ in
type = types.enum [ null "ssh" "ssh-ng" ]; type = types.enum [ null "ssh" "ssh-ng" ];
default = "ssh"; default = "ssh";
example = "ssh-ng"; example = "ssh-ng";
description = lib.mdDoc '' description = ''
The protocol used for communicating with the build machine. The protocol used for communicating with the build machine.
Use `ssh-ng` if your remote builder and your Use `ssh-ng` if your remote builder and your
local Nix version support that improved protocol. local Nix version support that improved protocol.
@ -79,7 +79,7 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "x86_64-linux"; example = "x86_64-linux";
description = lib.mdDoc '' description = ''
The system type the build machine can execute derivations on. The system type the build machine can execute derivations on.
Either this attribute or {var}`systems` must be Either this attribute or {var}`systems` must be
present, where {var}`system` takes precedence if present, where {var}`system` takes precedence if
@ -90,7 +90,7 @@ in
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ ];
example = [ "x86_64-linux" "aarch64-linux" ]; example = [ "x86_64-linux" "aarch64-linux" ];
description = lib.mdDoc '' description = ''
The system types the build machine can execute derivations on. The system types the build machine can execute derivations on.
Either this attribute or {var}`system` must be Either this attribute or {var}`system` must be
present, where {var}`system` takes precedence if present, where {var}`system` takes precedence if
@ -101,7 +101,7 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "builder"; example = "builder";
description = lib.mdDoc '' description = ''
The username to log in as on the remote host. This user must be The username to log in as on the remote host. This user must be
able to log in and run nix commands non-interactively. It must able to log in and run nix commands non-interactively. It must
also be privileged to build derivations, so must be included in also be privileged to build derivations, so must be included in
@ -112,7 +112,7 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "/root/.ssh/id_buildhost_builduser"; example = "/root/.ssh/id_buildhost_builduser";
description = lib.mdDoc '' description = ''
The path to the SSH private key with which to authenticate on The path to the SSH private key with which to authenticate on
the build machine. The private key must not have a passphrase. the build machine. The private key must not have a passphrase.
If null, the building user (root on NixOS machines) must have an If null, the building user (root on NixOS machines) must have an
@ -125,7 +125,7 @@ in
maxJobs = mkOption { maxJobs = mkOption {
type = types.int; type = types.int;
default = 1; default = 1;
description = lib.mdDoc '' description = ''
The number of concurrent jobs the build machine supports. The The number of concurrent jobs the build machine supports. The
build machine will enforce its own limits, but this allows hydra build machine will enforce its own limits, but this allows hydra
to schedule better since there is no work-stealing between build to schedule better since there is no work-stealing between build
@ -135,7 +135,7 @@ in
speedFactor = mkOption { speedFactor = mkOption {
type = types.int; type = types.int;
default = 1; default = 1;
description = lib.mdDoc '' description = ''
The relative speed of this builder. This is an arbitrary integer The relative speed of this builder. This is an arbitrary integer
that indicates the speed of this builder, relative to other that indicates the speed of this builder, relative to other
builders. Higher is faster. builders. Higher is faster.
@ -145,7 +145,7 @@ in
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ ];
example = [ "big-parallel" ]; example = [ "big-parallel" ];
description = lib.mdDoc '' description = ''
A list of features mandatory for this builder. The builder will A list of features mandatory for this builder. The builder will
be ignored for derivations that don't require all features in be ignored for derivations that don't require all features in
this list. All mandatory features are automatically included in this list. All mandatory features are automatically included in
@ -156,7 +156,7 @@ in
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ ];
example = [ "kvm" "big-parallel" ]; example = [ "kvm" "big-parallel" ];
description = lib.mdDoc '' description = ''
A list of features supported by this builder. The builder will A list of features supported by this builder. The builder will
be ignored for derivations that require features not in this be ignored for derivations that require features not in this
list. list.
@ -165,7 +165,7 @@ in
publicHostKey = mkOption { publicHostKey = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
description = lib.mdDoc '' description = ''
The (base64-encoded) public host key of this builder. The field The (base64-encoded) public host key of this builder. The field
is calculated via {command}`base64 -w0 /etc/ssh/ssh_host_type_key.pub`. is calculated via {command}`base64 -w0 /etc/ssh/ssh_host_type_key.pub`.
If null, SSH will use its regular known-hosts file when connecting. If null, SSH will use its regular known-hosts file when connecting.
@ -174,7 +174,7 @@ in
}; };
}); });
default = [ ]; default = [ ];
description = lib.mdDoc '' description = ''
This option lists the machines to be used if distributed builds are This option lists the machines to be used if distributed builds are
enabled (see {option}`nix.distributedBuilds`). enabled (see {option}`nix.distributedBuilds`).
Nix will perform derivations on those machines via SSH by copying the Nix will perform derivations on those machines via SSH by copying the
@ -186,7 +186,7 @@ in
distributedBuilds = mkOption { distributedBuilds = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Whether to distribute builds to the machines listed in Whether to distribute builds to the machines listed in
{option}`nix.buildMachines`. {option}`nix.buildMachines`.
''; '';

View File

@ -154,7 +154,7 @@ in
checkConfig = mkOption { checkConfig = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
If enabled, checks that Nix can parse the generated nix.conf. If enabled, checks that Nix can parse the generated nix.conf.
''; '';
}; };
@ -162,7 +162,7 @@ in
checkAllErrors = mkOption { checkAllErrors = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
If enabled, checks the nix.conf parsing for any kind of error. When disabled, checks only for unknown settings. If enabled, checks the nix.conf parsing for any kind of error. When disabled, checks only for unknown settings.
''; '';
}; };
@ -174,7 +174,7 @@ in
keep-outputs = true keep-outputs = true
keep-derivations = true keep-derivations = true
''; '';
description = lib.mdDoc "Additional text appended to {file}`nix.conf`."; description = "Additional text appended to {file}`nix.conf`.";
}; };
settings = mkOption { settings = mkOption {
@ -186,7 +186,7 @@ in
type = types.either types.int (types.enum [ "auto" ]); type = types.either types.int (types.enum [ "auto" ]);
default = "auto"; default = "auto";
example = 64; example = 64;
description = lib.mdDoc '' description = ''
This option defines the maximum number of jobs that Nix will try to This option defines the maximum number of jobs that Nix will try to
build in parallel. The default is auto, which means it will use all build in parallel. The default is auto, which means it will use all
available logical cores. It is recommend to set it to the total available logical cores. It is recommend to set it to the total
@ -199,7 +199,7 @@ in
type = types.bool; type = types.bool;
default = false; default = false;
example = true; example = true;
description = lib.mdDoc '' description = ''
If set to true, Nix automatically detects files in the store that have If set to true, Nix automatically detects files in the store that have
identical contents, and replaces them with hard links to a single copy. identical contents, and replaces them with hard links to a single copy.
This saves disk space. If set to false (the default), you can still run This saves disk space. If set to false (the default), you can still run
@ -211,7 +211,7 @@ in
type = types.int; type = types.int;
default = 0; default = 0;
example = 64; example = 64;
description = lib.mdDoc '' description = ''
This option defines the maximum number of concurrent tasks during This option defines the maximum number of concurrent tasks during
one build. It affects, e.g., -j option for make. one build. It affects, e.g., -j option for make.
The special value 0 means that the builder should use all The special value 0 means that the builder should use all
@ -224,7 +224,7 @@ in
sandbox = mkOption { sandbox = mkOption {
type = types.either types.bool (types.enum [ "relaxed" ]); type = types.either types.bool (types.enum [ "relaxed" ]);
default = true; default = true;
description = lib.mdDoc '' description = ''
If set, Nix will perform builds in a sandboxed environment that it If set, Nix will perform builds in a sandboxed environment that it
will set up automatically for each build. This prevents impurities will set up automatically for each build. This prevents impurities
in builds by disallowing access to dependencies outside of the Nix in builds by disallowing access to dependencies outside of the Nix
@ -247,7 +247,7 @@ in
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ ];
example = [ "/dev" "/proc" ]; example = [ "/dev" "/proc" ];
description = lib.mdDoc '' description = ''
Directories from the host filesystem to be included Directories from the host filesystem to be included
in the sandbox. in the sandbox.
''; '';
@ -255,7 +255,7 @@ in
substituters = mkOption { substituters = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
description = lib.mdDoc '' description = ''
List of binary cache URLs used to obtain pre-built binaries List of binary cache URLs used to obtain pre-built binaries
of Nix packages. of Nix packages.
@ -267,7 +267,7 @@ in
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ ];
example = [ "https://hydra.nixos.org/" ]; example = [ "https://hydra.nixos.org/" ];
description = lib.mdDoc '' description = ''
List of binary cache URLs that non-root users can use (in List of binary cache URLs that non-root users can use (in
addition to those specified using addition to those specified using
{option}`nix.settings.substituters`) by passing {option}`nix.settings.substituters`) by passing
@ -278,7 +278,7 @@ in
require-sigs = mkOption { require-sigs = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
If enabled (the default), Nix will only download binaries from binary caches if If enabled (the default), Nix will only download binaries from binary caches if
they are cryptographically signed with any of the keys listed in they are cryptographically signed with any of the keys listed in
{option}`nix.settings.trusted-public-keys`. If disabled, signatures are neither {option}`nix.settings.trusted-public-keys`. If disabled, signatures are neither
@ -290,7 +290,7 @@ in
trusted-public-keys = mkOption { trusted-public-keys = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
example = [ "hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs=" ]; example = [ "hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs=" ];
description = lib.mdDoc '' description = ''
List of public keys used to sign binary caches. If List of public keys used to sign binary caches. If
{option}`nix.settings.trusted-public-keys` is enabled, {option}`nix.settings.trusted-public-keys` is enabled,
then Nix will use a binary from a binary cache if and only then Nix will use a binary from a binary cache if and only
@ -304,7 +304,7 @@ in
type = types.listOf types.str; type = types.listOf types.str;
default = [ "root" ]; default = [ "root" ];
example = [ "root" "alice" "@wheel" ]; example = [ "root" "alice" "@wheel" ];
description = lib.mdDoc '' description = ''
A list of names of users that have additional rights when A list of names of users that have additional rights when
connecting to the Nix daemon, such as the ability to specify connecting to the Nix daemon, such as the ability to specify
additional binary caches, or to import unsigned NARs. You additional binary caches, or to import unsigned NARs. You
@ -318,7 +318,7 @@ in
system-features = mkOption { system-features = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
example = [ "kvm" "big-parallel" "gccarch-skylake" ]; example = [ "kvm" "big-parallel" "gccarch-skylake" ];
description = lib.mdDoc '' description = ''
The set of features supported by the machine. Derivations The set of features supported by the machine. Derivations
can express dependencies on system features through the can express dependencies on system features through the
`requiredSystemFeatures` attribute. `requiredSystemFeatures` attribute.
@ -333,7 +333,7 @@ in
type = types.listOf types.str; type = types.listOf types.str;
default = [ "*" ]; default = [ "*" ];
example = [ "@wheel" "@builders" "alice" "bob" ]; example = [ "@wheel" "@builders" "alice" "bob" ];
description = lib.mdDoc '' description = ''
A list of names of users (separated by whitespace) that are A list of names of users (separated by whitespace) that are
allowed to connect to the Nix daemon. As with allowed to connect to the Nix daemon. As with
{option}`nix.settings.trusted-users`, you can specify groups by {option}`nix.settings.trusted-users`, you can specify groups by
@ -355,7 +355,7 @@ in
sandbox-paths = [ "/bin/sh=''${pkgs.busybox-sandbox-shell.out}/bin/busybox" ]; sandbox-paths = [ "/bin/sh=''${pkgs.busybox-sandbox-shell.out}/bin/busybox" ];
} }
''; '';
description = lib.mdDoc '' description = ''
Configuration for Nix, see Configuration for Nix, see
<https://nixos.org/manual/nix/stable/command-ref/conf-file.html> or <https://nixos.org/manual/nix/stable/command-ref/conf-file.html> or
{manpage}`nix.conf(5)` for available options. {manpage}`nix.conf(5)` for available options.

View File

@ -10,7 +10,7 @@ with lib;
environment.noXlibs = mkOption { environment.noXlibs = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Switch off the options in the default configuration that Switch off the options in the default configuration that
require X11 libraries. This includes client-side font require X11 libraries. This includes client-side font
configuration and SSH forwarding of X11 authentication configuration and SSH forwarding of X11 authentication

View File

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

View File

@ -19,8 +19,7 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = description = ''
lib.mdDoc ''
Whether to enable power management. This includes support Whether to enable power management. This includes support
for suspend-to-RAM and powersave features on laptops. for suspend-to-RAM and powersave features on laptops.
''; '';
@ -29,7 +28,7 @@ in
resumeCommands = mkOption { resumeCommands = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
description = lib.mdDoc "Commands executed after the system resumes from suspend-to-RAM."; description = "Commands executed after the system resumes from suspend-to-RAM.";
}; };
powerUpCommands = mkOption { powerUpCommands = mkOption {
@ -38,8 +37,7 @@ in
example = literalExpression '' example = literalExpression ''
"''${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda" "''${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda"
''; '';
description = description = ''
lib.mdDoc ''
Commands executed when the machine powers up. That is, Commands executed when the machine powers up. That is,
they're executed both when the system first boots and when they're executed both when the system first boots and when
it resumes from suspend or hibernation. it resumes from suspend or hibernation.
@ -52,8 +50,7 @@ in
example = literalExpression '' example = literalExpression ''
"''${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda" "''${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda"
''; '';
description = description = ''
lib.mdDoc ''
Commands executed when the machine powers down. That is, Commands executed when the machine powers down. That is,
they're executed both when the system shuts down and when they're executed both when the system shuts down and when
it goes to suspend or hibernation. it goes to suspend or hibernation.

View File

@ -87,7 +87,7 @@ in {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Whether to enable the PulseAudio sound server. Whether to enable the PulseAudio sound server.
''; '';
}; };
@ -95,7 +95,7 @@ in {
systemWide = mkOption { systemWide = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
If false, a PulseAudio server is launched automatically for If false, a PulseAudio server is launched automatically for
each user that tries to use the sound system. The server runs each user that tries to use the sound system. The server runs
with user privileges. If true, one system-wide PulseAudio with user privileges. If true, one system-wide PulseAudio
@ -110,7 +110,7 @@ in {
support32Bit = mkOption { support32Bit = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Whether to include the 32-bit pulseaudio libraries in the system or not. Whether to include the 32-bit pulseaudio libraries in the system or not.
This is only useful on 64-bit systems and currently limited to x86_64-linux. This is only useful on 64-bit systems and currently limited to x86_64-linux.
''; '';
@ -118,7 +118,7 @@ in {
configFile = mkOption { configFile = mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;
description = lib.mdDoc '' description = ''
The path to the default configuration options the PulseAudio server The path to the default configuration options the PulseAudio server
should use. By default, the "default.pa" configuration should use. By default, the "default.pa" configuration
from the PulseAudio distribution is used. from the PulseAudio distribution is used.
@ -128,7 +128,7 @@ in {
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
description = lib.mdDoc '' description = ''
Literal string to append to `configFile` Literal string to append to `configFile`
and the config file generated by the pulseaudio module. and the config file generated by the pulseaudio module.
''; '';
@ -137,7 +137,7 @@ in {
extraClientConf = mkOption { extraClientConf = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
description = lib.mdDoc '' description = ''
Extra configuration appended to pulse/client.conf file. Extra configuration appended to pulse/client.conf file.
''; '';
}; };
@ -149,7 +149,7 @@ in {
else pkgs.pulseaudio; else pkgs.pulseaudio;
defaultText = literalExpression "pkgs.pulseaudio"; defaultText = literalExpression "pkgs.pulseaudio";
example = literalExpression "pkgs.pulseaudioFull"; example = literalExpression "pkgs.pulseaudioFull";
description = lib.mdDoc '' description = ''
The PulseAudio derivation to use. This can be used to enable The PulseAudio derivation to use. This can be used to enable
features (such as JACK support, Bluetooth) via the features (such as JACK support, Bluetooth) via the
`pulseaudioFull` package. `pulseaudioFull` package.
@ -160,7 +160,7 @@ in {
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = [];
example = literalExpression "[ pkgs.pulseaudio-modules-bt ]"; example = literalExpression "[ pkgs.pulseaudio-modules-bt ]";
description = lib.mdDoc '' description = ''
Extra pulseaudio modules to use. This is intended for out-of-tree Extra pulseaudio modules to use. This is intended for out-of-tree
pulseaudio modules like extra bluetooth codecs. pulseaudio modules like extra bluetooth codecs.
@ -172,7 +172,7 @@ in {
logLevel = mkOption { logLevel = mkOption {
type = types.str; type = types.str;
default = "notice"; default = "notice";
description = lib.mdDoc '' description = ''
The log level that the system-wide pulseaudio daemon should use, The log level that the system-wide pulseaudio daemon should use,
if activated. if activated.
''; '';
@ -181,29 +181,29 @@ in {
config = mkOption { config = mkOption {
type = types.attrsOf types.unspecified; type = types.attrsOf types.unspecified;
default = {}; default = {};
description = lib.mdDoc "Config of the pulse daemon. See `man pulse-daemon.conf`."; description = "Config of the pulse daemon. See `man pulse-daemon.conf`.";
example = literalExpression ''{ realtime-scheduling = "yes"; }''; example = literalExpression ''{ realtime-scheduling = "yes"; }'';
}; };
}; };
zeroconf = { zeroconf = {
discovery.enable = discovery.enable =
mkEnableOption (lib.mdDoc "discovery of pulseaudio sinks in the local network"); mkEnableOption "discovery of pulseaudio sinks in the local network";
publish.enable = publish.enable =
mkEnableOption (lib.mdDoc "publishing the pulseaudio sink in the local network"); mkEnableOption "publishing the pulseaudio sink in the local network";
}; };
# TODO: enable by default? # TODO: enable by default?
tcp = { tcp = {
enable = mkEnableOption (lib.mdDoc "tcp streaming support"); enable = mkEnableOption "tcp streaming support";
anonymousClients = { anonymousClients = {
allowAll = mkEnableOption (lib.mdDoc "all anonymous clients to stream to the server"); allowAll = mkEnableOption "all anonymous clients to stream to the server";
allowedIpRanges = mkOption { allowedIpRanges = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = []; default = [];
example = literalExpression ''[ "127.0.0.1" "192.168.1.0/24" ]''; example = literalExpression ''[ "127.0.0.1" "192.168.1.0/24" ]'';
description = lib.mdDoc '' description = ''
A list of IP subnets that are allowed to stream to the server. A list of IP subnets that are allowed to stream to the server.
''; '';
}; };

View File

@ -42,7 +42,7 @@ in
options = { options = {
qt = { qt = {
enable = lib.mkEnableOption "" // { enable = lib.mkEnableOption "" // {
description = lib.mdDoc '' description = ''
Whether to enable Qt configuration, including theming. Whether to enable Qt configuration, including theming.
Enabling this option is necessary for Qt plugins to work in the Enabling this option is necessary for Qt plugins to work in the
@ -66,7 +66,7 @@ in
[ "qt6Packages" "qt6ct" ] [ "qt6Packages" "qt6ct" ]
[ "qt6Packages" "qt6gtk2" ] [ "qt6Packages" "qt6gtk2" ]
]; ];
description = lib.mdDoc '' description = ''
Selects the platform theme to use for Qt applications. Selects the platform theme to use for Qt applications.
The options are The options are
@ -93,7 +93,7 @@ in
[ "qt6Packages" "qt6gtk2" ] [ "qt6Packages" "qt6gtk2" ]
[ "qt6Packages" "qtstyleplugin-kvantum" ] [ "qt6Packages" "qtstyleplugin-kvantum" ]
]; ];
description = lib.mdDoc '' description = ''
Selects the style to use for Qt applications. Selects the style to use for Qt applications.
The options are The options are

View File

@ -50,7 +50,7 @@ in
type = types.bool; type = types.bool;
default = !(config.environment.etc ? "resolv.conf"); default = !(config.environment.etc ? "resolv.conf");
defaultText = literalExpression ''!(config.environment.etc ? "resolv.conf")''; defaultText = literalExpression ''!(config.environment.etc ? "resolv.conf")'';
description = lib.mdDoc '' description = ''
Whether DNS configuration is managed by resolvconf. Whether DNS configuration is managed by resolvconf.
''; '';
}; };
@ -59,7 +59,7 @@ in
type = types.package; type = types.package;
default = pkgs.openresolv; default = pkgs.openresolv;
defaultText = literalExpression "pkgs.openresolv"; defaultText = literalExpression "pkgs.openresolv";
description = lib.mdDoc '' description = ''
The package that provides the system-wide resolvconf command. Defaults to `openresolv` The package that provides the system-wide resolvconf command. Defaults to `openresolv`
if this module is enabled. Otherwise, can be used by other modules (for example {option}`services.resolved`) to if this module is enabled. Otherwise, can be used by other modules (for example {option}`services.resolved`) to
provide a compatibility layer. provide a compatibility layer.
@ -71,7 +71,7 @@ in
dnsSingleRequest = lib.mkOption { dnsSingleRequest = lib.mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Recent versions of glibc will issue both ipv4 (A) and ipv6 (AAAA) Recent versions of glibc will issue both ipv4 (A) and ipv6 (AAAA)
address queries at the same time, from the same port. Sometimes upstream address queries at the same time, from the same port. Sometimes upstream
routers will systemically drop the ipv4 queries. The symptom of this problem is routers will systemically drop the ipv4 queries. The symptom of this problem is
@ -84,7 +84,7 @@ in
dnsExtensionMechanism = mkOption { dnsExtensionMechanism = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
Enable the `edns0` option in {file}`resolv.conf`. With Enable the `edns0` option in {file}`resolv.conf`. With
that option set, `glibc` supports use of the extension mechanisms for that option set, `glibc` supports use of the extension mechanisms for
DNS (EDNS) specified in RFC 2671. The most popular user of that feature is DNSSEC, DNS (EDNS) specified in RFC 2671. The most popular user of that feature is DNSSEC,
@ -96,7 +96,7 @@ in
type = types.lines; type = types.lines;
default = ""; default = "";
example = "libc=NO"; example = "libc=NO";
description = lib.mdDoc '' description = ''
Extra configuration to append to {file}`resolvconf.conf`. Extra configuration to append to {file}`resolvconf.conf`.
''; '';
}; };
@ -105,7 +105,7 @@ in
type = types.listOf types.str; type = types.listOf types.str;
default = []; default = [];
example = [ "ndots:1" "rotate" ]; example = [ "ndots:1" "rotate" ];
description = lib.mdDoc '' description = ''
Set the options in {file}`/etc/resolv.conf`. Set the options in {file}`/etc/resolv.conf`.
''; '';
}; };
@ -113,7 +113,7 @@ in
useLocalResolver = mkOption { useLocalResolver = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Use local DNS server for resolving. Use local DNS server for resolving.
''; '';
}; };

View File

@ -35,7 +35,7 @@ in
environment.variables = mkOption { environment.variables = mkOption {
default = {}; default = {};
example = { EDITOR = "nvim"; VISUAL = "nvim"; }; example = { EDITOR = "nvim"; VISUAL = "nvim"; };
description = lib.mdDoc '' description = ''
A set of environment variables used in the global environment. A set of environment variables used in the global environment.
These variables will be set on shell initialisation (e.g. in /etc/profile). These variables will be set on shell initialisation (e.g. in /etc/profile).
The value of each variable can be either a string or a list of The value of each variable can be either a string or a list of
@ -48,7 +48,7 @@ in
environment.profiles = mkOption { environment.profiles = mkOption {
default = []; default = [];
description = lib.mdDoc '' description = ''
A list of profiles used to setup the global environment. A list of profiles used to setup the global environment.
''; '';
type = types.listOf types.str; type = types.listOf types.str;
@ -57,7 +57,7 @@ in
environment.profileRelativeEnvVars = mkOption { environment.profileRelativeEnvVars = mkOption {
type = types.attrsOf (types.listOf types.str); type = types.attrsOf (types.listOf types.str);
example = { PATH = [ "/bin" ]; MANPATH = [ "/man" "/share/man" ]; }; example = { PATH = [ "/bin" ]; MANPATH = [ "/man" "/share/man" ]; };
description = lib.mdDoc '' description = ''
Attribute set of environment variable. Each attribute maps to a list Attribute set of environment variable. Each attribute maps to a list
of relative paths. Each relative path is appended to the each profile of relative paths. Each relative path is appended to the each profile
of {option}`environment.profiles` to form the content of the of {option}`environment.profiles` to form the content of the
@ -68,7 +68,7 @@ in
# !!! isn't there a better way? # !!! isn't there a better way?
environment.extraInit = mkOption { environment.extraInit = mkOption {
default = ""; default = "";
description = lib.mdDoc '' description = ''
Shell script code called during global environment initialisation Shell script code called during global environment initialisation
after all variables and profileVariables have been set. after all variables and profileVariables have been set.
This code is assumed to be shell-independent, which means you should This code is assumed to be shell-independent, which means you should
@ -79,7 +79,7 @@ in
environment.shellInit = mkOption { environment.shellInit = mkOption {
default = ""; default = "";
description = lib.mdDoc '' description = ''
Shell script code called during shell initialisation. Shell script code called during shell initialisation.
This code is assumed to be shell-independent, which means you should This code is assumed to be shell-independent, which means you should
stick to pure sh without sh word split. stick to pure sh without sh word split.
@ -89,7 +89,7 @@ in
environment.loginShellInit = mkOption { environment.loginShellInit = mkOption {
default = ""; default = "";
description = lib.mdDoc '' description = ''
Shell script code called during login shell initialisation. Shell script code called during login shell initialisation.
This code is assumed to be shell-independent, which means you should This code is assumed to be shell-independent, which means you should
stick to pure sh without sh word split. stick to pure sh without sh word split.
@ -99,7 +99,7 @@ in
environment.interactiveShellInit = mkOption { environment.interactiveShellInit = mkOption {
default = ""; default = "";
description = lib.mdDoc '' description = ''
Shell script code called during interactive shell initialisation. Shell script code called during interactive shell initialisation.
This code is assumed to be shell-independent, which means you should This code is assumed to be shell-independent, which means you should
stick to pure sh without sh word split. stick to pure sh without sh word split.
@ -109,7 +109,7 @@ in
environment.shellAliases = mkOption { environment.shellAliases = mkOption {
example = { l = null; ll = "ls -l"; }; example = { l = null; ll = "ls -l"; };
description = lib.mdDoc '' description = ''
An attribute set that maps aliases (the top level attribute names in An attribute set that maps aliases (the top level attribute names in
this option) to command strings or directly to build outputs. The this option) to command strings or directly to build outputs. The
aliases are added to all users' shells. aliases are added to all users' shells.
@ -119,7 +119,7 @@ in
}; };
environment.homeBinInPath = mkOption { environment.homeBinInPath = mkOption {
description = lib.mdDoc '' description = ''
Include ~/bin/ in $PATH. Include ~/bin/ in $PATH.
''; '';
default = false; default = false;
@ -127,7 +127,7 @@ in
}; };
environment.localBinInPath = mkOption { environment.localBinInPath = mkOption {
description = lib.mdDoc '' description = ''
Add ~/.local/bin/ to $PATH Add ~/.local/bin/ to $PATH
''; '';
default = false; default = false;
@ -140,7 +140,7 @@ in
example = literalExpression ''"''${pkgs.dash}/bin/dash"''; example = literalExpression ''"''${pkgs.dash}/bin/dash"'';
type = types.path; type = types.path;
visible = false; visible = false;
description = lib.mdDoc '' description = ''
The shell executable that is linked system-wide to 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 over the place that shell to be Bash, so override the default
@ -151,7 +151,7 @@ in
environment.shells = mkOption { environment.shells = mkOption {
default = []; default = [];
example = literalExpression "[ pkgs.bashInteractive pkgs.zsh ]"; example = literalExpression "[ pkgs.bashInteractive pkgs.zsh ]";
description = lib.mdDoc '' description = ''
A list of permissible login shells for user accounts. A list of permissible login shells for user accounts.
No need to mention `/bin/sh` No need to mention `/bin/sh`
here, it is placed into this list implicitly. here, it is placed into this list implicitly.

View File

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
inherit (lib) optionals mkOption mkEnableOption types mkIf elem concatStringsSep maintainers mdDoc; inherit (lib) optionals mkOption mkEnableOption types mkIf elem concatStringsSep maintainers;
cfg = config.networking.stevenblack; cfg = config.networking.stevenblack;
# needs to be in a specific order # needs to be in a specific order
@ -15,12 +15,12 @@ let
in in
{ {
options.networking.stevenblack = { options.networking.stevenblack = {
enable = mkEnableOption (mdDoc "the stevenblack hosts file blocklist"); enable = mkEnableOption "the stevenblack hosts file blocklist";
block = mkOption { block = mkOption {
type = types.listOf (types.enum [ "fakenews" "gambling" "porn" "social" ]); type = types.listOf (types.enum [ "fakenews" "gambling" "porn" "social" ]);
default = [ ]; default = [ ];
description = mdDoc "Additional blocklist extensions."; description = "Additional blocklist extensions.";
}; };
}; };

View File

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
inherit (lib) optionalString mkOption types mdDoc mkIf mkDefault; inherit (lib) optionalString mkOption types mkIf mkDefault;
cfg = config.environment.stub-ld; cfg = config.environment.stub-ld;
@ -38,7 +38,7 @@ in {
type = types.bool; type = types.bool;
default = true; default = true;
example = false; example = false;
description = mdDoc '' description = ''
Install a stub ELF loader to print an informative error message Install a stub ELF loader to print an informative error message
in the event that a user attempts to run an ELF binary not in the event that a user attempts to run an ELF binary not
compiled for NixOS. compiled for NixOS.

View File

@ -14,7 +14,7 @@ let
enable = mkOption { enable = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Encrypt swap device with a random key. This way you won't have a persistent swap device. Encrypt swap device with a random key. This way you won't have a persistent swap device.
WARNING: Don't try to hibernate when you have at least one swap partition with WARNING: Don't try to hibernate when you have at least one swap partition with
@ -31,7 +31,7 @@ let
default = "aes-xts-plain64"; default = "aes-xts-plain64";
example = "serpent-xts-plain64"; example = "serpent-xts-plain64";
type = types.str; type = types.str;
description = lib.mdDoc '' description = ''
Use specified cipher for randomEncryption. Use specified cipher for randomEncryption.
Hint: Run "cryptsetup benchmark" to see which one is fastest on your machine. Hint: Run "cryptsetup benchmark" to see which one is fastest on your machine.
@ -42,7 +42,7 @@ let
default = null; default = null;
example = "512"; example = "512";
type = types.nullOr types.int; type = types.nullOr types.int;
description = lib.mdDoc '' description = ''
Set the encryption key size for the plain device. Set the encryption key size for the plain device.
If not specified, the amount of data to read from `source` will be If not specified, the amount of data to read from `source` will be
@ -56,7 +56,7 @@ let
default = null; default = null;
example = "4096"; example = "4096";
type = types.nullOr types.int; type = types.nullOr types.int;
description = lib.mdDoc '' description = ''
Set the sector size for the plain encrypted device type. Set the sector size for the plain encrypted device type.
If not specified, the default sector size is determined from the If not specified, the default sector size is determined from the
@ -70,7 +70,7 @@ let
default = "/dev/urandom"; default = "/dev/urandom";
example = "/dev/random"; example = "/dev/random";
type = types.str; type = types.str;
description = lib.mdDoc '' description = ''
Define the source of randomness to obtain a random key for encryption. Define the source of randomness to obtain a random key for encryption.
''; '';
}; };
@ -78,7 +78,7 @@ let
allowDiscards = mkOption { allowDiscards = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Whether to allow TRIM requests to the underlying device. This option Whether to allow TRIM requests to the underlying device. This option
has security implications; please read the LUKS documentation before has security implications; please read the LUKS documentation before
activating it. activating it.
@ -95,13 +95,13 @@ let
device = mkOption { device = mkOption {
example = "/dev/sda3"; example = "/dev/sda3";
type = types.nonEmptyStr; type = types.nonEmptyStr;
description = lib.mdDoc "Path of the device or swap file."; description = "Path of the device or swap file.";
}; };
label = mkOption { label = mkOption {
example = "swap"; example = "swap";
type = types.str; type = types.str;
description = lib.mdDoc '' description = ''
Label of the device. Can be used instead of {var}`device`. Label of the device. Can be used instead of {var}`device`.
''; '';
}; };
@ -110,7 +110,7 @@ let
default = null; default = null;
example = 2048; example = 2048;
type = types.nullOr types.int; type = types.nullOr types.int;
description = lib.mdDoc '' description = ''
If this option is set, device is interpreted as the If this option is set, device is interpreted as the
path of a swapfile that will be created automatically path of a swapfile that will be created automatically
with the indicated size (in megabytes). with the indicated size (in megabytes).
@ -121,7 +121,7 @@ let
default = null; default = null;
example = 2048; example = 2048;
type = types.nullOr types.int; type = types.nullOr types.int;
description = lib.mdDoc '' description = ''
Specify the priority of the swap device. Priority is a value between 0 and 32767. Specify the priority of the swap device. Priority is a value between 0 and 32767.
Higher numbers indicate higher priority. Higher numbers indicate higher priority.
null lets the kernel choose a priority, which will show up as a negative value. null lets the kernel choose a priority, which will show up as a negative value.
@ -136,7 +136,7 @@ let
source = "/dev/random"; source = "/dev/random";
}; };
type = types.coercedTo types.bool randomEncryptionCoerce (types.submodule randomEncryptionOpts); type = types.coercedTo types.bool randomEncryptionCoerce (types.submodule randomEncryptionOpts);
description = lib.mdDoc '' description = ''
Encrypt swap device with a random key. This way you won't have a persistent swap device. Encrypt swap device with a random key. This way you won't have a persistent swap device.
HINT: run "cryptsetup benchmark" to test cipher performance on your machine. HINT: run "cryptsetup benchmark" to test cipher performance on your machine.
@ -155,7 +155,7 @@ let
default = null; default = null;
example = "once"; example = "once";
type = types.nullOr (types.enum ["once" "pages" "both" ]); type = types.nullOr (types.enum ["once" "pages" "both" ]);
description = lib.mdDoc '' description = ''
Specify the discard policy for the swap device. If "once", then the Specify the discard policy for the swap device. If "once", then the
whole swap space is discarded at swapon invocation. If "pages", whole swap space is discarded at swapon invocation. If "pages",
asynchronous discard on freed pages is performed, before returning to asynchronous discard on freed pages is performed, before returning to
@ -168,7 +168,7 @@ let
default = [ "defaults" ]; default = [ "defaults" ];
example = [ "nofail" ]; example = [ "nofail" ];
type = types.listOf types.nonEmptyStr; type = types.listOf types.nonEmptyStr;
description = lib.mdDoc '' description = ''
Options used to mount the swap. Options used to mount the swap.
''; '';
}; };
@ -209,7 +209,7 @@ in
{ device = "/var/swapfile"; } { device = "/var/swapfile"; }
{ label = "bigswap"; } { label = "bigswap"; }
]; ];
description = lib.mdDoc '' description = ''
The swap devices and swap files. These must have been The swap devices and swap files. These must have been
initialised using {command}`mkswap`. Each element initialised using {command}`mkswap`. Each element
should be an attribute set specifying either the path of the should be an attribute set specifying either the path of the

View File

@ -35,13 +35,13 @@ in
"net.core.rmem_max" = mkOption { "net.core.rmem_max" = mkOption {
type = types.nullOr highestValueType; type = types.nullOr highestValueType;
default = null; default = null;
description = lib.mdDoc "The maximum receive socket buffer size in bytes. In case of conflicting values, the highest will be used."; description = "The maximum receive socket buffer size in bytes. In case of conflicting values, the highest will be used.";
}; };
"net.core.wmem_max" = mkOption { "net.core.wmem_max" = mkOption {
type = types.nullOr highestValueType; type = types.nullOr highestValueType;
default = null; default = null;
description = lib.mdDoc "The maximum send socket buffer size in bytes. In case of conflicting values, the highest will be used."; description = "The maximum send socket buffer size in bytes. In case of conflicting values, the highest will be used.";
}; };
}; };
}; };
@ -49,7 +49,7 @@ in
example = literalExpression '' example = literalExpression ''
{ "net.ipv4.tcp_syncookies" = false; "vm.swappiness" = 60; } { "net.ipv4.tcp_syncookies" = false; "vm.swappiness" = 60; }
''; '';
description = lib.mdDoc '' description = ''
Runtime parameters of the Linux kernel, as set by Runtime parameters of the Linux kernel, as set by
{manpage}`sysctl(8)`. Note that sysctl {manpage}`sysctl(8)`. Note that sysctl
parameters names must be enclosed in quotes parameters names must be enclosed in quotes

View File

@ -16,7 +16,7 @@ in
environment.sessionVariables = mkOption { environment.sessionVariables = mkOption {
default = {}; default = {};
description = lib.mdDoc '' description = ''
A set of environment variables used in the global environment. A set of environment variables used in the global environment.
These variables will be set by PAM early in the login process. These variables will be set by PAM early in the login process.
@ -38,7 +38,7 @@ in
environment.profileRelativeSessionVariables = mkOption { environment.profileRelativeSessionVariables = mkOption {
type = types.attrsOf (types.listOf types.str); type = types.attrsOf (types.listOf types.str);
example = { PATH = [ "/bin" ]; MANPATH = [ "/man" "/share/man" ]; }; example = { PATH = [ "/bin" ]; MANPATH = [ "/man" "/share/man" ]; };
description = lib.mdDoc '' description = ''
Attribute set of environment variable used in the global Attribute set of environment variable used in the global
environment. These variables will be set by PAM early in the environment. These variables will be set by PAM early in the
login process. login process.

View File

@ -63,7 +63,7 @@ in
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = [];
example = literalExpression "[ pkgs.firefox pkgs.thunderbird ]"; example = literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
description = lib.mdDoc '' description = ''
The set of packages that appear in The set of packages that appear in
/run/current-system/sw. These packages are /run/current-system/sw. These packages are
automatically available to all users, and are automatically available to all users, and are
@ -84,7 +84,7 @@ in
${defaultPackagesText} ${defaultPackagesText}
''; '';
example = []; example = [];
description = lib.mdDoc '' description = ''
Set of default packages that aren't strictly necessary Set of default packages that aren't strictly necessary
for a running system, entries can be removed for a more for a running system, entries can be removed for a more
minimal NixOS installation. minimal NixOS installation.
@ -103,14 +103,14 @@ in
# to work. # to work.
default = []; default = [];
example = ["/"]; example = ["/"];
description = lib.mdDoc "List of directories to be symlinked in {file}`/run/current-system/sw`."; description = "List of directories to be symlinked in {file}`/run/current-system/sw`.";
}; };
extraOutputsToInstall = mkOption { extraOutputsToInstall = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ ];
example = [ "dev" "info" ]; example = [ "dev" "info" ];
description = lib.mdDoc '' description = ''
Entries listed here will be appended to the `meta.outputsToInstall` attribute for each package in `environment.systemPackages`, and the files from the corresponding derivation outputs symlinked into {file}`/run/current-system/sw`. Entries listed here will be appended to the `meta.outputsToInstall` attribute for each package in `environment.systemPackages`, and the files from the corresponding derivation outputs symlinked into {file}`/run/current-system/sw`.
For example, this can be used to install the `dev` and `info` outputs for all packages in the system environment, if they are available. For example, this can be used to install the `dev` and `info` outputs for all packages in the system environment, if they are available.
@ -122,7 +122,7 @@ in
extraSetup = mkOption { extraSetup = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
description = lib.mdDoc "Shell fragments to be run after the system environment has been created. This should only be used for things that need to modify the internals of the environment, e.g. generating MIME caches. The environment being built can be accessed at $out."; description = "Shell fragments to be run after the system environment has been created. This should only be used for things that need to modify the internals of the environment, e.g. generating MIME caches. The environment being built can be accessed at $out.";
}; };
}; };
@ -131,7 +131,7 @@ in
path = mkOption { path = mkOption {
internal = true; internal = true;
description = lib.mdDoc '' description = ''
The packages you want in the boot environment. The packages you want in the boot environment.
''; '';
}; };

View File

@ -10,7 +10,7 @@ with lib;
environment.enableAllTerminfo = mkOption { environment.enableAllTerminfo = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Whether to install all terminfo outputs Whether to install all terminfo outputs
''; '';
}; };
@ -18,7 +18,7 @@ with lib;
security.sudo.keepTerminfo = mkOption { security.sudo.keepTerminfo = mkOption {
default = true; default = true;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Whether to preserve the `TERMINFO` and `TERMINFO_DIRS` Whether to preserve the `TERMINFO` and `TERMINFO_DIRS`
environment variables, for `root` and the `wheel` group. environment variables, for `root` and the `wheel` group.
''; '';

View File

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

View File

@ -56,7 +56,7 @@ let
name = mkOption { name = mkOption {
type = types.passwdEntry types.str; type = types.passwdEntry types.str;
apply = x: assert (builtins.stringLength x < 32 || abort "Username '${x}' is longer than 31 characters which is not allowed!"); x; apply = x: assert (builtins.stringLength x < 32 || abort "Username '${x}' is longer than 31 characters which is not allowed!"); x;
description = lib.mdDoc '' description = ''
The name of the user account. If undefined, the name of the The name of the user account. If undefined, the name of the
attribute set will be used. attribute set will be used.
''; '';
@ -66,7 +66,7 @@ let
type = types.passwdEntry types.str; type = types.passwdEntry types.str;
default = ""; default = "";
example = "Alice Q. User"; example = "Alice Q. User";
description = lib.mdDoc '' description = ''
A short description of the user account, typically the A short description of the user account, typically the
user's full name. This is actually the GECOS or comment user's full name. This is actually the GECOS or comment
field in {file}`/etc/passwd`. field in {file}`/etc/passwd`.
@ -76,7 +76,7 @@ let
uid = mkOption { uid = mkOption {
type = with types; nullOr int; type = with types; nullOr int;
default = null; default = null;
description = lib.mdDoc '' description = ''
The account UID. If the UID is null, a free UID is picked on The account UID. If the UID is null, a free UID is picked on
activation. activation.
''; '';
@ -85,7 +85,7 @@ let
isSystemUser = mkOption { isSystemUser = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Indicates if the user is a system user or not. This option Indicates if the user is a system user or not. This option
only has an effect if {option}`uid` is only has an effect if {option}`uid` is
{option}`null`, in which case it determines whether {option}`null`, in which case it determines whether
@ -100,7 +100,7 @@ let
isNormalUser = mkOption { isNormalUser = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Indicates whether this is an account for a real user. Indicates whether this is an account for a real user.
This automatically sets {option}`group` to `users`, This automatically sets {option}`group` to `users`,
{option}`createHome` to `true`, {option}`createHome` to `true`,
@ -115,31 +115,31 @@ let
type = types.str; type = types.str;
apply = x: assert (builtins.stringLength x < 32 || abort "Group name '${x}' is longer than 31 characters which is not allowed!"); x; apply = x: assert (builtins.stringLength x < 32 || abort "Group name '${x}' is longer than 31 characters which is not allowed!"); x;
default = ""; default = "";
description = lib.mdDoc "The user's primary group."; description = "The user's primary group.";
}; };
extraGroups = mkOption { extraGroups = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = []; default = [];
description = lib.mdDoc "The user's auxiliary groups."; description = "The user's auxiliary groups.";
}; };
home = mkOption { home = mkOption {
type = types.passwdEntry types.path; type = types.passwdEntry types.path;
default = "/var/empty"; default = "/var/empty";
description = lib.mdDoc "The user's home directory."; description = "The user's home directory.";
}; };
homeMode = mkOption { homeMode = mkOption {
type = types.strMatching "[0-7]{1,5}"; type = types.strMatching "[0-7]{1,5}";
default = "700"; default = "700";
description = lib.mdDoc "The user's home directory mode in numeric format. See chmod(1). The mode is only applied if {option}`users.users.<name>.createHome` is true."; description = "The user's home directory mode in numeric format. See chmod(1). The mode is only applied if {option}`users.users.<name>.createHome` is true.";
}; };
cryptHomeLuks = mkOption { cryptHomeLuks = mkOption {
type = with types; nullOr str; type = with types; nullOr str;
default = null; default = null;
description = lib.mdDoc '' description = ''
Path to encrypted luks device that contains Path to encrypted luks device that contains
the user's home directory. the user's home directory.
''; '';
@ -148,7 +148,7 @@ let
pamMount = mkOption { pamMount = mkOption {
type = with types; attrsOf str; type = with types; attrsOf str;
default = {}; default = {};
description = lib.mdDoc '' description = ''
Attributes for user's entry in Attributes for user's entry in
{file}`pam_mount.conf.xml`. {file}`pam_mount.conf.xml`.
Useful attributes might include `path`, Useful attributes might include `path`,
@ -163,7 +163,7 @@ let
default = pkgs.shadow; default = pkgs.shadow;
defaultText = literalExpression "pkgs.shadow"; defaultText = literalExpression "pkgs.shadow";
example = literalExpression "pkgs.bashInteractive"; example = literalExpression "pkgs.bashInteractive";
description = lib.mdDoc '' description = ''
The path to the user's shell. Can use shell derivations, The path to the user's shell. Can use shell derivations,
like `pkgs.bashInteractive`. Dont like `pkgs.bashInteractive`. Dont
forget to enable your shell in forget to enable your shell in
@ -175,7 +175,7 @@ let
ignoreShellProgramCheck = mkOption { ignoreShellProgramCheck = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
By default, nixos will check that programs.SHELL.enable is set to By default, nixos will check that programs.SHELL.enable is set to
true if the user has a custom shell specified. If that behavior isn't true if the user has a custom shell specified. If that behavior isn't
required and there are custom overrides in place to make sure that the required and there are custom overrides in place to make sure that the
@ -190,7 +190,7 @@ let
{ startUid = 1000; count = 1; } { startUid = 1000; count = 1; }
{ startUid = 100001; count = 65534; } { startUid = 100001; count = 65534; }
]; ];
description = lib.mdDoc '' description = ''
Subordinate user ids that user is allowed to use. Subordinate user ids that user is allowed to use.
They are set into {file}`/etc/subuid` and are used They are set into {file}`/etc/subuid` and are used
by `newuidmap` for user namespaces. by `newuidmap` for user namespaces.
@ -204,7 +204,7 @@ let
{ startGid = 100; count = 1; } { startGid = 100; count = 1; }
{ startGid = 1001; count = 999; } { startGid = 1001; count = 999; }
]; ];
description = lib.mdDoc '' description = ''
Subordinate group ids that user is allowed to use. Subordinate group ids that user is allowed to use.
They are set into {file}`/etc/subgid` and are used They are set into {file}`/etc/subgid` and are used
by `newgidmap` for user namespaces. by `newgidmap` for user namespaces.
@ -215,7 +215,7 @@ let
type = types.bool; type = types.bool;
default = false; default = false;
example = true; example = true;
description = lib.mdDoc '' description = ''
Automatically allocate subordinate user and group ids for this user. Automatically allocate subordinate user and group ids for this user.
Allocated range is currently always of size 65536. Allocated range is currently always of size 65536.
''; '';
@ -224,7 +224,7 @@ let
createHome = mkOption { createHome = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Whether to create the home directory and ensure ownership as well as Whether to create the home directory and ensure ownership as well as
permissions to match the user. permissions to match the user.
''; '';
@ -233,7 +233,7 @@ let
useDefaultShell = mkOption { useDefaultShell = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
If true, the user's shell will be set to If true, the user's shell will be set to
{option}`users.defaultUserShell`. {option}`users.defaultUserShell`.
''; '';
@ -242,7 +242,7 @@ let
hashedPassword = mkOption { hashedPassword = mkOption {
type = with types; nullOr (passwdEntry str); type = with types; nullOr (passwdEntry str);
default = null; default = null;
description = lib.mdDoc '' description = ''
Specifies the hashed password for the user. Specifies the hashed password for the user.
${passwordDescription} ${passwordDescription}
${hashedPasswordDescription} ${hashedPasswordDescription}
@ -252,7 +252,7 @@ let
password = mkOption { password = mkOption {
type = with types; nullOr str; type = with types; nullOr str;
default = null; default = null;
description = lib.mdDoc '' description = ''
Specifies the (clear text) password for the user. Specifies the (clear text) password for the user.
Warning: do not set confidential information here Warning: do not set confidential information here
because it is world-readable in the Nix store. This option because it is world-readable in the Nix store. This option
@ -265,7 +265,7 @@ let
type = with types; nullOr str; type = with types; nullOr str;
default = cfg.users.${name}.passwordFile; default = cfg.users.${name}.passwordFile;
defaultText = literalExpression "null"; defaultText = literalExpression "null";
description = lib.mdDoc '' description = ''
The full path to a file that contains the hash of the user's The full path to a file that contains the hash of the user's
password. The password file is read on each system activation. The password. The password file is read on each system activation. The
file should contain exactly one line, which should be the password in file should contain exactly one line, which should be the password in
@ -278,13 +278,13 @@ let
type = with types; nullOr str; type = with types; nullOr str;
default = null; default = null;
visible = false; visible = false;
description = lib.mdDoc "Deprecated alias of hashedPasswordFile"; description = "Deprecated alias of hashedPasswordFile";
}; };
initialHashedPassword = mkOption { initialHashedPassword = mkOption {
type = with types; nullOr (passwdEntry str); type = with types; nullOr (passwdEntry str);
default = null; default = null;
description = lib.mdDoc '' description = ''
Specifies the initial hashed password for the user, i.e. the Specifies the initial hashed password for the user, i.e. the
hashed password assigned if the user does not already hashed password assigned if the user does not already
exist. If {option}`users.mutableUsers` is true, the exist. If {option}`users.mutableUsers` is true, the
@ -302,7 +302,7 @@ let
initialPassword = mkOption { initialPassword = mkOption {
type = with types; nullOr str; type = with types; nullOr str;
default = null; default = null;
description = lib.mdDoc '' description = ''
Specifies the initial password for the user, i.e. the Specifies the initial password for the user, i.e. the
password assigned if the user does not already exist. If password assigned if the user does not already exist. If
{option}`users.mutableUsers` is true, the password {option}`users.mutableUsers` is true, the password
@ -323,7 +323,7 @@ let
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = [];
example = literalExpression "[ pkgs.firefox pkgs.thunderbird ]"; example = literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
description = lib.mdDoc '' description = ''
The set of packages that should be made available to the user. The set of packages that should be made available to the user.
This is in contrast to {option}`environment.systemPackages`, This is in contrast to {option}`environment.systemPackages`,
which adds packages to all users. which adds packages to all users.
@ -333,7 +333,7 @@ let
expires = mkOption { expires = mkOption {
type = types.nullOr (types.strMatching "[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}"); type = types.nullOr (types.strMatching "[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}");
default = null; default = null;
description = lib.mdDoc '' description = ''
Set the date on which the user's account will no longer be Set the date on which the user's account will no longer be
accessible. The date is expressed in the format YYYY-MM-DD, or null accessible. The date is expressed in the format YYYY-MM-DD, or null
to disable the expiry. to disable the expiry.
@ -345,7 +345,7 @@ let
linger = mkOption { linger = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Whether to enable lingering for this user. If true, systemd user Whether to enable lingering for this user. If true, systemd user
units will start at boot, rather than starting at login and stopping units will start at boot, rather than starting at login and stopping
at logout. This is the declarative equivalent of running at logout. This is the declarative equivalent of running
@ -390,7 +390,7 @@ let
name = mkOption { name = mkOption {
type = types.passwdEntry types.str; type = types.passwdEntry types.str;
description = lib.mdDoc '' description = ''
The name of the group. If undefined, the name of the attribute set The name of the group. If undefined, the name of the attribute set
will be used. will be used.
''; '';
@ -399,7 +399,7 @@ let
gid = mkOption { gid = mkOption {
type = with types; nullOr int; type = with types; nullOr int;
default = null; default = null;
description = lib.mdDoc '' description = ''
The group GID. If the GID is null, a free GID is picked on The group GID. If the GID is null, a free GID is picked on
activation. activation.
''; '';
@ -408,7 +408,7 @@ let
members = mkOption { members = mkOption {
type = with types; listOf (passwdEntry str); type = with types; listOf (passwdEntry str);
default = []; default = [];
description = lib.mdDoc '' description = ''
The user names of the group members, added to the The user names of the group members, added to the
`/etc/group` file. `/etc/group` file.
''; '';
@ -430,7 +430,7 @@ let
options = { options = {
startUid = mkOption { startUid = mkOption {
type = types.int; type = types.int;
description = lib.mdDoc '' description = ''
Start of the range of subordinate user ids that user is Start of the range of subordinate user ids that user is
allowed to use. allowed to use.
''; '';
@ -438,7 +438,7 @@ let
count = mkOption { count = mkOption {
type = types.int; type = types.int;
default = 1; default = 1;
description = lib.mdDoc "Count of subordinate user ids"; description = "Count of subordinate user ids";
}; };
}; };
}; };
@ -447,7 +447,7 @@ let
options = { options = {
startGid = mkOption { startGid = mkOption {
type = types.int; type = types.int;
description = lib.mdDoc '' description = ''
Start of the range of subordinate group ids that user is Start of the range of subordinate group ids that user is
allowed to use. allowed to use.
''; '';
@ -455,7 +455,7 @@ let
count = mkOption { count = mkOption {
type = types.int; type = types.int;
default = 1; default = 1;
description = lib.mdDoc "Count of subordinate group ids"; description = "Count of subordinate group ids";
}; };
}; };
}; };
@ -510,7 +510,7 @@ in {
users.mutableUsers = mkOption { users.mutableUsers = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
If set to `true`, you are free to add new users and groups to the system If set to `true`, you are free to add new users and groups to the system
with the ordinary `useradd` and with the ordinary `useradd` and
`groupadd` commands. On system activation, the `groupadd` commands. On system activation, the
@ -535,7 +535,7 @@ in {
users.enforceIdUniqueness = mkOption { users.enforceIdUniqueness = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
Whether to require that no two users/groups share the same uid/gid. Whether to require that no two users/groups share the same uid/gid.
''; '';
}; };
@ -554,7 +554,7 @@ in {
shell = "/bin/sh"; shell = "/bin/sh";
}; };
}; };
description = lib.mdDoc '' description = ''
Additional user accounts to be created automatically by the system. Additional user accounts to be created automatically by the system.
This can also be used to set options for root. This can also be used to set options for root.
''; '';
@ -567,7 +567,7 @@ in {
hackers = { }; hackers = { };
}; };
type = with types; attrsOf (submodule groupOpts); type = with types; attrsOf (submodule groupOpts);
description = lib.mdDoc '' description = ''
Additional groups to be created automatically by the system. Additional groups to be created automatically by the system.
''; '';
}; };
@ -576,7 +576,7 @@ in {
users.allowNoPasswordLogin = mkOption { users.allowNoPasswordLogin = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Disable checking that at least the `root` user or a user in the `wheel` group can log in using Disable checking that at least the `root` user or a user in the `wheel` group can log in using
a password or an SSH key. a password or an SSH key.

View File

@ -23,7 +23,7 @@ in
programs.bash.vteIntegration = mkOption { programs.bash.vteIntegration = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Whether to enable Bash integration for VTE terminals. Whether to enable Bash integration for VTE terminals.
This allows it to preserve the current directory of the shell This allows it to preserve the current directory of the shell
across terminals. across terminals.
@ -33,7 +33,7 @@ in
programs.zsh.vteIntegration = mkOption { programs.zsh.vteIntegration = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Whether to enable Zsh integration for VTE terminals. Whether to enable Zsh integration for VTE terminals.
This allows it to preserve the current directory of the shell This allows it to preserve the current directory of the shell
across terminals. across terminals.

View File

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

View File

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

View File

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

View File

@ -18,7 +18,7 @@ in
xdg.mime.enable = mkOption { xdg.mime.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
Whether to install files to support the Whether to install files to support the
[XDG Shared MIME-info specification](https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html) and the [XDG Shared MIME-info specification](https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html) and the
[XDG MIME Applications specification](https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html). [XDG MIME Applications specification](https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html).
@ -32,7 +32,7 @@ in
"application/pdf" = "firefox.desktop"; "application/pdf" = "firefox.desktop";
"text/xml" = [ "nvim.desktop" "codium.desktop" ]; "text/xml" = [ "nvim.desktop" "codium.desktop" ];
}; };
description = lib.mdDoc '' description = ''
Adds associations between mimetypes and applications. See the Adds associations between mimetypes and applications. See the
[ [
specifications](https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html#associations) for more information. specifications](https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html#associations) for more information.
@ -46,7 +46,7 @@ in
"application/pdf" = "firefox.desktop"; "application/pdf" = "firefox.desktop";
"image/png" = [ "sxiv.desktop" "gimp.desktop" ]; "image/png" = [ "sxiv.desktop" "gimp.desktop" ];
}; };
description = lib.mdDoc '' description = ''
Sets the default applications for given mimetypes. See the Sets the default applications for given mimetypes. See the
[ [
specifications](https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html#default) for more information. specifications](https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html#default) for more information.
@ -60,7 +60,7 @@ in
"audio/mp3" = [ "mpv.desktop" "umpv.desktop" ]; "audio/mp3" = [ "mpv.desktop" "umpv.desktop" ];
"inode/directory" = "codium.desktop"; "inode/directory" = "codium.desktop";
}; };
description = lib.mdDoc '' description = ''
Removes associations between mimetypes and applications. See the Removes associations between mimetypes and applications. See the
[ [
specifications](https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html#associations) for more information. specifications](https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html#associations) for more information.

View File

@ -37,14 +37,14 @@ in
options.xdg.portal = { options.xdg.portal = {
enable = enable =
mkEnableOption (lib.mdDoc ''[xdg desktop integration](https://github.com/flatpak/xdg-desktop-portal)'') // { mkEnableOption ''[xdg desktop integration](https://github.com/flatpak/xdg-desktop-portal)'' // {
default = false; default = false;
}; };
extraPortals = mkOption { extraPortals = mkOption {
type = types.listOf types.package; type = types.listOf types.package;
default = [ ]; default = [ ];
description = lib.mdDoc '' description = ''
List of additional portals to add to path. Portals allow interaction List of additional portals to add to path. Portals allow interaction
with system, like choosing files or taking screenshots. At minimum, with system, like choosing files or taking screenshots. At minimum,
a desktop portal implementation should be listed. GNOME and KDE already a desktop portal implementation should be listed. GNOME and KDE already
@ -58,7 +58,7 @@ in
type = types.bool; type = types.bool;
visible = false; visible = false;
default = false; default = false;
description = lib.mdDoc '' description = ''
Sets environment variable `GTK_USE_PORTAL` to `1`. Sets environment variable `GTK_USE_PORTAL` to `1`.
This will force GTK-based programs ran outside Flatpak to respect and use XDG Desktop Portals 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. for features like file chooser but it is an unsupported hack that can easily break things.
@ -69,7 +69,7 @@ in
xdgOpenUsePortal = mkOption { xdgOpenUsePortal = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Sets environment variable `NIXOS_XDG_OPEN_USE_PORTAL` to `1` Sets environment variable `NIXOS_XDG_OPEN_USE_PORTAL` to `1`
This will make `xdg-open` use the portal to open programs, which resolves bugs involving This will make `xdg-open` use the portal to open programs, which resolves bugs involving
programs opening inside FHS envs or with unexpected env vars set from wrappers. programs opening inside FHS envs or with unexpected env vars set from wrappers.
@ -92,7 +92,7 @@ in
default = [ "gtk" ]; default = [ "gtk" ];
}; };
}; };
description = lib.mdDoc '' description = ''
Sets which portal backend should be used to provide the implementation Sets which portal backend should be used to provide the implementation
for the requested interface. For details check {manpage}`portals.conf(5)`. for the requested interface. For details check {manpage}`portals.conf(5)`.
@ -106,7 +106,7 @@ in
type = types.listOf types.package; type = types.listOf types.package;
default = [ ]; default = [ ];
example = lib.literalExpression "[ pkgs.gnome.gnome-session ]"; example = lib.literalExpression "[ pkgs.gnome.gnome-session ]";
description = lib.mdDoc '' description = ''
List of packages that provide XDG desktop portal configuration, usually in List of packages that provide XDG desktop portal configuration, usually in
the form of `share/xdg-desktop-portal/$desktop-portals.conf`. the form of `share/xdg-desktop-portal/$desktop-portals.conf`.

View File

@ -12,13 +12,13 @@ in
}; };
options.xdg.portal.lxqt = { options.xdg.portal.lxqt = {
enable = mkEnableOption (lib.mdDoc '' enable = mkEnableOption ''
the desktop portal for the LXQt desktop environment. 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 package (with the extra Qt styles) into the
{option}`xdg.portal.extraPortals` option {option}`xdg.portal.extraPortals` option
''); '';
styles = mkOption { styles = mkOption {
type = types.listOf types.package; type = types.listOf types.package;
@ -29,7 +29,7 @@ in
pkgs.qtcurve pkgs.qtcurve
]; ];
''; '';
description = lib.mdDoc '' description = ''
Extra Qt styles that will be available to the Extra Qt styles that will be available to the
`lxqt.xdg-desktop-portal-lxqt`. `lxqt.xdg-desktop-portal-lxqt`.
''; '';

View File

@ -14,16 +14,16 @@ in
}; };
options.xdg.portal.wlr = { options.xdg.portal.wlr = {
enable = mkEnableOption (lib.mdDoc '' enable = mkEnableOption ''
desktop portal for wlroots-based desktops. desktop portal for wlroots-based desktops.
This will add the `xdg-desktop-portal-wlr` package into This will add the `xdg-desktop-portal-wlr` package into
the {option}`xdg.portal.extraPortals` option, and provide the the {option}`xdg.portal.extraPortals` option, and provide the
configuration file configuration file
''); '';
settings = mkOption { settings = mkOption {
description = lib.mdDoc '' description = ''
Configuration for `xdg-desktop-portal-wlr`. Configuration for `xdg-desktop-portal-wlr`.
See `xdg-desktop-portal-wlr(5)` for supported See `xdg-desktop-portal-wlr(5)` for supported

View File

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

View File

@ -22,7 +22,7 @@ in
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
type = lib.types.bool; type = lib.types.bool;
description = lib.mdDoc '' description = ''
Enable in-memory compressed devices and swap space provided by the zram Enable in-memory compressed devices and swap space provided by the zram
kernel module. kernel module.
See [ See [
@ -34,7 +34,7 @@ in
swapDevices = lib.mkOption { swapDevices = lib.mkOption {
default = 1; default = 1;
type = lib.types.int; type = lib.types.int;
description = lib.mdDoc '' description = ''
Number of zram devices to be used as swap, recommended is 1. Number of zram devices to be used as swap, recommended is 1.
''; '';
}; };
@ -42,7 +42,7 @@ in
memoryPercent = lib.mkOption { memoryPercent = lib.mkOption {
default = 50; default = 50;
type = lib.types.int; type = lib.types.int;
description = lib.mdDoc '' description = ''
Maximum total amount of memory that can be stored in the zram swap devices Maximum total amount of memory that can be stored in the zram swap devices
(as a percentage of your total memory). Defaults to 1/2 of your total (as a percentage of your total memory). Defaults to 1/2 of your total
RAM. Run `zramctl` to check how good memory is compressed. RAM. Run `zramctl` to check how good memory is compressed.
@ -53,7 +53,7 @@ in
memoryMax = lib.mkOption { memoryMax = lib.mkOption {
default = null; default = null;
type = with lib.types; nullOr int; type = with lib.types; nullOr int;
description = lib.mdDoc '' description = ''
Maximum total amount of memory (in bytes) that can be stored in the zram Maximum total amount of memory (in bytes) that can be stored in the zram
swap devices. swap devices.
This doesn't define how much memory will be used by the zram swap devices. This doesn't define how much memory will be used by the zram swap devices.
@ -63,7 +63,7 @@ in
priority = lib.mkOption { priority = lib.mkOption {
default = 5; default = 5;
type = lib.types.int; type = lib.types.int;
description = lib.mdDoc '' description = ''
Priority of the zram swap devices. It should be a number higher than Priority of the zram swap devices. It should be a number higher than
the priority of your disk-based swap devices (so that the system will the priority of your disk-based swap devices (so that the system will
fill the zram swap devices before falling back to disk swap). fill the zram swap devices before falling back to disk swap).
@ -74,7 +74,7 @@ in
default = "zstd"; default = "zstd";
example = "lz4"; example = "lz4";
type = with lib.types; either (enum [ "lzo" "lz4" "zstd" ]) str; type = with lib.types; either (enum [ "lzo" "lz4" "zstd" ]) str;
description = lib.mdDoc '' description = ''
Compression algorithm. `lzo` has good compression, Compression algorithm. `lzo` has good compression,
but is slow. `lz4` has bad compression, but is fast. but is slow. `lz4` has bad compression, but is fast.
`zstd` is both good compression and fast, but requires newer kernel. `zstd` is both good compression and fast, but requires newer kernel.
@ -87,7 +87,7 @@ in
default = null; default = null;
example = "/dev/zvol/tarta-zoot/swap-writeback"; example = "/dev/zvol/tarta-zoot/swap-writeback";
type = lib.types.nullOr lib.types.path; type = lib.types.nullOr lib.types.path;
description = lib.mdDoc '' description = ''
Write incompressible pages to this device, Write incompressible pages to this device,
as there's no gain from keeping them in RAM. as there's no gain from keeping them in RAM.
''; '';

View File

@ -10,7 +10,7 @@ in
enable = mkOption { enable = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Enable acpilight. Enable acpilight.
This will allow brightness control via xbacklight from users in the video group This will allow brightness control via xbacklight from users in the video group
''; '';

View File

@ -12,7 +12,7 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Enables udev rules for BladeRF devices. By default grants access Enables udev rules for BladeRF devices. By default grants access
to users in the "bladerf" group. You may want to install the to users in the "bladerf" group. You may want to install the
libbladeRF package. libbladeRF package.

View File

@ -7,10 +7,10 @@ in
{ {
options = { options = {
hardware.brillo = { hardware.brillo = {
enable = mkEnableOption (lib.mdDoc '' enable = mkEnableOption ''
brillo in userspace. brillo in userspace.
This will allow brightness control from users in the video group This will allow brightness control from users in the video group
''); '';
}; };
}; };

View File

@ -13,13 +13,13 @@ in
]; ];
options.hardware.ckb-next = { options.hardware.ckb-next = {
enable = mkEnableOption (lib.mdDoc "the Corsair keyboard/mouse driver"); enable = mkEnableOption "the Corsair keyboard/mouse driver";
gid = mkOption { gid = mkOption {
type = types.nullOr types.int; type = types.nullOr types.int;
default = null; default = null;
example = 100; example = 100;
description = lib.mdDoc '' description = ''
Limit access to the ckb daemon to a particular group. Limit access to the ckb daemon to a particular group.
''; '';
}; };

View File

@ -7,24 +7,24 @@ let
in in
{ {
options.programs.corectrl = { options.programs.corectrl = {
enable = mkEnableOption (lib.mdDoc '' enable = mkEnableOption ''
CoreCtrl, a tool to overclock amd graphics cards and processors. CoreCtrl, 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 Add your user to the corectrl group to run corectrl without needing to enter your password
''); '';
package = mkPackageOption pkgs "corectrl" { package = mkPackageOption pkgs "corectrl" {
extraDescription = "Useful for overriding the configuration options used for the package."; extraDescription = "Useful for overriding the configuration options used for the package.";
}; };
gpuOverclock = { gpuOverclock = {
enable = mkEnableOption (lib.mdDoc '' enable = mkEnableOption ''
GPU overclocking GPU overclocking
''); '';
ppfeaturemask = mkOption { ppfeaturemask = mkOption {
type = types.str; type = types.str;
default = "0xfffd7fff"; default = "0xfffd7fff";
example = "0xffffffff"; example = "0xffffffff";
description = lib.mdDoc '' description = ''
Sets the `amdgpu.ppfeaturemask` kernel option. Sets the `amdgpu.ppfeaturemask` kernel option.
In particular, it is used here to set the overdrive bit. In particular, it is used here to set the overdrive bit.
Default is `0xfffd7fff` as it is less likely to cause flicker issues. Default is `0xfffd7fff` as it is less likely to cause flicker issues.

View File

@ -11,7 +11,7 @@ with lib;
hardware.cpu.amd.updateMicrocode = mkOption { hardware.cpu.amd.updateMicrocode = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Update the CPU microcode for AMD processors. Update the CPU microcode for AMD processors.
''; '';
}; };

View File

@ -5,19 +5,19 @@ let
cfgSevGuest = config.hardware.cpu.amd.sevGuest; cfgSevGuest = config.hardware.cpu.amd.sevGuest;
optionsFor = device: group: { optionsFor = device: group: {
enable = mkEnableOption (lib.mdDoc "access to the AMD ${device} device"); enable = mkEnableOption "access to the AMD ${device} device";
user = mkOption { user = mkOption {
description = lib.mdDoc "Owner to assign to the ${device} device."; description = "Owner to assign to the ${device} device.";
type = types.str; type = types.str;
default = "root"; default = "root";
}; };
group = mkOption { group = mkOption {
description = lib.mdDoc "Group to assign to the ${device} device."; description = "Group to assign to the ${device} device.";
type = types.str; type = types.str;
default = group; default = group;
}; };
mode = mkOption { mode = mkOption {
description = lib.mdDoc "Mode to set for the ${device} device."; description = "Mode to set for the ${device} device.";
type = types.str; type = types.str;
default = "0660"; default = "0660";
}; };

View File

@ -11,7 +11,7 @@ with lib;
hardware.cpu.intel.updateMicrocode = mkOption { hardware.cpu.intel.updateMicrocode = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Update the CPU microcode for Intel processors. Update the CPU microcode for Intel processors.
''; '';
}; };

View File

@ -6,7 +6,7 @@ let
in in
{ {
options.hardware.cpu.intel.sgx.enableDcapCompat = mkOption { options.hardware.cpu.intel.sgx.enableDcapCompat = mkOption {
description = lib.mdDoc '' description = ''
Whether to enable backward compatibility for SGX software build for the Whether to enable backward compatibility for SGX software build for the
out-of-tree Intel SGX DCAP driver. out-of-tree Intel SGX DCAP driver.
@ -20,19 +20,19 @@ in
}; };
options.hardware.cpu.intel.sgx.provision = { options.hardware.cpu.intel.sgx.provision = {
enable = mkEnableOption (lib.mdDoc "access to the Intel SGX provisioning device"); enable = mkEnableOption "access to the Intel SGX provisioning device";
user = mkOption { user = mkOption {
description = lib.mdDoc "Owner to assign to the SGX provisioning device."; description = "Owner to assign to the SGX provisioning device.";
type = types.str; type = types.str;
default = "root"; default = "root";
}; };
group = mkOption { group = mkOption {
description = lib.mdDoc "Group to assign to the SGX provisioning device."; description = "Group to assign to the SGX provisioning device.";
type = types.str; type = types.str;
default = defaultPrvGroup; default = defaultPrvGroup;
}; };
mode = mkOption { mode = mkOption {
description = lib.mdDoc "Mode to set for the SGX provisioning device."; description = "Mode to set for the SGX provisioning device.";
type = types.str; type = types.str;
default = "0660"; default = "0660";
}; };

View File

@ -5,7 +5,7 @@
}: }:
let let
inherit (builtins) hasAttr; inherit (builtins) hasAttr;
inherit (lib) mkIf mdDoc; inherit (lib) mkIf;
cfg = config.hardware.cpu.x86.msr; cfg = config.hardware.cpu.x86.msr;
opt = options.hardware.cpu.x86.msr; opt = options.hardware.cpu.x86.msr;
defaultGroup = "msr"; defaultGroup = "msr";
@ -28,24 +28,24 @@ let
in in
{ {
options.hardware.cpu.x86.msr = with lib.options; with lib.types; { options.hardware.cpu.x86.msr = with lib.options; with lib.types; {
enable = mkEnableOption (mdDoc "the `msr` (Model-Specific Registers) kernel module and configure `udev` rules for its devices (usually `/dev/cpu/*/msr`)"); enable = mkEnableOption "the `msr` (Model-Specific Registers) kernel module and configure `udev` rules for its devices (usually `/dev/cpu/*/msr`)";
owner = mkOption { owner = mkOption {
type = str; type = str;
default = "root"; default = "root";
example = "nobody"; example = "nobody";
description = mdDoc "Owner ${set}"; description = "Owner ${set}";
}; };
group = mkOption { group = mkOption {
type = str; type = str;
default = defaultGroup; default = defaultGroup;
example = "nobody"; example = "nobody";
description = mdDoc "Group ${set}"; description = "Group ${set}";
}; };
mode = mkOption { mode = mkOption {
type = str; type = str;
default = "0640"; default = "0640";
example = "0660"; example = "0660";
description = mdDoc "Mode ${set}"; description = "Mode ${set}";
}; };
settings = mkOption { settings = mkOption {
type = submodule { type = submodule {

View File

@ -9,7 +9,7 @@ let
options = { options = {
name = mkOption { name = mkOption {
type = types.str; type = types.str;
description = lib.mdDoc '' description = ''
Name of this overlay Name of this overlay
''; '';
}; };
@ -18,14 +18,14 @@ let
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "*rpi*.dtb"; example = "*rpi*.dtb";
description = lib.mdDoc '' description = ''
Only apply to .dtb files matching glob expression. Only apply to .dtb files matching glob expression.
''; '';
}; };
dtsFile = mkOption { dtsFile = mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;
description = lib.mdDoc '' description = ''
Path to .dts overlay file, overlay is applied to Path to .dts overlay file, overlay is applied to
each .dtb file matching "compatible" of the overlay. each .dtb file matching "compatible" of the overlay.
''; '';
@ -36,7 +36,7 @@ let
dtsText = mkOption { dtsText = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
description = lib.mdDoc '' description = ''
Literal DTS contents, overlay is applied to Literal DTS contents, overlay is applied to
each .dtb file matching "compatible" of the overlay. each .dtb file matching "compatible" of the overlay.
''; '';
@ -58,7 +58,7 @@ let
dtboFile = mkOption { dtboFile = mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;
default = null; default = null;
description = lib.mdDoc '' description = ''
Path to .dtbo compiled overlay file. Path to .dtbo compiled overlay file.
''; '';
}; };
@ -105,7 +105,7 @@ in
enable = mkOption { enable = mkOption {
default = pkgs.stdenv.hostPlatform.linux-kernel.DTB or false; default = pkgs.stdenv.hostPlatform.linux-kernel.DTB or false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Build device tree files. These are used to describe the Build device tree files. These are used to describe the
non-discoverable hardware of a system. non-discoverable hardware of a system.
''; '';
@ -116,7 +116,7 @@ in
defaultText = literalExpression "config.boot.kernelPackages.kernel"; defaultText = literalExpression "config.boot.kernelPackages.kernel";
example = literalExpression "pkgs.linux_latest"; example = literalExpression "pkgs.linux_latest";
type = types.path; type = types.path;
description = lib.mdDoc '' description = ''
Kernel package where device tree include directory is from. Also used as default source of dtb package to apply overlays to Kernel package where device tree include directory is from. Also used as default source of dtb package to apply overlays to
''; '';
}; };
@ -125,7 +125,7 @@ in
default = []; default = [];
example = literalExpression "[ \"-DMY_DTB_DEFINE\" ]"; example = literalExpression "[ \"-DMY_DTB_DEFINE\" ]";
type = types.listOf types.str; type = types.listOf types.str;
description = lib.mdDoc '' description = ''
Additional flags to pass to the preprocessor during dtbo compilations Additional flags to pass to the preprocessor during dtbo compilations
''; '';
}; };
@ -139,7 +139,7 @@ in
] ]
''; '';
type = types.listOf types.path; type = types.listOf types.path;
description = lib.mdDoc '' description = ''
Additional include paths that will be passed to the preprocessor when creating the final .dts to compile into .dtbo Additional include paths that will be passed to the preprocessor when creating the final .dts to compile into .dtbo
''; '';
}; };
@ -148,7 +148,7 @@ in
default = "${cfg.kernelPackage}/dtbs"; default = "${cfg.kernelPackage}/dtbs";
defaultText = literalExpression "\${cfg.kernelPackage}/dtbs"; defaultText = literalExpression "\${cfg.kernelPackage}/dtbs";
type = types.path; type = types.path;
description = lib.mdDoc '' description = ''
Path to dtb directory that overlays and other processing will be applied to. Uses Path to dtb directory that overlays and other processing will be applied to. Uses
device trees bundled with the Linux kernel by default. device trees bundled with the Linux kernel by default.
''; '';
@ -158,7 +158,7 @@ in
default = null; default = null;
example = "some-dtb.dtb"; example = "some-dtb.dtb";
type = types.nullOr types.str; type = types.nullOr types.str;
description = lib.mdDoc '' description = ''
The name of an explicit dtb to be loaded, relative to the dtb base. The name of an explicit dtb to be loaded, relative to the dtb base.
Useful in extlinux scenarios if the bootloader doesn't pick the Useful in extlinux scenarios if the bootloader doesn't pick the
right .dtb file from FDTDIR. right .dtb file from FDTDIR.
@ -169,7 +169,7 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "*rpi*.dtb"; example = "*rpi*.dtb";
description = lib.mdDoc '' description = ''
Only include .dtb files matching glob expression. Only include .dtb files matching glob expression.
''; '';
}; };
@ -190,7 +190,7 @@ in
filter = null; filter = null;
dtboFile = path; dtboFile = path;
}) overlayType); }) overlayType);
description = lib.mdDoc '' description = ''
List of overlays to apply to base device-tree (.dtb) files. List of overlays to apply to base device-tree (.dtb) files.
''; '';
}; };
@ -199,7 +199,7 @@ in
default = null; default = null;
type = types.nullOr types.path; type = types.nullOr types.path;
internal = true; internal = true;
description = lib.mdDoc '' description = ''
A path containing the result of applying `overlays` to `kernelPackage`. A path containing the result of applying `overlays` to `kernelPackage`.
''; '';
}; };

View File

@ -11,7 +11,7 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Enables udev rules for Digital Bitbox devices. Enables udev rules for Digital Bitbox devices.
''; '';
}; };

View File

@ -9,7 +9,7 @@ let
in in
{ {
options.hardware.flipperzero.enable = mkEnableOption (mdDoc "udev rules and software for Flipper Zero devices"); options.hardware.flipperzero.enable = mkEnableOption "udev rules and software for Flipper Zero devices";
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.qFlipper ]; environment.systemPackages = [ pkgs.qFlipper ];

View File

@ -3,7 +3,7 @@ let
cfg = config.hardware.flirc; cfg = config.hardware.flirc;
in in
{ {
options.hardware.flirc.enable = lib.mkEnableOption (lib.mdDoc "software to configure a Flirc USB device"); options.hardware.flirc.enable = lib.mkEnableOption "software to configure a Flirc USB device";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.flirc ]; environment.systemPackages = [ pkgs.flirc ];

View File

@ -7,7 +7,7 @@ let
in in
{ {
options.hardware.gkraken = { options.hardware.gkraken = {
enable = mkEnableOption (lib.mdDoc "gkraken's udev rules for NZXT AIO liquid coolers"); enable = mkEnableOption "gkraken's udev rules for NZXT AIO liquid coolers";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {

View File

@ -9,7 +9,7 @@ in
enable = lib.mkOption { enable = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Enables Glasgow udev rules and ensures 'plugdev' group exists. Enables Glasgow udev rules and ensures 'plugdev' group exists.
This is a prerequisite to using Glasgow without being root. This is a prerequisite to using Glasgow without being root.
''; '';

View File

@ -28,7 +28,7 @@ let
cfg = config.hardware.gpgSmartcards; cfg = config.hardware.gpgSmartcards;
in { in {
options.hardware.gpgSmartcards = { options.hardware.gpgSmartcards = {
enable = mkEnableOption (lib.mdDoc "udev rules for gnupg smart cards"); enable = mkEnableOption "udev rules for gnupg smart cards";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {

View File

@ -9,7 +9,7 @@ in
enable = lib.mkOption { enable = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Enables hackrf udev rules and ensures 'plugdev' group exists. Enables hackrf udev rules and ensures 'plugdev' group exists.
This is a prerequisite to using HackRF devices without being root, since HackRF USB descriptors will be owned by plugdev through udev. This is a prerequisite to using HackRF devices without being root, since HackRF USB descriptors will be owned by plugdev through udev.
''; '';

View File

@ -8,16 +8,16 @@ in
{ {
options.hardware.i2c = { options.hardware.i2c = {
enable = mkEnableOption (lib.mdDoc '' enable = mkEnableOption ''
i2c devices support. By default access is granted to users in the "i2c" 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 group (will be created if non-existent) and any user with a seat, meaning
logged on the computer locally logged on the computer locally
''); '';
group = mkOption { group = mkOption {
type = types.str; type = types.str;
default = "i2c"; default = "i2c";
description = lib.mdDoc '' description = ''
Grant access to i2c devices (/dev/i2c-*) to users in this group. Grant access to i2c devices (/dev/i2c-*) to users in this group.
''; '';
}; };

View File

@ -36,7 +36,7 @@ in
type = with types; listOf str; type = with types; listOf str;
default = []; default = [];
example = [ "0xe8ebd30000eee2e1" ]; example = [ "0xe8ebd30000eee2e1" ];
description = lib.mdDoc '' description = ''
A list of infiniband port guids on the system. This is discoverable using `ibstat -p` A list of infiniband port guids on the system. This is discoverable using `ibstat -p`
''; '';
}; };

View File

@ -2,12 +2,12 @@
let let
cfg = config.hardware.keyboard.qmk; cfg = config.hardware.keyboard.qmk;
inherit (lib) mdDoc mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
in in
{ {
options.hardware.keyboard.qmk = { options.hardware.keyboard.qmk = {
enable = mkEnableOption (mdDoc "non-root access to the firmware of QMK keyboards"); enable = mkEnableOption "non-root access to the firmware of QMK keyboards";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {

View File

@ -2,12 +2,12 @@
let let
cfg = config.hardware.keyboard.teck; cfg = config.hardware.keyboard.teck;
inherit (lib) mdDoc mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
in in
{ {
options.hardware.keyboard.teck = { options.hardware.keyboard.teck = {
enable = mkEnableOption (mdDoc "non-root access to the firmware of TECK keyboards"); enable = mkEnableOption "non-root access to the firmware of TECK keyboards";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {

View File

@ -2,17 +2,17 @@
let let
cfg = config.hardware.keyboard.uhk; cfg = config.hardware.keyboard.uhk;
inherit (lib) mdDoc mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
in in
{ {
options.hardware.keyboard.uhk = { options.hardware.keyboard.uhk = {
enable = mkEnableOption (mdDoc '' enable = mkEnableOption ''
non-root access to the firmware of UHK keyboards. non-root access to the firmware of UHK keyboards.
You need it when you want to flash a new firmware on the keyboard. 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. Access to the keyboard is granted to users in the "input" group.
You may want to install the uhk-agent package You may want to install the uhk-agent package
''); '';
}; };

View File

@ -2,17 +2,17 @@
let let
cfg = config.hardware.keyboard.zsa; cfg = config.hardware.keyboard.zsa;
inherit (lib) mkEnableOption mkIf mdDoc; inherit (lib) mkEnableOption mkIf;
in in
{ {
options.hardware.keyboard.zsa = { options.hardware.keyboard.zsa = {
enable = mkEnableOption (mdDoc '' enable = mkEnableOption ''
udev rules for keyboards from ZSA like the ErgoDox EZ, Planck EZ and Moonlander Mark I. udev rules for keyboards from ZSA like the ErgoDox EZ, Planck EZ and Moonlander Mark I.
You need it when you want to flash a new configuration on the keyboard You need it when you want to flash a new configuration on the keyboard
or use their live training in the browser. or use their live training in the browser.
You may want to install the wally-cli package You may want to install the wally-cli package
''); '';
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {

View File

@ -11,11 +11,11 @@ in {
]; ];
options.hardware.ksm = { options.hardware.ksm = {
enable = mkEnableOption (lib.mdDoc "Linux kernel Same-Page Merging"); enable = mkEnableOption "Linux kernel Same-Page Merging";
sleep = mkOption { sleep = mkOption {
type = types.nullOr types.int; type = types.nullOr types.int;
default = null; default = null;
description = lib.mdDoc '' description = ''
How many milliseconds ksmd should sleep between scans. How many milliseconds ksmd should sleep between scans.
Setting it to `null` uses the kernel's default time. Setting it to `null` uses the kernel's default time.
''; '';

View File

@ -6,7 +6,7 @@ let
cfg = config.hardware.ledger; cfg = config.hardware.ledger;
in { in {
options.hardware.ledger.enable = mkEnableOption (lib.mdDoc "udev rules for Ledger devices"); options.hardware.ledger.enable = mkEnableOption "udev rules for Ledger devices";
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.udev.packages = [ pkgs.ledger-udev-rules ]; services.udev.packages = [ pkgs.ledger-udev-rules ];

View File

@ -19,12 +19,12 @@ in
options.hardware.logitech = { options.hardware.logitech = {
lcd = { lcd = {
enable = mkEnableOption (lib.mdDoc "support for Logitech LCD Devices"); enable = mkEnableOption "support for Logitech LCD Devices";
startWhenNeeded = mkOption { startWhenNeeded = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
Only run the service when an actual supported device is plugged. Only run the service when an actual supported device is plugged.
''; '';
}; };
@ -32,7 +32,7 @@ in
devices = mkOption { devices = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = [ "0a07" "c222" "c225" "c227" "c251" ]; default = [ "0a07" "c222" "c225" "c227" "c251" ];
description = lib.mdDoc '' description = ''
List of USB device ids supported by g15daemon. List of USB device ids supported by g15daemon.
You most likely do not need to change this. You most likely do not need to change this.
@ -41,12 +41,12 @@ in
}; };
wireless = { wireless = {
enable = mkEnableOption (lib.mdDoc "support for Logitech Wireless Devices"); enable = mkEnableOption "support for Logitech Wireless Devices";
enableGraphical = mkOption { enableGraphical = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc "Enable graphical support applications."; description = "Enable graphical support applications.";
}; };
}; };
}; };

View File

@ -10,7 +10,7 @@ with lib;
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Enable the Machine Check Exception logger. Enable the Machine Check Exception logger.
''; '';
}; };

View File

@ -14,7 +14,7 @@ in
options.networking.wireless.athUserRegulatoryDomain = mkOption { options.networking.wireless.athUserRegulatoryDomain = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
If enabled, sets the ATH_USER_REGD kernel config switch to true to If enabled, sets the ATH_USER_REGD kernel config switch to true to
disable the enforcement of EEPROM regulatory restrictions for ath disable the enforcement of EEPROM regulatory restrictions for ath
drivers. Requires at least Linux ${linuxKernelMinVersion}. drivers. Requires at least Linux ${linuxKernelMinVersion}.

View File

@ -13,7 +13,7 @@ let kernelVersion = config.boot.kernelPackages.kernel.version; in
networking.enableB43Firmware = mkOption { networking.enableB43Firmware = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Turn on this option if you want firmware for the NICs supported by the b43 module. Turn on this option if you want firmware for the NICs supported by the b43 module.
''; '';
}; };

View File

@ -9,7 +9,7 @@
networking.enableIntel2200BGFirmware = lib.mkOption { networking.enableIntel2200BGFirmware = lib.mkOption {
default = false; default = false;
type = lib.types.bool; type = lib.types.bool;
description = lib.mdDoc '' description = ''
Turn on this option if you want firmware for the Intel Turn on this option if you want firmware for the Intel
PRO/Wireless 2200BG to be loaded automatically. This is PRO/Wireless 2200BG to be loaded automatically. This is
required if you want to use this device. required if you want to use this device.

View File

@ -10,7 +10,7 @@ in {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Enables improved Linux module drivers for Logitech driving wheels. Enables improved Linux module drivers for Logitech driving wheels.
This will replace the existing in-kernel hid-logitech modules. This will replace the existing in-kernel hid-logitech modules.
Works most notably on the Logitech G25, G27, G29 and Driving Force (GT). Works most notably on the Logitech G25, G27, G29 and Driving Force (GT).

View File

@ -13,7 +13,7 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Enables udev rules for Nitrokey devices. By default grants access Enables udev rules for Nitrokey devices. By default grants access
to users in the "nitrokey" group. You may want to install the to users in the "nitrokey" group. You may want to install the
nitrokey-app package, depending on your device and needs. nitrokey-app package, depending on your device and needs.

View File

@ -12,7 +12,7 @@ with lib;
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Enable OnlyKey device (https://crp.to/p/) support. Enable OnlyKey device (https://crp.to/p/) support.
''; '';
}; };

View File

@ -33,7 +33,7 @@ in
hardware.opengl = { hardware.opengl = {
enable = mkOption { enable = mkOption {
description = lib.mdDoc '' description = ''
Whether to enable OpenGL drivers. This is needed to enable Whether to enable OpenGL drivers. This is needed to enable
OpenGL support in X11 systems, as well as for Wayland compositors OpenGL support in X11 systems, as well as for Wayland compositors
like sway and Weston. It is enabled by default like sway and Weston. It is enabled by default
@ -49,7 +49,7 @@ in
driSupport = mkOption { driSupport = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
Whether to enable accelerated OpenGL rendering through the Whether to enable accelerated OpenGL rendering through the
Direct Rendering Interface (DRI). Direct Rendering Interface (DRI).
''; '';
@ -58,7 +58,7 @@ in
driSupport32Bit = mkOption { driSupport32Bit = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
On 64-bit systems, whether to support Direct Rendering for On 64-bit systems, whether to support Direct Rendering for
32-bit applications (such as Wine). This is currently only 32-bit applications (such as Wine). This is currently only
supported for the `nvidia` as well as supported for the `nvidia` as well as
@ -69,7 +69,7 @@ in
package = mkOption { package = mkOption {
type = types.package; type = types.package;
internal = true; internal = true;
description = lib.mdDoc '' description = ''
The package that provides the OpenGL implementation. The package that provides the OpenGL implementation.
''; '';
}; };
@ -77,7 +77,7 @@ in
package32 = mkOption { package32 = mkOption {
type = types.package; type = types.package;
internal = true; internal = true;
description = lib.mdDoc '' description = ''
The package that provides the 32-bit OpenGL implementation on The package that provides the 32-bit OpenGL implementation on
64-bit systems. Used when {option}`driSupport32Bit` is 64-bit systems. Used when {option}`driSupport32Bit` is
set. set.
@ -88,7 +88,7 @@ in
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = [];
example = literalExpression "with pkgs; [ intel-media-driver intel-ocl intel-vaapi-driver ]"; example = literalExpression "with pkgs; [ intel-media-driver intel-ocl intel-vaapi-driver ]";
description = lib.mdDoc '' description = ''
Additional packages to add to OpenGL drivers. Additional packages to add to OpenGL drivers.
This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc. This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc.
@ -102,7 +102,7 @@ in
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = [];
example = literalExpression "with pkgs.pkgsi686Linux; [ intel-media-driver intel-vaapi-driver ]"; example = literalExpression "with pkgs.pkgsi686Linux; [ intel-media-driver intel-vaapi-driver ]";
description = lib.mdDoc '' description = ''
Additional packages to add to 32-bit OpenGL drivers on 64-bit systems. Additional packages to add to 32-bit OpenGL drivers on 64-bit systems.
Used when {option}`driSupport32Bit` is set. This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc. Used when {option}`driSupport32Bit` is set. This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc.
@ -116,7 +116,7 @@ in
type = types.bool; type = types.bool;
internal = true; internal = true;
default = false; default = false;
description = lib.mdDoc '' description = ''
Whether the `LD_LIBRARY_PATH` environment variable Whether the `LD_LIBRARY_PATH` environment variable
should be set to the locations of driver libraries. Drivers which should be set to the locations of driver libraries. Drivers which
rely on overriding libraries should set this to true. Drivers which rely on overriding libraries should set this to true. Drivers which

View File

@ -49,14 +49,14 @@ in
{ {
options = { options = {
hardware.openrazer = { hardware.openrazer = {
enable = mkEnableOption (lib.mdDoc '' enable = mkEnableOption ''
OpenRazer drivers and userspace daemon OpenRazer drivers and userspace daemon
''); '';
verboseLogging = mkOption { verboseLogging = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Whether to enable verbose logging. Logs debug messages. Whether to enable verbose logging. Logs debug messages.
''; '';
}; };
@ -64,7 +64,7 @@ in
syncEffectsEnabled = mkOption { syncEffectsEnabled = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
Set the sync effects flag to true so any assignment of Set the sync effects flag to true so any assignment of
effects will work across devices. effects will work across devices.
''; '';
@ -73,7 +73,7 @@ in
devicesOffOnScreensaver = mkOption { devicesOffOnScreensaver = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
Turn off the devices when the systems screensaver kicks in. Turn off the devices when the systems screensaver kicks in.
''; '';
}; };
@ -81,7 +81,7 @@ in
mouseBatteryNotifier = mkOption { mouseBatteryNotifier = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = lib.mdDoc '' description = ''
Mouse battery notifier. Mouse battery notifier.
''; '';
}; };
@ -89,7 +89,7 @@ in
keyStatistics = mkOption { keyStatistics = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Collects number of keypresses per hour per key used to Collects number of keypresses per hour per key used to
generate a heatmap. generate a heatmap.
''; '';
@ -98,7 +98,7 @@ in
users = mkOption { users = mkOption {
type = with types; listOf str; type = with types; listOf str;
default = []; default = [];
description = lib.mdDoc '' description = ''
Usernames to be added to the "openrazer" group, so that they Usernames to be added to the "openrazer" group, so that they
can start and interact with the OpenRazer userspace daemon. can start and interact with the OpenRazer userspace daemon.
''; '';

View File

@ -12,7 +12,7 @@ in
enable = mkOption { enable = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Enable OpenTabletDriver udev rules, user service and blacklist kernel Enable OpenTabletDriver udev rules, user service and blacklist kernel
modules known to conflict with OpenTabletDriver. modules known to conflict with OpenTabletDriver.
''; '';
@ -21,7 +21,7 @@ in
blacklistedKernelModules = mkOption { blacklistedKernelModules = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = [ "hid-uclogic" "wacom" ]; default = [ "hid-uclogic" "wacom" ];
description = lib.mdDoc '' description = ''
Blacklist of kernel modules known to conflict with OpenTabletDriver. Blacklist of kernel modules known to conflict with OpenTabletDriver.
''; '';
}; };
@ -32,7 +32,7 @@ in
enable = mkOption { enable = mkOption {
default = true; default = true;
type = types.bool; type = types.bool;
description = lib.mdDoc '' description = ''
Whether to start OpenTabletDriver daemon as a systemd user service. Whether to start OpenTabletDriver daemon as a systemd user service.
''; '';
}; };

View File

@ -20,7 +20,7 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Enable this option to support PCMCIA card. Enable this option to support PCMCIA card.
''; '';
}; };
@ -28,7 +28,7 @@ in
firmware = mkOption { firmware = mkOption {
type = types.listOf types.path; type = types.listOf types.path;
default = []; default = [];
description = lib.mdDoc '' description = ''
List of firmware used to handle specific PCMCIA card. List of firmware used to handle specific PCMCIA card.
''; '';
}; };
@ -36,7 +36,7 @@ in
config = mkOption { config = mkOption {
default = null; default = null;
type = types.nullOr types.path; type = types.nullOr types.path;
description = lib.mdDoc '' description = ''
Path to the configuration file which maps the memory, IRQs Path to the configuration file which maps the memory, IRQs
and ports used by the PCMCIA hardware. and ports used by the PCMCIA hardware.
''; '';

View File

@ -35,12 +35,12 @@ in {
ensureDefaultPrinter = mkOption { ensureDefaultPrinter = mkOption {
type = types.nullOr printerName; type = types.nullOr printerName;
default = null; default = null;
description = lib.mdDoc '' description = ''
Ensures the named printer is the default CUPS printer / printer queue. Ensures the named printer is the default CUPS printer / printer queue.
''; '';
}; };
ensurePrinters = mkOption { ensurePrinters = mkOption {
description = lib.mdDoc '' description = ''
Will regularly ensure that the given CUPS printers are configured as declared here. Will regularly ensure that the given CUPS printers are configured as declared here.
If a printer's options are manually changed afterwards, they will be overwritten eventually. If a printer's options are manually changed afterwards, they will be overwritten eventually.
This option will never delete any printer, even if removed from this list. This option will never delete any printer, even if removed from this list.
@ -54,7 +54,7 @@ in {
name = mkOption { name = mkOption {
type = printerName; type = printerName;
example = "BrotherHL_Workroom"; example = "BrotherHL_Workroom";
description = lib.mdDoc '' description = ''
Name of the printer / printer queue. Name of the printer / printer queue.
May contain any printable characters except "/", "#", and space. May contain any printable characters except "/", "#", and space.
''; '';
@ -63,7 +63,7 @@ in {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "Workroom"; example = "Workroom";
description = lib.mdDoc '' description = ''
Optional human-readable location. Optional human-readable location.
''; '';
}; };
@ -71,7 +71,7 @@ in {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "Brother HL-5140"; example = "Brother HL-5140";
description = lib.mdDoc '' description = ''
Optional human-readable description. Optional human-readable description.
''; '';
}; };
@ -81,7 +81,7 @@ in {
"ipp://printserver.local/printers/BrotherHL_Workroom" "ipp://printserver.local/printers/BrotherHL_Workroom"
"usb://HP/DESKJET%20940C?serial=CN16E6C364BH" "usb://HP/DESKJET%20940C?serial=CN16E6C364BH"
''; '';
description = lib.mdDoc '' description = ''
How to reach the printer. How to reach the printer.
{command}`lpinfo -v` shows a list of supported device URIs and schemes. {command}`lpinfo -v` shows a list of supported device URIs and schemes.
''; '';
@ -91,7 +91,7 @@ in {
example = literalExpression '' example = literalExpression ''
"gutenprint.''${lib.versions.majorMinor (lib.getVersion pkgs.gutenprint)}://brother-hl-5140/expert" "gutenprint.''${lib.versions.majorMinor (lib.getVersion pkgs.gutenprint)}://brother-hl-5140/expert"
''; '';
description = lib.mdDoc '' description = ''
Location of the ppd driver file for the printer. Location of the ppd driver file for the printer.
{command}`lpinfo -m` shows a list of supported models. {command}`lpinfo -m` shows a list of supported models.
''; '';
@ -103,7 +103,7 @@ in {
Duplex = "DuplexNoTumble"; Duplex = "DuplexNoTumble";
}; };
default = {}; default = {};
description = lib.mdDoc '' description = ''
Sets PPD options for the printer. Sets PPD options for the printer.
{command}`lpoptions [-p printername] -l` shows supported PPD options for the given printer. {command}`lpoptions [-p printername] -l` shows supported PPD options for the given printer.
''; '';

View File

@ -48,7 +48,7 @@ in {
options = { options = {
hardware.raid.HPSmartArray = { hardware.raid.HPSmartArray = {
enable = mkEnableOption (lib.mdDoc "HP Smart Array kernel modules and CLI utility"); enable = mkEnableOption "HP Smart Array kernel modules and CLI utility";
}; };
}; };

View File

@ -8,7 +8,7 @@ in {
enable = lib.mkOption { enable = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
description = lib.mdDoc '' description = ''
Enables rtl-sdr udev rules, ensures 'plugdev' group exists, and blacklists DVB kernel modules. Enables rtl-sdr udev rules, ensures 'plugdev' group exists, and blacklists DVB kernel modules.
This is a prerequisite to using devices supported by rtl-sdr without being root, since rtl-sdr USB descriptors will be owned by plugdev through udev. This is a prerequisite to using devices supported by rtl-sdr without being root, since rtl-sdr USB descriptors will be owned by plugdev through udev.
''; '';

View File

@ -5,13 +5,13 @@ let
in in
{ {
options.hardware.saleae-logic = { options.hardware.saleae-logic = {
enable = lib.mkEnableOption (lib.mdDoc "udev rules for Saleae Logic devices"); enable = lib.mkEnableOption "udev rules for Saleae Logic devices";
package = lib.mkOption { package = lib.mkOption {
type = lib.types.package; type = lib.types.package;
default = pkgs.saleae-logic-2; default = pkgs.saleae-logic-2;
defaultText = lib.literalExpression "pkgs.saleae-logic-2"; defaultText = lib.literalExpression "pkgs.saleae-logic-2";
description = lib.mdDoc '' description = ''
Saleae Logic package to use. Saleae Logic package to use.
''; '';
}; };

View File

@ -36,12 +36,12 @@ in
meta.maintainers = with lib.maintainers; [ peterhoeg ]; meta.maintainers = with lib.maintainers; [ peterhoeg ];
options.hardware.sata.timeout = { options.hardware.sata.timeout = {
enable = mkEnableOption (lib.mdDoc "SATA drive timeouts"); enable = mkEnableOption "SATA drive timeouts";
deciSeconds = mkOption { deciSeconds = mkOption {
example = 70; example = 70;
type = types.int; type = types.int;
description = lib.mdDoc '' description = ''
Set SCT Error Recovery Control timeout in deciseconds for use in RAID configurations. Set SCT Error Recovery Control timeout in deciseconds for use in RAID configurations.
Values are as follows: Values are as follows:
@ -53,17 +53,17 @@ in
}; };
drives = mkOption { drives = mkOption {
description = lib.mdDoc "List of drives for which to configure the timeout."; description = "List of drives for which to configure the timeout.";
type = types.listOf type = types.listOf
(types.submodule { (types.submodule {
options = { options = {
name = mkOption { name = mkOption {
description = lib.mdDoc "Drive name without the full path."; description = "Drive name without the full path.";
type = types.str; type = types.str;
}; };
idBy = mkOption { idBy = mkOption {
description = lib.mdDoc "The method to identify the drive."; description = "The method to identify the drive.";
type = types.enum [ "path" "wwn" ]; type = types.enum [ "path" "wwn" ];
default = "path"; default = "path";
}; };

View File

@ -30,7 +30,7 @@ in
options = { options = {
hardware.sensor.hddtemp = { hardware.sensor.hddtemp = {
enable = mkOption { enable = mkOption {
description = lib.mdDoc '' description = ''
Enable this option to support HDD/SSD temperature sensors. Enable this option to support HDD/SSD temperature sensors.
''; '';
type = types.bool; type = types.bool;
@ -38,24 +38,24 @@ in
}; };
drives = mkOption { drives = mkOption {
description = lib.mdDoc "List of drives to monitor. If you pass /dev/disk/by-path/* entries the symlinks will be resolved as hddtemp doesn't like names with colons."; description = "List of drives to monitor. If you pass /dev/disk/by-path/* entries the symlinks will be resolved as hddtemp doesn't like names with colons.";
type = types.listOf types.str; type = types.listOf types.str;
}; };
unit = mkOption { unit = mkOption {
description = lib.mdDoc "Celsius or Fahrenheit"; description = "Celsius or Fahrenheit";
type = types.enum [ "C" "F" ]; type = types.enum [ "C" "F" ];
default = "C"; default = "C";
}; };
dbEntries = mkOption { dbEntries = mkOption {
description = lib.mdDoc "Additional DB entries"; description = "Additional DB entries";
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ ];
}; };
extraArgs = mkOption { extraArgs = mkOption {
description = lib.mdDoc "Additional arguments passed to the daemon."; description = "Additional arguments passed to the daemon.";
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ ];
}; };

View File

@ -8,7 +8,7 @@ with lib;
options = { options = {
hardware.sensor.iio = { hardware.sensor.iio = {
enable = mkOption { enable = mkOption {
description = lib.mdDoc '' description = ''
Enable this option to support IIO sensors with iio-sensor-proxy. Enable this option to support IIO sensors with iio-sensor-proxy.
IIO sensors are used for orientation and ambient light IIO sensors are used for orientation and ambient light

View File

@ -13,7 +13,7 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = lib.mdDoc "Enable udev rules for Steam hardware such as the Steam Controller, other supported controllers and the HTC Vive"; description = "Enable udev rules for Steam hardware such as the Steam Controller, other supported controllers and the HTC Vive";
}; };
}; };

Some files were not shown because too many files have changed in this diff Show More