···5455 Example:
56 mkOption { } // => { _type = "option"; }
57- mkOption { defaultText = "foo"; } // => { _type = "option"; defaultText = "foo"; }
58 */
59 mkOption =
60 {
···212 else x;
213214215- /* For use in the `example` option attribute. It causes the given
216- text to be included verbatim in documentation. This is necessary
217- for example values that are not simple values, e.g., functions.
0218 */
219- literalExample = text: { _type = "literalExample"; inherit text; };
0000000000000220221 # Helper functions.
222
···5455 Example:
56 mkOption { } // => { _type = "option"; }
57+ mkOption { default = "foo"; } // => { _type = "option"; default = "foo"; }
58 */
59 mkOption =
60 {
···212 else x;
213214215+ /* For use in the `defaultText` and `example` option attributes. Causes the
216+ given string to be rendered verbatim in the documentation as Nix code. This
217+ is necessary for complex values, e.g. functions, or values that depend on
218+ other values or packages.
219 */
220+ literalExpression = text:
221+ if ! isString text then throw "literalExpression expects a string."
222+ else { _type = "literalExpression"; inherit text; };
223+224+ literalExample = lib.warn "literalExample is deprecated, use literalExpression instead, or use literalDocBook for a non-Nix description." literalExpression;
225+226+227+ /* For use in the `defaultText` and `example` option attributes. Causes the
228+ given DocBook text to be inserted verbatim in the documentation, for when
229+ a `literalExpression` would be too hard to read.
230+ */
231+ literalDocBook = text:
232+ if ! isString text then throw "literalDocBook expects a string."
233+ else { _type = "literalDocBook"; inherit text; };
234235 # Helper functions.
236
···38 of the module will have to define the value of the option, otherwise
39 an error will be thrown.
400000000041`example`
4243: An example value that will be shown in the NixOS manual.
004445`description`
46
···38 of the module will have to define the value of the option, otherwise
39 an error will be thrown.
4041+`defaultText`
42+43+: A textual representation of the default value to be rendered verbatim in
44+ the manual. Useful if the default value is a complex expression or depends
45+ on other values or packages.
46+ Use `lib.literalExpression` for a Nix expression, `lib.literalDocBook` for
47+ a plain English description in DocBook format.
48+49`example`
5051: An example value that will be shown in the NixOS manual.
52+ You can use `lib.literalExpression` and `lib.literalDocBook` in the same way
53+ as in `defaultText`.
5455`description`
56
···59 </varlistentry>
60 <varlistentry>
61 <term>
00000000000000062 <literal>example</literal>
63 </term>
64 <listitem>
65 <para>
66- An example value that will be shown in the NixOS manual.
00067 </para>
68 </listitem>
69 </varlistentry>
···59 </varlistentry>
60 <varlistentry>
61 <term>
62+ <literal>defaultText</literal>
63+ </term>
64+ <listitem>
65+ <para>
66+ A textual representation of the default value to be rendered
67+ verbatim in the manual. Useful if the default value is a
68+ complex expression or depends on other values or packages. Use
69+ <literal>lib.literalExpression</literal> for a Nix expression,
70+ <literal>lib.literalDocBook</literal> for a plain English
71+ description in DocBook format.
72+ </para>
73+ </listitem>
74+ </varlistentry>
75+ <varlistentry>
76+ <term>
77 <literal>example</literal>
78 </term>
79 <listitem>
80 <para>
81+ An example value that will be shown in the NixOS manual. You
82+ can use <literal>lib.literalExpression</literal> and
83+ <literal>lib.literalDocBook</literal> in the same way as in
84+ <literal>defaultText</literal>.
85 </para>
86 </listitem>
87 </varlistentry>
···149 default = if config.services.jack.jackd.enable
150 then pkgs.pulseaudioFull
151 else pkgs.pulseaudio;
152- defaultText = "pkgs.pulseaudio";
153- example = literalExample "pkgs.pulseaudioFull";
154 description = ''
155 The PulseAudio derivation to use. This can be used to enable
156 features (such as JACK support, Bluetooth) via the
···161 extraModules = mkOption {
162 type = types.listOf types.package;
163 default = [];
164- example = literalExample "[ pkgs.pulseaudio-modules-bt ]";
165 description = ''
166 Extra pulseaudio modules to use. This is intended for out-of-tree
167 pulseaudio modules like extra bluetooth codecs.
···184 type = types.attrsOf types.unspecified;
185 default = {};
186 description = "Config of the pulse daemon. See <literal>man pulse-daemon.conf</literal>.";
187- example = literalExample ''{ realtime-scheduling = "yes"; }'';
188 };
189 };
190···204 allowedIpRanges = mkOption {
205 type = types.listOf types.str;
206 default = [];
207- example = literalExample ''[ "127.0.0.1" "192.168.1.0/24" ]'';
208 description = ''
209 A list of IP subnets that are allowed to stream to the server.
210 '';
···149 default = if config.services.jack.jackd.enable
150 then pkgs.pulseaudioFull
151 else pkgs.pulseaudio;
152+ defaultText = literalExpression "pkgs.pulseaudio";
153+ example = literalExpression "pkgs.pulseaudioFull";
154 description = ''
155 The PulseAudio derivation to use. This can be used to enable
156 features (such as JACK support, Bluetooth) via the
···161 extraModules = mkOption {
162 type = types.listOf types.package;
163 default = [];
164+ example = literalExpression "[ pkgs.pulseaudio-modules-bt ]";
165 description = ''
166 Extra pulseaudio modules to use. This is intended for out-of-tree
167 pulseaudio modules like extra bluetooth codecs.
···184 type = types.attrsOf types.unspecified;
185 default = {};
186 description = "Config of the pulse daemon. See <literal>man pulse-daemon.conf</literal>.";
187+ example = literalExpression ''{ realtime-scheduling = "yes"; }'';
188 };
189 };
190···204 allowedIpRanges = mkOption {
205 type = types.listOf types.str;
206 default = [];
207+ example = literalExpression ''[ "127.0.0.1" "192.168.1.0/24" ]'';
208 description = ''
209 A list of IP subnets that are allowed to stream to the server.
210 '';
+3-5
nixos/modules/config/shells-environment.nix
···136137 environment.binsh = mkOption {
138 default = "${config.system.build.binsh}/bin/sh";
139- defaultText = "\${config.system.build.binsh}/bin/sh";
140- example = literalExample ''
141- "''${pkgs.dash}/bin/dash"
142- '';
143 type = types.path;
144 visible = false;
145 description = ''
···152153 environment.shells = mkOption {
154 default = [];
155- example = literalExample "[ pkgs.bashInteractive pkgs.zsh ]";
156 description = ''
157 A list of permissible login shells for user accounts.
158 No need to mention <literal>/bin/sh</literal>
···136137 environment.binsh = mkOption {
138 default = "${config.system.build.binsh}/bin/sh";
139+ defaultText = literalExpression ''"''${config.system.build.binsh}/bin/sh"'';
140+ example = literalExpression ''"''${pkgs.dash}/bin/dash"'';
00141 type = types.path;
142 visible = false;
143 description = ''
···150151 environment.shells = mkOption {
152 default = [];
153+ example = literalExpression "[ pkgs.bashInteractive pkgs.zsh ]";
154 description = ''
155 A list of permissible login shells for user accounts.
156 No need to mention <literal>/bin/sh</literal>
···58 systemPackages = mkOption {
59 type = types.listOf types.package;
60 default = [];
61- example = literalExample "[ pkgs.firefox pkgs.thunderbird ]";
62 description = ''
63 The set of packages that appear in
64 /run/current-system/sw. These packages are
···73 defaultPackages = mkOption {
74 type = types.listOf types.package;
75 default = defaultPackages;
76- example = literalExample "[]";
77 description = ''
78- Set of default packages that aren't strictly neccessary
79 for a running system, entries can be removed for a more
80 minimal NixOS installation.
81
···58 systemPackages = mkOption {
59 type = types.listOf types.package;
60 default = [];
61+ example = literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
62 description = ''
63 The set of packages that appear in
64 /run/current-system/sw. These packages are
···73 defaultPackages = mkOption {
74 type = types.listOf types.package;
75 default = defaultPackages;
76+ example = [];
77 description = ''
78+ Set of default packages that aren't strictly necessary
79 for a running system, entries can be removed for a more
80 minimal NixOS installation.
81
+1-1
nixos/modules/config/unix-odbc-drivers.nix
···19 environment.unixODBCDrivers = mkOption {
20 type = types.listOf types.package;
21 default = [];
22- example = literalExample "with pkgs.unixODBCDrivers; [ sqlite psql ]";
23 description = ''
24 Specifies Unix ODBC drivers to be registered in
25 <filename>/etc/odbcinst.ini</filename>. You may also want to
···19 environment.unixODBCDrivers = mkOption {
20 type = types.listOf types.package;
21 default = [];
22+ example = literalExpression "with pkgs.unixODBCDrivers; [ sqlite psql ]";
23 description = ''
24 Specifies Unix ODBC drivers to be registered in
25 <filename>/etc/odbcinst.ini</filename>. You may also want to
+3-3
nixos/modules/config/users-groups.nix
···165 shell = mkOption {
166 type = types.nullOr (types.either types.shellPackage (passwdEntry types.path));
167 default = pkgs.shadow;
168- defaultText = "pkgs.shadow";
169- example = literalExample "pkgs.bashInteractive";
170 description = ''
171 The path to the user's shell. Can use shell derivations,
172 like <literal>pkgs.bashInteractive</literal>. Don’t
···291 packages = mkOption {
292 type = types.listOf types.package;
293 default = [];
294- example = literalExample "[ pkgs.firefox pkgs.thunderbird ]";
295 description = ''
296 The set of packages that should be made available to the user.
297 This is in contrast to <option>environment.systemPackages</option>,
···165 shell = mkOption {
166 type = types.nullOr (types.either types.shellPackage (passwdEntry types.path));
167 default = pkgs.shadow;
168+ defaultText = literalExpression "pkgs.shadow";
169+ example = literalExpression "pkgs.bashInteractive";
170 description = ''
171 The path to the user's shell. Can use shell derivations,
172 like <literal>pkgs.bashInteractive</literal>. Don’t
···291 packages = mkOption {
292 type = types.listOf types.package;
293 default = [];
294+ example = literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
295 description = ''
296 The set of packages that should be made available to the user.
297 This is in contrast to <option>environment.systemPackages</option>,
+1-1
nixos/modules/config/xdg/portals/wlr.nix
···37 default = { };
3839 # Example taken from the manpage
40- example = literalExample ''
41 {
42 screencast = {
43 output_name = "HDMI-A-1";
···37 default = { };
3839 # Example taken from the manpage
40+ example = literalExpression ''
41 {
42 screencast = {
43 output_name = "HDMI-A-1";
···21 each .dtb file matching "compatible" of the overlay.
22 '';
23 default = null;
24- example = literalExample "./dts/overlays.dts";
25 };
2627 dtsText = mkOption {
···31 Literal DTS contents, overlay is applied to
32 each .dtb file matching "compatible" of the overlay.
33 '';
34- example = literalExample ''
35 /dts-v1/;
36 /plugin/;
37 / {
···125126 kernelPackage = mkOption {
127 default = config.boot.kernelPackages.kernel;
128- defaultText = "config.boot.kernelPackages.kernel";
129- example = literalExample "pkgs.linux_latest";
130 type = types.path;
131 description = ''
132 Kernel package containing the base device-tree (.dtb) to boot. Uses
···156157 overlays = mkOption {
158 default = [];
159- example = literalExample ''
160 [
161 { name = "pps"; dtsFile = ./dts/pps.dts; }
162 { name = "spi";
···21 each .dtb file matching "compatible" of the overlay.
22 '';
23 default = null;
24+ example = literalExpression "./dts/overlays.dts";
25 };
2627 dtsText = mkOption {
···31 Literal DTS contents, overlay is applied to
32 each .dtb file matching "compatible" of the overlay.
33 '';
34+ example = ''
35 /dts-v1/;
36 /plugin/;
37 / {
···125126 kernelPackage = mkOption {
127 default = config.boot.kernelPackages.kernel;
128+ defaultText = literalExpression "config.boot.kernelPackages.kernel";
129+ example = literalExpression "pkgs.linux_latest";
130 type = types.path;
131 description = ''
132 Kernel package containing the base device-tree (.dtb) to boot. Uses
···156157 overlays = mkOption {
158 default = [];
159+ example = literalExpression ''
160 [
161 { name = "pps"; dtsFile = ./dts/pps.dts; }
162 { name = "spi";
+1-1
nixos/modules/hardware/digitalbitbox.nix
···19 package = mkOption {
20 type = types.package;
21 default = pkgs.digitalbitbox;
22- defaultText = "pkgs.digitalbitbox";
23 description = "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
24 };
25 };
···19 package = mkOption {
20 type = types.package;
21 default = pkgs.digitalbitbox;
22+ defaultText = literalExpression "pkgs.digitalbitbox";
23 description = "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
24 };
25 };
+2-2
nixos/modules/hardware/opengl.nix
···89 extraPackages = mkOption {
90 type = types.listOf types.package;
91 default = [];
92- example = literalExample "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau intel-ocl ]";
93 description = ''
94 Additional packages to add to OpenGL drivers. This can be used
95 to add OpenCL drivers, VA-API/VDPAU drivers etc.
···99 extraPackages32 = mkOption {
100 type = types.listOf types.package;
101 default = [];
102- example = literalExample "with pkgs.pkgsi686Linux; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]";
103 description = ''
104 Additional packages to add to 32-bit OpenGL drivers on
105 64-bit systems. Used when <option>driSupport32Bit</option> is
···89 extraPackages = mkOption {
90 type = types.listOf types.package;
91 default = [];
92+ example = literalExpression "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau intel-ocl ]";
93 description = ''
94 Additional packages to add to OpenGL drivers. This can be used
95 to add OpenCL drivers, VA-API/VDPAU drivers etc.
···99 extraPackages32 = mkOption {
100 type = types.listOf types.package;
101 default = [];
102+ example = literalExpression "with pkgs.pkgsi686Linux; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]";
103 description = ''
104 Additional packages to add to 32-bit OpenGL drivers on
105 64-bit systems. Used when <option>driSupport32Bit</option> is
···72 };
73 deviceUri = mkOption {
74 type = types.str;
75- example = [
76 "ipp://printserver.local/printers/BrotherHL_Workroom"
77 "usb://HP/DESKJET%20940C?serial=CN16E6C364BH"
78- ];
79 description = ''
80 How to reach the printer.
81 <command>lpinfo -v</command> shows a list of supported device URIs and schemes.
···83 };
84 model = mkOption {
85 type = types.str;
86- example = literalExample ''
87- gutenprint.''${lib.versions.majorMinor (lib.getVersion pkgs.gutenprint)}://brother-hl-5140/expert
88 '';
89 description = ''
90 Location of the ppd driver file for the printer.
···72 };
73 deviceUri = mkOption {
74 type = types.str;
75+ example = literalExpression ''
76 "ipp://printserver.local/printers/BrotherHL_Workroom"
77 "usb://HP/DESKJET%20940C?serial=CN16E6C364BH"
78+ '';
79 description = ''
80 How to reach the printer.
81 <command>lpinfo -v</command> shows a list of supported device URIs and schemes.
···83 };
84 model = mkOption {
85 type = types.str;
86+ example = literalExpression ''
87+ "gutenprint.''${lib.versions.majorMinor (lib.getVersion pkgs.gutenprint)}://brother-hl-5140/expert"
88 '';
89 description = ''
90 Location of the ppd driver file for the printer.
+1-1
nixos/modules/hardware/sata.nix
···39 enable = mkEnableOption "SATA drive timeouts";
4041 deciSeconds = mkOption {
42- example = "70";
43 type = types.int;
44 description = ''
45 Set SCT Error Recovery Control timeout in deciseconds for use in RAID configurations.
···39 enable = mkEnableOption "SATA drive timeouts";
4041 deciSeconds = mkOption {
42+ example = 70;
43 type = types.int;
44 description = ''
45 Set SCT Error Recovery Control timeout in deciseconds for use in RAID configurations.
+2-2
nixos/modules/hardware/video/nvidia.nix
···165 hardware.nvidia.package = lib.mkOption {
166 type = lib.types.package;
167 default = config.boot.kernelPackages.nvidiaPackages.stable;
168- defaultText = "config.boot.kernelPackages.nvidiaPackages.stable";
169 description = ''
170 The NVIDIA X11 derivation to use.
171 '';
172- example = "config.boot.kernelPackages.nvidiaPackages.legacy_340";
173 };
174 };
175
···3334 packages = mkOption {
35 type = types.listOf types.path;
36- example = literalExample "[ pkgs.tiscamera ]";
37 description = ''
38 List of packages containing <command>uvcvideo</command> dynamic controls
39 rules. All files found in
···3334 packages = mkOption {
35 type = types.listOf types.path;
36+ example = literalExpression "[ pkgs.tiscamera ]";
37 description = ''
38 List of packages containing <command>uvcvideo</command> dynamic controls
39 rules. All files found in
+1-1
nixos/modules/i18n/input-method/fcitx.nix
···17 engines = mkOption {
18 type = with types; listOf fcitxEngine;
19 default = [];
20- example = literalExample "with pkgs.fcitx-engines; [ mozc hangul ]";
21 description =
22 let
23 enginesDrv = filterAttrs (const isDerivation) pkgs.fcitx-engines;
···17 engines = mkOption {
18 type = with types; listOf fcitxEngine;
19 default = [];
20+ example = literalExpression "with pkgs.fcitx-engines; [ mozc hangul ]";
21 description =
22 let
23 enginesDrv = filterAttrs (const isDerivation) pkgs.fcitx-engines;
+1-1
nixos/modules/i18n/input-method/fcitx5.nix
···12 addons = mkOption {
13 type = with types; listOf package;
14 default = [];
15- example = with pkgs; [ fcitx5-rime ];
16 description = ''
17 Enabled Fcitx5 addons.
18 '';
···528 };
529530 isoImage.contents = mkOption {
531- example = literalExample ''
532 [ { source = pkgs.memtest86 + "/memtest.bin";
533 target = "boot/memtest.bin";
534 }
···541 };
542543 isoImage.storeContents = mkOption {
544- example = literalExample "[ pkgs.stdenv ]";
545 description = ''
546 This option lists additional derivations to be included in the
547 Nix store in the generated ISO image.
···528 };
529530 isoImage.contents = mkOption {
531+ example = literalExpression ''
532 [ { source = pkgs.memtest86 + "/memtest.bin";
533 target = "boot/memtest.bin";
534 }
···541 };
542543 isoImage.storeContents = mkOption {
544+ example = literalExpression "[ pkgs.stdenv ]";
545 description = ''
546 This option lists additional derivations to be included in the
547 Nix store in the generated ISO image.
+2-2
nixos/modules/installer/cd-dvd/system-tarball.nix
···15{
16 options = {
17 tarball.contents = mkOption {
18- example = literalExample ''
19 [ { source = pkgs.memtest86 + "/memtest.bin";
20 target = "boot/memtest.bin";
21 }
···28 };
2930 tarball.storeContents = mkOption {
31- example = literalExample "[ pkgs.stdenv ]";
32 description = ''
33 This option lists additional derivations to be included in the
34 Nix store in the generated ISO image.
···15{
16 options = {
17 tarball.contents = mkOption {
18+ example = literalExpression ''
19 [ { source = pkgs.memtest86 + "/memtest.bin";
20 target = "boot/memtest.bin";
21 }
···28 };
2930 tarball.storeContents = mkOption {
31+ example = literalExpression "[ pkgs.stdenv ]";
32 description = ''
33 This option lists additional derivations to be included in the
34 Nix store in the generated ISO image.
+1-1
nixos/modules/installer/netboot/netboot.nix
···9 options = {
1011 netboot.storeContents = mkOption {
12- example = literalExample "[ pkgs.stdenv ]";
13 description = ''
14 This option lists additional derivations to be included in the
15 Nix store in the generated netboot image.
···9 options = {
1011 netboot.storeContents = mkOption {
12+ example = literalExpression "[ pkgs.stdenv ]";
13 description = ''
14 This option lists additional derivations to be included in the
15 Nix store in the generated netboot image.
+4-4
nixos/modules/installer/sd-card/sd-image.nix
···4950 storePaths = mkOption {
51 type = with types; listOf package;
52- example = literalExample "[ pkgs.stdenv ]";
53 description = ''
54 Derivations to be included in the Nix store in the generated SD image.
55 '';
···107 };
108109 populateFirmwareCommands = mkOption {
110- example = literalExample "'' cp \${pkgs.myBootLoader}/u-boot.bin firmware/ ''";
111 description = ''
112 Shell commands to populate the ./firmware directory.
113 All files in that directory are copied to the
···116 };
117118 populateRootCommands = mkOption {
119- example = literalExample "''\${config.boot.loader.generic-extlinux-compatible.populateCmd} -c \${config.system.build.toplevel} -d ./files/boot''";
120 description = ''
121 Shell commands to populate the ./files directory.
122 All files in that directory are copied to the
···126 };
127128 postBuildCommands = mkOption {
129- example = literalExample "'' dd if=\${pkgs.myBootLoader}/SPL of=$img bs=1024 seek=1 conv=notrunc ''";
130 default = "";
131 description = ''
132 Shell commands to run after the image is built.
···4950 storePaths = mkOption {
51 type = with types; listOf package;
52+ example = literalExpression "[ pkgs.stdenv ]";
53 description = ''
54 Derivations to be included in the Nix store in the generated SD image.
55 '';
···107 };
108109 populateFirmwareCommands = mkOption {
110+ example = literalExpression "'' cp \${pkgs.myBootLoader}/u-boot.bin firmware/ ''";
111 description = ''
112 Shell commands to populate the ./firmware directory.
113 All files in that directory are copied to the
···116 };
117118 populateRootCommands = mkOption {
119+ example = literalExpression "''\${config.boot.loader.generic-extlinux-compatible.populateCmd} -c \${config.system.build.toplevel} -d ./files/boot''";
120 description = ''
121 Shell commands to populate the ./files directory.
122 All files in that directory are copied to the
···126 };
127128 postBuildCommands = mkOption {
129+ example = literalExpression "'' dd if=\${pkgs.myBootLoader}/SPL of=$img bs=1024 seek=1 conv=notrunc ''";
130 default = "";
131 description = ''
132 Shell commands to run after the image is built.
+2-2
nixos/modules/misc/documentation.nix
···133 extraOutputsToInstall = ["man"];
134 ignoreCollisions = true;
135 };
136- defaultText = "all man pages in config.environment.systemPackages";
137 description = ''
138 The manual pages to generate caches for if <option>generateCaches</option>
139 is enabled. Must be a path to a directory with man pages under
···211 Which extra NixOS module paths the generated NixOS's documentation should strip
212 from options.
213 '';
214- example = literalExample ''
215 # e.g. with options from modules in ''${pkgs.customModules}/nix:
216 [ pkgs.customModules ]
217 '';
···133 extraOutputsToInstall = ["man"];
134 ignoreCollisions = true;
135 };
136+ defaultText = literalDocBook "all man pages in <option>config.environment.systemPackages</option>";
137 description = ''
138 The manual pages to generate caches for if <option>generateCaches</option>
139 is enabled. Must be a path to a directory with man pages under
···211 Which extra NixOS module paths the generated NixOS's documentation should strip
212 from options.
213 '';
214+ example = literalExpression ''
215 # e.g. with options from modules in ''${pkgs.customModules}/nix:
216 [ pkgs.customModules ]
217 '';
+2-2
nixos/modules/misc/locate.nix
···25 locate = mkOption {
26 type = package;
27 default = pkgs.findutils;
28- defaultText = "pkgs.findutils";
29- example = "pkgs.mlocate";
30 description = ''
31 The locate implementation to use
32 '';
···25 locate = mkOption {
26 type = package;
27 default = pkgs.findutils;
28+ defaultText = literalExpression "pkgs.findutils";
29+ example = literalExpression "pkgs.mlocate";
30 description = ''
31 The locate implementation to use
32 '';
+9-9
nixos/modules/misc/nixpkgs.nix
···67 options.nixpkgs = {
6869 pkgs = mkOption {
70- defaultText = literalExample
71- ''import "''${nixos}/.." {
72- inherit (cfg) config overlays localSystem crossSystem;
73- }
74- '';
75 type = pkgsType;
76- example = literalExample "import <nixpkgs> {}";
77 description = ''
78 If set, the pkgs argument to all NixOS modules is the value of
79 this option, extended with <code>nixpkgs.overlays</code>, if
···109110 config = mkOption {
111 default = {};
112- example = literalExample
113 ''
114 { allowBroken = true; allowUnfree = true; }
115 '';
···125126 overlays = mkOption {
127 default = [];
128- example = literalExample
129 ''
130 [
131 (self: super: {
···158 # Make sure that the final value has all fields for sake of other modules
159 # referring to this. TODO make `lib.systems` itself use the module system.
160 apply = lib.systems.elaborate;
161- defaultText = literalExample
162 ''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
163 description = ''
164 Specifies the platform on which NixOS should be built. When
···67 options.nixpkgs = {
6869 pkgs = mkOption {
70+ defaultText = literalExpression ''
71+ import "''${nixos}/.." {
72+ inherit (cfg) config overlays localSystem crossSystem;
73+ }
74+ '';
75 type = pkgsType;
76+ example = literalExpression "import <nixpkgs> {}";
77 description = ''
78 If set, the pkgs argument to all NixOS modules is the value of
79 this option, extended with <code>nixpkgs.overlays</code>, if
···109110 config = mkOption {
111 default = {};
112+ example = literalExpression
113 ''
114 { allowBroken = true; allowUnfree = true; }
115 '';
···125126 overlays = mkOption {
127 default = [];
128+ example = literalExpression
129 ''
130 [
131 (self: super: {
···158 # Make sure that the final value has all fields for sake of other modules
159 # referring to this. TODO make `lib.systems` itself use the module system.
160 apply = lib.systems.elaborate;
161+ defaultText = literalExpression
162 ''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
163 description = ''
164 Specifies the platform on which NixOS should be built. When
+2-2
nixos/modules/programs/atop.nix
···19 package = mkOption {
20 type = types.package;
21 default = pkgs.atop;
22- defaultText = "pkgs.atop";
23 description = ''
24 Which package to use for Atop.
25 '';
···37 package = mkOption {
38 type = types.package;
39 default = config.boot.kernelPackages.netatop;
40- defaultText = "config.boot.kernelPackages.netatop";
41 description = ''
42 Which package to use for netatop.
43 '';
···19 package = mkOption {
20 type = types.package;
21 default = pkgs.atop;
22+ defaultText = literalExpression "pkgs.atop";
23 description = ''
24 Which package to use for Atop.
25 '';
···37 package = mkOption {
38 type = types.package;
39 default = config.boot.kernelPackages.netatop;
40+ defaultText = literalExpression "config.boot.kernelPackages.netatop";
41 description = ''
42 Which package to use for netatop.
43 '';
+1-1
nixos/modules/programs/captive-browser.nix
···14 package = mkOption {
15 type = types.package;
16 default = pkgs.captive-browser;
17- defaultText = "pkgs.captive-browser";
18 description = "Which package to use for captive-browser";
19 };
20
···14 package = mkOption {
15 type = types.package;
16 default = pkgs.captive-browser;
17+ defaultText = literalExpression "pkgs.captive-browser";
18 description = "Which package to use for captive-browser";
19 };
20
+2-2
nixos/modules/programs/chromium.nix
···33 for additional details.
34 '';
35 default = [];
36- example = literalExample ''
37 [
38 "chlffgpmiacpedhhbkiomidkjlcfhogd" # pushbullet
39 "mbniclmhobmnbdlbpiphghaielnnpgdp" # lightshot
···75 Make sure the selected policy is supported on Linux and your browser version.
76 '';
77 default = {};
78- example = literalExample ''
79 {
80 "BrowserSignin" = 0;
81 "SyncDisabled" = true;
···33 for additional details.
34 '';
35 default = [];
36+ example = literalExpression ''
37 [
38 "chlffgpmiacpedhhbkiomidkjlcfhogd" # pushbullet
39 "mbniclmhobmnbdlbpiphghaielnnpgdp" # lightshot
···75 Make sure the selected policy is supported on Linux and your browser version.
76 '';
77 default = {};
78+ example = literalExpression ''
79 {
80 "BrowserSignin" = 0;
81 "SyncDisabled" = true;
+1-1
nixos/modules/programs/digitalbitbox/default.nix
···19 package = mkOption {
20 type = types.package;
21 default = pkgs.digitalbitbox;
22- defaultText = "pkgs.digitalbitbox";
23 description = "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
24 };
25 };
···19 package = mkOption {
20 type = types.package;
21 default = pkgs.digitalbitbox;
22+ defaultText = literalExpression "pkgs.digitalbitbox";
23 description = "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
24 };
25 };
···23 System-wide configuration for GameMode (/etc/gamemode.ini).
24 See gamemoded(8) man page for available settings.
25 '';
26- example = literalExample ''
27 {
28 general = {
29 renice = 10;
···23 System-wide configuration for GameMode (/etc/gamemode.ini).
24 See gamemoded(8) man page for available settings.
25 '';
26+ example = literalExpression ''
27 {
28 general = {
29 renice = 10;
+2-2
nixos/modules/programs/git.nix
···14 package = mkOption {
15 type = types.package;
16 default = pkgs.git;
17- defaultText = "pkgs.git";
18- example = literalExample "pkgs.gitFull";
19 description = "The git package to use";
20 };
21
···14 package = mkOption {
15 type = types.package;
16 default = pkgs.git;
17+ defaultText = literalExpression "pkgs.git";
18+ example = literalExpression "pkgs.gitFull";
19 description = "The git package to use";
20 };
21
+1-1
nixos/modules/programs/gnupg.nix
···27 package = mkOption {
28 type = types.package;
29 default = pkgs.gnupg;
30- defaultText = "pkgs.gnupg";
31 description = ''
32 The gpg package that should be used.
33 '';
···27 package = mkOption {
28 type = types.package;
29 default = pkgs.gnupg;
30+ defaultText = literalExpression "pkgs.gnupg";
31 description = ''
32 The gpg package that should be used.
33 '';
+1-1
nixos/modules/programs/java.nix
···3435 package = mkOption {
36 default = pkgs.jdk;
37- defaultText = "pkgs.jdk";
38 description = ''
39 Java package to install. Typical values are pkgs.jdk or pkgs.jre.
40 '';
···13 '';
14 package = mkOption {
15 default = pkgs.kdeconnect;
16- defaultText = "pkgs.kdeconnect";
17 type = types.package;
18- example = literalExample "pkgs.gnomeExtensions.gsconnect";
19 description = ''
20 The package providing the implementation for kdeconnect.
21 '';
···13 '';
14 package = mkOption {
15 default = pkgs.kdeconnect;
16+ defaultText = literalExpression "pkgs.kdeconnect";
17 type = types.package;
18+ example = literalExpression "pkgs.gnomeExtensions.gsconnect";
19 description = ''
20 The package providing the implementation for kdeconnect.
21 '';
+2-1
nixos/modules/programs/less.nix
···40 configFile = mkOption {
41 type = types.nullOr types.path;
42 default = null;
43- example = literalExample "\${pkgs.my-configs}/lesskey";
44 description = ''
45 Path to lesskey configuration file.
46···91 lessopen = mkOption {
92 type = types.nullOr types.str;
93 default = "|${pkgs.lesspipe}/bin/lesspipe.sh %s";
094 description = ''
95 Before less opens a file, it first gives your input preprocessor a chance to modify the way the contents of the file are displayed.
96 '';
···40 configFile = mkOption {
41 type = types.nullOr types.path;
42 default = null;
43+ example = literalExpression ''"''${pkgs.my-configs}/lesskey"'';
44 description = ''
45 Path to lesskey configuration file.
46···91 lessopen = mkOption {
92 type = types.nullOr types.str;
93 default = "|${pkgs.lesspipe}/bin/lesspipe.sh %s";
94+ defaultText = literalExpression ''"|''${pkgs.lesspipe}/bin/lesspipe.sh %s"'';
95 description = ''
96 Before less opens a file, it first gives your input preprocessor a chance to modify the way the contents of the file are displayed.
97 '';
+1
nixos/modules/programs/mtr.nix
···20 package = mkOption {
21 type = types.package;
22 default = pkgs.mtr;
023 description = ''
24 The package to use.
25 '';
···20 package = mkOption {
21 type = types.package;
22 default = pkgs.mtr;
23+ defaultText = literalExpression "pkgs.mtr";
24 description = ''
25 The package to use.
26 '';
+13-13
nixos/modules/programs/neovim.nix
···47 configure = mkOption {
48 type = types.attrs;
49 default = {};
50- example = literalExample ''
51- configure = {
52- customRC = $''''
53 " here your custom configuration goes!
54- $'''';
55- packages.myVimPackage = with pkgs.vimPlugins; {
56- # loaded on launch
57- start = [ fugitive ];
58- # manually loadable by calling `:packadd $plugin-name`
59- opt = [ ];
60- };
61 };
062 '';
63 description = ''
64 Generate your init file from your list of plugins and custom commands.
···69 package = mkOption {
70 type = types.package;
71 default = pkgs.neovim-unwrapped;
72- defaultText = literalExample "pkgs.neovim-unwrapped";
73 description = "The package to use for the neovim binary.";
74 };
75···8283 runtime = mkOption {
84 default = {};
85- example = literalExample ''
86- runtime."ftplugin/c.vim".text = "setlocal omnifunc=v:lua.vim.lsp.omnifunc";
87 '';
88 description = ''
89 Set of files that have to be linked in <filename>runtime</filename>.
···47 configure = mkOption {
48 type = types.attrs;
49 default = {};
50+ example = literalExpression ''
51+ {
52+ customRC = '''
53 " here your custom configuration goes!
54+ ''';
55+ packages.myVimPackage = with pkgs.vimPlugins; {
56+ # loaded on launch
57+ start = [ fugitive ];
58+ # manually loadable by calling `:packadd $plugin-name`
59+ opt = [ ];
060 };
61+ }
62 '';
63 description = ''
64 Generate your init file from your list of plugins and custom commands.
···69 package = mkOption {
70 type = types.package;
71 default = pkgs.neovim-unwrapped;
72+ defaultText = literalExpression "pkgs.neovim-unwrapped";
73 description = "The package to use for the neovim binary.";
74 };
75···8283 runtime = mkOption {
84 default = {};
85+ example = literalExpression ''
86+ { "ftplugin/c.vim".text = "setlocal omnifunc=v:lua.vim.lsp.omnifunc"; }
87 '';
88 description = ''
89 Set of files that have to be linked in <filename>runtime</filename>.
+1
nixos/modules/programs/noisetorch.nix
···10 package = mkOption {
11 type = types.package;
12 default = pkgs.noisetorch;
013 description = ''
14 The noisetorch package to use.
15 '';
···10 package = mkOption {
11 type = types.package;
12 default = pkgs.noisetorch;
13+ defaultText = literalExpression "pkgs.noisetorch";
14 description = ''
15 The noisetorch package to use.
16 '';
+3-2
nixos/modules/programs/npm.nix
···14 enable = mkEnableOption "<command>npm</command> global config";
1516 package = mkOption {
17- type = types.path;
18 description = "The npm package version / flavor to use";
19 default = pkgs.nodePackages.npm;
20- example = literalExample "pkgs.nodePackages_13_x.npm";
021 };
2223 npmrc = mkOption {
···14 enable = mkEnableOption "<command>npm</command> global config";
1516 package = mkOption {
17+ type = types.package;
18 description = "The npm package version / flavor to use";
19 default = pkgs.nodePackages.npm;
20+ defaultText = literalExpression "pkgs.nodePackages.npm";
21+ example = literalExpression "pkgs.nodePackages_13_x.npm";
22 };
2324 npmrc = mkOption {
+1-1
nixos/modules/programs/proxychains.nix
···120 Proxies to be used by proxychains.
121 '';
122123- example = literalExample ''
124 { myproxy =
125 { type = "socks4";
126 host = "127.0.0.1";
···120 Proxies to be used by proxychains.
121 '';
122123+ example = literalExpression ''
124 { myproxy =
125 { type = "socks4";
126 host = "127.0.0.1";
+1-1
nixos/modules/programs/shadow.nix
···66 This must not be a store path, since the path is
67 used outside the store (in particular in /etc/passwd).
68 '';
69- example = literalExample "pkgs.zsh";
70 type = types.either types.path types.shellPackage;
71 };
72
···66 This must not be a store path, since the path is
67 used outside the store (in particular in /etc/passwd).
68 '';
69+ example = literalExpression "pkgs.zsh";
70 type = types.either types.path types.shellPackage;
71 };
72
+7-5
nixos/modules/programs/spacefm.nix
···29 terminal_su = "${pkgs.sudo}/bin/sudo";
30 graphical_su = "${pkgs.gksu}/bin/gksu";
31 };
32- example = literalExample ''{
33- tmp_dir = "/tmp";
34- terminal_su = "''${pkgs.sudo}/bin/sudo";
35- graphical_su = "''${pkgs.gksu}/bin/gksu";
36- }'';
0037 description = ''
38 The system-wide spacefm configuration.
39 Parameters to be written to <filename>/etc/spacefm/spacefm.conf</filename>.
···29 terminal_su = "${pkgs.sudo}/bin/sudo";
30 graphical_su = "${pkgs.gksu}/bin/gksu";
31 };
32+ defaultText = literalExpression ''
33+ {
34+ tmp_dir = "/tmp";
35+ terminal_su = "''${pkgs.sudo}/bin/sudo";
36+ graphical_su = "''${pkgs.gksu}/bin/gksu";
37+ }
38+ '';
39 description = ''
40 The system-wide spacefm configuration.
41 Parameters to be written to <filename>/etc/spacefm/spacefm.conf</filename>.
+4-3
nixos/modules/programs/ssh.nix
···36 askPassword = mkOption {
37 type = types.str;
38 default = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
039 description = "Program used by SSH to ask for passwords.";
40 };
41···113 agentPKCS11Whitelist = mkOption {
114 type = types.nullOr types.str;
115 default = null;
116- example = "\${pkgs.opensc}/lib/opensc-pkcs11.so";
117 description = ''
118 A pattern-list of acceptable paths for PKCS#11 shared libraries
119 that may be used with the -s option to ssh-add.
···123 package = mkOption {
124 type = types.package;
125 default = pkgs.openssh;
126- defaultText = "pkgs.openssh";
127 description = ''
128 The package used for the openssh client and daemon.
129 '';
···180 description = ''
181 The set of system-wide known SSH hosts.
182 '';
183- example = literalExample ''
184 {
185 myhost = {
186 hostNames = [ "myhost" "myhost.mydomain.com" "10.10.1.4" ];
···36 askPassword = mkOption {
37 type = types.str;
38 default = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
39+ defaultText = literalExpression ''"''${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass"'';
40 description = "Program used by SSH to ask for passwords.";
41 };
42···114 agentPKCS11Whitelist = mkOption {
115 type = types.nullOr types.str;
116 default = null;
117+ example = literalExpression ''"''${pkgs.opensc}/lib/opensc-pkcs11.so"'';
118 description = ''
119 A pattern-list of acceptable paths for PKCS#11 shared libraries
120 that may be used with the -s option to ssh-add.
···124 package = mkOption {
125 type = types.package;
126 default = pkgs.openssh;
127+ defaultText = literalExpression "pkgs.openssh";
128 description = ''
129 The package used for the openssh client and daemon.
130 '';
···181 description = ''
182 The set of system-wide known SSH hosts.
183 '';
184+ example = literalExpression ''
185 {
186 myhost = {
187 hostNames = [ "myhost" "myhost.mydomain.com" "10.10.1.4" ];
+1-1
nixos/modules/programs/ssmtp.nix
···54 <citerefentry><refentrytitle>ssmtp</refentrytitle><manvolnum>5</manvolnum></citerefentry> configuration. Refer
55 to <link xlink:href="https://linux.die.net/man/5/ssmtp.conf"/> for details on supported values.
56 '';
57- example = literalExample ''
58 {
59 Debug = true;
60 FromLineOverride = false;
···54 <citerefentry><refentrytitle>ssmtp</refentrytitle><manvolnum>5</manvolnum></citerefentry> configuration. Refer
55 to <link xlink:href="https://linux.die.net/man/5/ssmtp.conf"/> for details on supported values.
56 '';
57+ example = literalExpression ''
58 {
59 Debug = true;
60 FromLineOverride = false;
···486 extraDomainNames = mkOption {
487 type = types.listOf types.str;
488 default = [];
489- example = literalExample ''
490 [
491 "example.org"
492 "mydomain.org"
···656 to those units if they rely on the certificates being present,
657 or trigger restarts of the service if certificates get renewed.
658 '';
659- example = literalExample ''
660 {
661 "example.com" = {
662 webroot = "/var/lib/acme/acme-challenge/";
···486 extraDomainNames = mkOption {
487 type = types.listOf types.str;
488 default = [];
489+ example = literalExpression ''
490 [
491 "example.org"
492 "mydomain.org"
···656 to those units if they rely on the certificates being present,
657 or trigger restarts of the service if certificates get renewed.
658 '';
659+ example = literalExpression ''
660 {
661 "example.com" = {
662 webroot = "/var/lib/acme/acme-challenge/";
+2-2
nixos/modules/security/ca.nix
···24 security.pki.certificateFiles = mkOption {
25 type = types.listOf types.path;
26 default = [];
27- example = literalExample "[ \"\${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt\" ]";
28 description = ''
29 A list of files containing trusted root certificates in PEM
30 format. These are concatenated to form
···37 security.pki.certificates = mkOption {
38 type = types.listOf types.str;
39 default = [];
40- example = literalExample ''
41 [ '''
42 NixOS.org
43 =========
···24 security.pki.certificateFiles = mkOption {
25 type = types.listOf types.path;
26 default = [];
27+ example = literalExpression ''[ "''${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" ]'';
28 description = ''
29 A list of files containing trusted root certificates in PEM
30 format. These are concatenated to form
···37 security.pki.certificates = mkOption {
38 type = types.listOf types.str;
39 default = [];
40+ example = literalExpression ''
41 [ '''
42 NixOS.org
43 =========
+1-1
nixos/modules/security/dhparams.nix
···53 coerce = bits: { inherit bits; };
54 in attrsOf (coercedTo int coerce (submodule paramsSubmodule));
55 default = {};
56- example = lib.literalExample "{ nginx.bits = 3072; }";
57 description = ''
58 Diffie-Hellman parameters to generate.
59
···53 coerce = bits: { inherit bits; };
54 in attrsOf (coercedTo int coerce (submodule paramsSubmodule));
55 default = {};
56+ example = lib.literalExpression "{ nginx.bits = 3072; }";
57 description = ''
58 Diffie-Hellman parameters to generate.
59
+1-1
nixos/modules/security/doas.nix
···77 You can use <code>mkBefore</code> and/or <code>mkAfter</code> to ensure
78 this is the case when configuration options are merged.
79 '';
80- example = literalExample ''
81 [
82 # Allow execution of any command by any user in group doas, requiring
83 # a password and keeping any previously-defined environment variables.
···77 You can use <code>mkBefore</code> and/or <code>mkAfter</code> to ensure
78 this is the case when configuration options are merged.
79 '';
80+ example = literalExpression ''
81 [
82 # Allow execution of any command by any user in group doas, requiring
83 # a password and keeping any previously-defined environment variables.
···33 additionalSearchPaths = mkOption {
34 type = types.listOf types.package;
35 default = [];
36- example = literalExample "[ pkgs.bindfs ]";
37 description = ''
38 Additional programs to include in the search path of pam_mount.
39 Useful for example if you want to use some FUSE filesystems like bindfs.
···43 fuseMountOptions = mkOption {
44 type = types.listOf types.str;
45 default = [];
46- example = literalExample ''
47 [ "nodev" "nosuid" "force-user=%(USER)" "gid=%(USERGID)" "perms=0700" "chmod-deny" "chown-deny" "chgrp-deny" ]
48 '';
49 description = ''
···33 additionalSearchPaths = mkOption {
34 type = types.listOf types.package;
35 default = [];
36+ example = literalExpression "[ pkgs.bindfs ]";
37 description = ''
38 Additional programs to include in the search path of pam_mount.
39 Useful for example if you want to use some FUSE filesystems like bindfs.
···43 fuseMountOptions = mkOption {
44 type = types.listOf types.str;
45 default = [];
46+ example = literalExpression ''
47 [ "nodev" "nosuid" "force-user=%(USER)" "gid=%(USERGID)" "perms=0700" "chmod-deny" "chown-deny" "chgrp-deny" ]
48 '';
49 description = ''
+2-2
nixos/modules/security/sudo.nix
···45 security.sudo.package = mkOption {
46 type = types.package;
47 default = pkgs.sudo;
48- defaultText = "pkgs.sudo";
49 description = ''
50 Which package to use for `sudo`.
51 '';
···91 this is the case when configuration options are merged.
92 '';
93 default = [];
94- example = literalExample ''
95 [
96 # Allow execution of any command by all users in group sudo,
97 # requiring a password.
···45 security.sudo.package = mkOption {
46 type = types.package;
47 default = pkgs.sudo;
48+ defaultText = literalExpression "pkgs.sudo";
49 description = ''
50 Which package to use for `sudo`.
51 '';
···91 this is the case when configuration options are merged.
92 '';
93 default = [];
94+ example = literalExpression ''
95 [
96 # Allow execution of any command by all users in group sudo,
97 # requiring a password.
+2-2
nixos/modules/security/systemd-confinement.nix
···62 options.confinement.binSh = lib.mkOption {
63 type = types.nullOr types.path;
64 default = toplevelConfig.environment.binsh;
65- defaultText = "config.environment.binsh";
66- example = lib.literalExample "\${pkgs.dash}/bin/dash";
67 description = ''
68 The program to make available as <filename>/bin/sh</filename> inside
69 the chroot. If this is set to <literal>null</literal>, no
···62 options.confinement.binSh = lib.mkOption {
63 type = types.nullOr types.path;
64 default = toplevelConfig.environment.binsh;
65+ defaultText = lib.literalExpression "config.environment.binsh";
66+ example = lib.literalExpression ''"''${pkgs.dash}/bin/dash"'';
67 description = ''
68 The program to make available as <filename>/bin/sh</filename> inside
69 the chroot. If this is set to <literal>null</literal>, no
+3-4
nixos/modules/security/tpm2.nix
···26 '';
27 type = lib.types.nullOr lib.types.str;
28 default = if cfg.abrmd.enable then "tss" else "root";
29- defaultText = ''"tss" when using the userspace resource manager,'' +
30- ''"root" otherwise'';
31 };
3233 tssGroup = lib.mkOption {
···57 description = "tpm2-abrmd package to use";
58 type = lib.types.package;
59 default = pkgs.tpm2-abrmd;
60- defaultText = "pkgs.tpm2-abrmd";
61 };
62 };
63···71 description = "tpm2-pkcs11 package to use";
72 type = lib.types.package;
73 default = pkgs.tpm2-pkcs11;
74- defaultText = "pkgs.tpm2-pkcs11";
75 };
76 };
77
···39 extensionPackages = mkOption {
40 default = [];
41 type = types.listOf types.package;
42- example = literalExample "[ pkgs.mopidy-spotify ]";
43 description = ''
44 Mopidy extensions that should be loaded by the service.
45 '';
···39 extensionPackages = mkOption {
40 default = [];
41 type = types.listOf types.package;
42+ example = literalExpression "[ pkgs.mopidy-spotify ]";
43 description = ''
44 Mopidy extensions that should be loaded by the service.
45 '';
+3-3
nixos/modules/services/audio/mpd.nix
···74 musicDirectory = mkOption {
75 type = with types; either path (strMatching "(http|https|nfs|smb)://.+");
76 default = "${cfg.dataDir}/music";
77- defaultText = "\${dataDir}/music";
78 description = ''
79 The directory or NFS/SMB network share where MPD reads music from. If left
80 as the default value this directory will automatically be created before
···86 playlistDirectory = mkOption {
87 type = types.path;
88 default = "${cfg.dataDir}/playlists";
89- defaultText = "\${dataDir}/playlists";
90 description = ''
91 The directory where MPD stores playlists. If left as the default value
92 this directory will automatically be created before the MPD server starts,
···155 dbFile = mkOption {
156 type = types.nullOr types.str;
157 default = "${cfg.dataDir}/tag_cache";
158- defaultText = "\${dataDir}/tag_cache";
159 description = ''
160 The path to MPD's database. If set to <literal>null</literal> the
161 parameter is omitted from the configuration.
···74 musicDirectory = mkOption {
75 type = with types; either path (strMatching "(http|https|nfs|smb)://.+");
76 default = "${cfg.dataDir}/music";
77+ defaultText = literalExpression ''"''${dataDir}/music"'';
78 description = ''
79 The directory or NFS/SMB network share where MPD reads music from. If left
80 as the default value this directory will automatically be created before
···86 playlistDirectory = mkOption {
87 type = types.path;
88 default = "${cfg.dataDir}/playlists";
89+ defaultText = literalExpression ''"''${dataDir}/playlists"'';
90 description = ''
91 The directory where MPD stores playlists. If left as the default value
92 this directory will automatically be created before the MPD server starts,
···155 dbFile = mkOption {
156 type = types.nullOr types.str;
157 default = "${cfg.dataDir}/tag_cache";
158+ defaultText = literalExpression ''"''${dataDir}/tag_cache"'';
159 description = ''
160 The path to MPD's database. If set to <literal>null</literal> the
161 parameter is omitted from the configuration.
···206 For type <literal>meta</literal>, a list of stream names in the form <literal>/one/two/...</literal>. Don't forget the leading slash.
207 For type <literal>alsa</literal>, use an empty string.
208 '';
209- example = literalExample ''
210 "/path/to/pipe"
211 "/path/to/librespot"
212 "192.168.1.2:4444"
···226 description = ''
227 Key-value pairs that convey additional parameters about a stream.
228 '';
229- example = literalExample ''
230 # for type == "pipe":
231 {
232 mode = "create";
···254 description = ''
255 The definition for an input source.
256 '';
257- example = literalExample ''
258 {
259 mpd = {
260 type = "pipe";
···206 For type <literal>meta</literal>, a list of stream names in the form <literal>/one/two/...</literal>. Don't forget the leading slash.
207 For type <literal>alsa</literal>, use an empty string.
208 '';
209+ example = literalExpression ''
210 "/path/to/pipe"
211 "/path/to/librespot"
212 "192.168.1.2:4444"
···226 description = ''
227 Key-value pairs that convey additional parameters about a stream.
228 '';
229+ example = literalExpression ''
230 # for type == "pipe":
231 {
232 mode = "create";
···254 description = ''
255 The definition for an input source.
256 '';
257+ example = literalExpression ''
258 {
259 mpd = {
260 type = "pipe";
-1
nixos/modules/services/audio/ympd.nix
···26 type = types.str;
27 default = "localhost";
28 description = "The host where MPD is listening.";
29- example = "localhost";
30 };
3132 port = mkOption {
···26 type = types.str;
27 default = "localhost";
28 description = "The host where MPD is listening.";
029 };
3031 port = mkOption {
···203 See also the chapter about BorgBackup in the NixOS manual.
204 '';
205 default = { };
206- example = literalExample ''
207 { # for a local backup
208 rootBackup = {
209 paths = "/";
···260 archiveBaseName = mkOption {
261 type = types.strMatching "[^/{}]+";
262 default = "${globalConfig.networking.hostName}-${name}";
263- defaultText = "\${config.networking.hostName}-<name>";
264 description = ''
265 How to name the created archives. A timestamp, whose format is
266 determined by <option>dateFormat</option>, will be appended. The full
···326 you to specify a <option>passCommand</option>
327 or a <option>passphrase</option>.
328 '';
329- example = ''
330- encryption.mode = "repokey-blake2" ;
331- encryption.passphrase = "mySecretPassphrase" ;
332- '';
333 };
334335 encryption.passCommand = mkOption {
···437 for the available options.
438 '';
439 default = { };
440- example = literalExample ''
441 {
442 within = "1d"; # Keep all archives from the last day
443 daily = 7;
···455 Use <literal>""</literal> to consider all archives.
456 '';
457 default = config.archiveBaseName;
458- defaultText = "\${archiveBaseName}";
459 };
460461 environment = mkOption {
···203 See also the chapter about BorgBackup in the NixOS manual.
204 '';
205 default = { };
206+ example = literalExpression ''
207 { # for a local backup
208 rootBackup = {
209 paths = "/";
···260 archiveBaseName = mkOption {
261 type = types.strMatching "[^/{}]+";
262 default = "${globalConfig.networking.hostName}-${name}";
263+ defaultText = literalExpression ''"''${config.networking.hostName}-<name>"'';
264 description = ''
265 How to name the created archives. A timestamp, whose format is
266 determined by <option>dateFormat</option>, will be appended. The full
···326 you to specify a <option>passCommand</option>
327 or a <option>passphrase</option>.
328 '';
329+ example = "repokey-blake2";
000330 };
331332 encryption.passCommand = mkOption {
···434 for the available options.
435 '';
436 default = { };
437+ example = literalExpression ''
438 {
439 within = "1d"; # Keep all archives from the last day
440 daily = 7;
···452 Use <literal>""</literal> to consider all archives.
453 '';
454 default = config.archiveBaseName;
455+ defaultText = literalExpression "archiveBaseName";
456 };
457458 environment = mkOption {
+1-1
nixos/modules/services/backup/btrbk.nix
···57 description = "Extra packages for btrbk, like compression utilities for <literal>stream_compress</literal>";
58 type = lib.types.listOf lib.types.package;
59 default = [ ];
60- example = lib.literalExample "[ pkgs.xz ]";
61 };
62 niceness = lib.mkOption {
63 description = "Niceness for local instances of btrbk. Also applies to remote ones connecting via ssh when positive.";
···57 description = "Extra packages for btrbk, like compression utilities for <literal>stream_compress</literal>";
58 type = lib.types.listOf lib.types.package;
59 default = [ ];
60+ example = lib.literalExpression "[ pkgs.xz ]";
61 };
62 niceness = lib.mkOption {
63 description = "Niceness for local instances of btrbk. Also applies to remote ones connecting via ssh when positive.";
···108109 package = mkOption {
110 default = pkgs.go-ethereum.geth;
0111 type = types.package;
112 description = "Package to use as Go Ethereum node.";
113 };
···108109 package = mkOption {
110 default = pkgs.go-ethereum.geth;
111+ defaultText = literalExpression "pkgs.go-ethereum.geth";
112 type = types.package;
113 description = "Package to use as Go Ethereum node.";
114 };
···12 package = mkOption {
13 type = types.package;
14 default = pkgs.k3s;
15- defaultText = "pkgs.k3s";
16- example = literalExample "pkgs.k3s";
17 description = "Package that should be used for k3s";
18 };
19
···12 package = mkOption {
13 type = types.package;
14 default = pkgs.k3s;
15+ defaultText = literalExpression "pkgs.k3s";
016 description = "Package that should be used for k3s";
17 };
18
···23 package = mkOption {
24 type = types.package;
25 default = pkgs.fahclient;
26- defaultText = "pkgs.fahclient";
27 description = ''
28 Which Folding@home client to use.
29 '';
···23 package = mkOption {
24 type = types.package;
25 default = pkgs.fahclient;
26+ defaultText = literalExpression "pkgs.fahclient";
27 description = ''
28 Which Folding@home client to use.
29 '';
+4-4
nixos/modules/services/computing/slurm/slurm.nix
···132 package = mkOption {
133 type = types.package;
134 default = pkgs.slurm.override { enableX11 = ! cfg.enableSrunX11; };
135- defaultText = "pkgs.slurm";
136- example = literalExample "pkgs.slurm-full";
137 description = ''
138 The package to use for slurm binaries.
139 '';
···172 nodeName = mkOption {
173 type = types.listOf types.str;
174 default = [];
175- example = literalExample ''[ "linux[1-32] CPUs=1 State=UNKNOWN" ];'';
176 description = ''
177 Name that SLURM uses to refer to a node (or base partition for BlueGene
178 systems). Typically this would be the string that "/bin/hostname -s"
···183 partitionName = mkOption {
184 type = types.listOf types.str;
185 default = [];
186- example = literalExample ''[ "debug Nodes=linux[1-32] Default=YES MaxTime=INFINITE State=UP" ];'';
187 description = ''
188 Name by which the partition may be referenced. Note that now you have
189 to write the partition's parameters after the name.
···132 package = mkOption {
133 type = types.package;
134 default = pkgs.slurm.override { enableX11 = ! cfg.enableSrunX11; };
135+ defaultText = literalExpression "pkgs.slurm";
136+ example = literalExpression "pkgs.slurm-full";
137 description = ''
138 The package to use for slurm binaries.
139 '';
···172 nodeName = mkOption {
173 type = types.listOf types.str;
174 default = [];
175+ example = literalExpression ''[ "linux[1-32] CPUs=1 State=UNKNOWN" ];'';
176 description = ''
177 Name that SLURM uses to refer to a node (or base partition for BlueGene
178 systems). Typically this would be the string that "/bin/hostname -s"
···183 partitionName = mkOption {
184 type = types.listOf types.str;
185 default = [];
186+ example = literalExpression ''[ "debug Nodes=linux[1-32] Default=YES MaxTime=INFINITE State=UP" ];'';
187 description = ''
188 Name by which the partition may be referenced. Note that now you have
189 to write the partition's parameters after the name.
···136 checkInterval = mkOption {
137 type = types.int;
138 default = 0;
139- example = literalExample "with lib; (length (attrNames config.services.gitlab-runner.services)) * 3";
140 description = ''
141 Defines the interval length, in seconds, between new jobs check.
142 The default value is 3;
···147 concurrent = mkOption {
148 type = types.int;
149 default = 1;
150- example = literalExample "config.nix.maxJobs";
151 description = ''
152 Limits how many jobs globally can be run concurrently.
153 The most upper limit of jobs using all defined runners.
···203 };
204 };
205 default = { };
206- example = literalExample ''
207 {
208 listenAddress = "0.0.0.0:8093";
209 }
···234 package = mkOption {
235 type = types.package;
236 default = pkgs.gitlab-runner;
237- defaultText = "pkgs.gitlab-runner";
238- example = literalExample "pkgs.gitlab-runner_1_11";
239 description = "Gitlab Runner package to use.";
240 };
241 extraPackages = mkOption {
···248 services = mkOption {
249 description = "GitLab Runner services.";
250 default = { };
251- example = literalExample ''
252 {
253 # runner for building in docker via host's nix-daemon
254 # nix store will be readable in runner, might be insecure
···136 checkInterval = mkOption {
137 type = types.int;
138 default = 0;
139+ example = literalExpression "with lib; (length (attrNames config.services.gitlab-runner.services)) * 3";
140 description = ''
141 Defines the interval length, in seconds, between new jobs check.
142 The default value is 3;
···147 concurrent = mkOption {
148 type = types.int;
149 default = 1;
150+ example = literalExpression "config.nix.maxJobs";
151 description = ''
152 Limits how many jobs globally can be run concurrently.
153 The most upper limit of jobs using all defined runners.
···203 };
204 };
205 default = { };
206+ example = literalExpression ''
207 {
208 listenAddress = "0.0.0.0:8093";
209 }
···234 package = mkOption {
235 type = types.package;
236 default = pkgs.gitlab-runner;
237+ defaultText = literalExpression "pkgs.gitlab-runner";
238+ example = literalExpression "pkgs.gitlab-runner_1_11";
239 description = "Gitlab Runner package to use.";
240 };
241 extraPackages = mkOption {
···248 services = mkOption {
249 description = "GitLab Runner services.";
250 default = { };
251+ example = literalExpression ''
252 {
253 # runner for building in docker via host's nix-daemon
254 # nix store will be readable in runner, might be insecure
···3334 package = mkOption {
35 default = pkgs.mongodb;
36- defaultText = "pkgs.mongodb";
37 type = types.package;
38 description = "
39 Which MongoDB derivation to use.
···3334 package = mkOption {
35 default = pkgs.mongodb;
36+ defaultText = literalExpression "pkgs.mongodb";
37 type = types.package;
38 description = "
39 Which MongoDB derivation to use.
+8-8
nixos/modules/services/databases/mysql.nix
···3435 package = mkOption {
36 type = types.package;
37- example = literalExample "pkgs.mariadb";
38 description = "
39 Which MySQL derivation to use. MariaDB packages are supported too.
40 ";
···43 bind = mkOption {
44 type = types.nullOr types.str;
45 default = null;
46- example = literalExample "0.0.0.0";
47 description = "Address to bind to. The default is to bind to all addresses.";
48 };
49···74 configFile = mkOption {
75 type = types.path;
76 default = settingsFile;
77- defaultText = "settingsFile";
78 description = ''
79 Override the configuration file used by MySQL. By default,
80 NixOS generates one automatically from <option>services.mysql.settings</option>.
81 '';
82- example = literalExample ''
83 pkgs.writeText "my.cnf" '''
84 [mysqld]
85 datadir = /var/lib/mysql
···109 </para>
110 </note>
111 '';
112- example = literalExample ''
113 {
114 mysqld = {
115 key_buffer_size = "6G";
···167 of MySQL. The schema attribute is optional: If not specified, an empty database is created.
168 '';
169 example = [
170- { name = "foodatabase"; schema = literalExample "./foodatabase.sql"; }
171 { name = "bardatabase"; }
172 ];
173 };
···217 <link xlink:href="https://mariadb.com/kb/en/library/grant/">GRANT syntax</link>.
218 The attributes are used as <code>GRANT ''${attrName} ON ''${attrValue}</code>.
219 '';
220- example = literalExample ''
221 {
222 "database.*" = "ALL PRIVILEGES";
223 "*.*" = "SELECT, LOCK TABLES";
···235 option is changed. This means that users created and permissions assigned once through this option or
236 otherwise have to be removed manually.
237 '';
238- example = literalExample ''
239 [
240 {
241 name = "nextcloud";
···3435 package = mkOption {
36 type = types.package;
37+ example = literalExpression "pkgs.mariadb";
38 description = "
39 Which MySQL derivation to use. MariaDB packages are supported too.
40 ";
···43 bind = mkOption {
44 type = types.nullOr types.str;
45 default = null;
46+ example = "0.0.0.0";
47 description = "Address to bind to. The default is to bind to all addresses.";
48 };
49···74 configFile = mkOption {
75 type = types.path;
76 default = settingsFile;
77+ defaultText = literalExpression "settingsFile";
78 description = ''
79 Override the configuration file used by MySQL. By default,
80 NixOS generates one automatically from <option>services.mysql.settings</option>.
81 '';
82+ example = literalExpression ''
83 pkgs.writeText "my.cnf" '''
84 [mysqld]
85 datadir = /var/lib/mysql
···109 </para>
110 </note>
111 '';
112+ example = literalExpression ''
113 {
114 mysqld = {
115 key_buffer_size = "6G";
···167 of MySQL. The schema attribute is optional: If not specified, an empty database is created.
168 '';
169 example = [
170+ { name = "foodatabase"; schema = literalExpression "./foodatabase.sql"; }
171 { name = "bardatabase"; }
172 ];
173 };
···217 <link xlink:href="https://mariadb.com/kb/en/library/grant/">GRANT syntax</link>.
218 The attributes are used as <code>GRANT ''${attrName} ON ''${attrValue}</code>.
219 '';
220+ example = literalExpression ''
221 {
222 "database.*" = "ALL PRIVILEGES";
223 "*.*" = "SELECT, LOCK TABLES";
···235 option is changed. This means that users created and permissions assigned once through this option or
236 otherwise have to be removed manually.
237 '';
238+ example = literalExpression ''
239 [
240 {
241 name = "nextcloud";
···34 in types.attrsOf (types.submodule { options = hiddenOptions; });
35 default = {};
36 description = "Child entries of the current entry, with recursively the same structure.";
37- example = lib.literalExample ''
38 {
39 "cn=schema" = {
40 # The attribute used in the DN must be defined
···127 package = mkOption {
128 type = types.package;
129 default = pkgs.openldap;
0130 description = ''
131 OpenLDAP package to use.
132···158 settings = mkOption {
159 type = ldapAttrsType;
160 description = "Configuration for OpenLDAP, in OLC format";
161- example = lib.literalExample ''
162 {
163 attrs.olcLogLevel = [ "stats" ];
164 children = {
165 "cn=schema".includes = [
166- "\${pkgs.openldap}/etc/schema/core.ldif"
167- "\${pkgs.openldap}/etc/schema/cosine.ldif"
168- "\${pkgs.openldap}/etc/schema/inetorgperson.ldif"
169 ];
170 "olcDatabase={-1}frontend" = {
171 attrs = {
···225 rebuilt on each server startup, so this will slow down server startup,
226 especially with large databases.
227 '';
228- example = lib.literalExample ''
229 {
230 "dc=example,dc=org" = '''
231 dn= dn: dc=example,dc=org
···34 in types.attrsOf (types.submodule { options = hiddenOptions; });
35 default = {};
36 description = "Child entries of the current entry, with recursively the same structure.";
37+ example = lib.literalExpression ''
38 {
39 "cn=schema" = {
40 # The attribute used in the DN must be defined
···127 package = mkOption {
128 type = types.package;
129 default = pkgs.openldap;
130+ defaultText = literalExpression "pkgs.openldap";
131 description = ''
132 OpenLDAP package to use.
133···159 settings = mkOption {
160 type = ldapAttrsType;
161 description = "Configuration for OpenLDAP, in OLC format";
162+ example = lib.literalExpression ''
163 {
164 attrs.olcLogLevel = [ "stats" ];
165 children = {
166 "cn=schema".includes = [
167+ "''${pkgs.openldap}/etc/schema/core.ldif"
168+ "''${pkgs.openldap}/etc/schema/cosine.ldif"
169+ "''${pkgs.openldap}/etc/schema/inetorgperson.ldif"
170 ];
171 "olcDatabase={-1}frontend" = {
172 attrs = {
···226 rebuilt on each server startup, so this will slow down server startup,
227 especially with large databases.
228 '';
229+ example = lib.literalExpression ''
230 {
231 "dc=example,dc=org" = '''
232 dn= dn: dc=example,dc=org
···49 package = mkOption {
50 type = types.package;
51 default = pkgs.pgmanage;
52- defaultText = "pkgs.pgmanage";
53 description = ''
54 The pgmanage package to use.
55 '';
···49 package = mkOption {
50 type = types.package;
51 default = pkgs.pgmanage;
52+ defaultText = literalExpression "pkgs.pgmanage";
53 description = ''
54 The pgmanage package to use.
55 '';
+6-6
nixos/modules/services/databases/postgresql.nix
···4445 package = mkOption {
46 type = types.package;
47- example = literalExample "pkgs.postgresql_11";
48 description = ''
49 PostgreSQL package to use.
50 '';
···6667 dataDir = mkOption {
68 type = types.path;
69- defaultText = "/var/lib/postgresql/\${config.services.postgresql.package.psqlSchema}";
70 example = "/var/lib/postgresql/11";
71 description = ''
72 The data directory for PostgreSQL. If left as the default value
···161 <link xlink:href="https://www.postgresql.org/docs/current/sql-grant.html">GRANT syntax</link>.
162 The attributes are used as <code>GRANT ''${attrValue} ON ''${attrName}</code>.
163 '';
164- example = literalExample ''
165 {
166 "DATABASE \"nextcloud\"" = "ALL PRIVILEGES";
167 "ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
···179 option is changed. This means that users created and permissions assigned once through this option or
180 otherwise have to be removed manually.
181 '';
182- example = literalExample ''
183 [
184 {
185 name = "nextcloud";
···221 extraPlugins = mkOption {
222 type = types.listOf types.path;
223 default = [];
224- example = literalExample "with pkgs.postgresql_11.pkgs; [ postgis pg_repack ]";
225 description = ''
226 List of PostgreSQL plugins. PostgreSQL version for each plugin should
227 match version for <literal>services.postgresql.package</literal> value.
···241 escaped with two single quotes as described by the upstream documentation linked above.
242 </para></note>
243 '';
244- example = literalExample ''
245 {
246 log_connections = true;
247 log_statement = "all";
···4445 package = mkOption {
46 type = types.package;
47+ example = literalExpression "pkgs.postgresql_11";
48 description = ''
49 PostgreSQL package to use.
50 '';
···6667 dataDir = mkOption {
68 type = types.path;
69+ defaultText = literalExpression ''"/var/lib/postgresql/''${config.services.postgresql.package.psqlSchema}"'';
70 example = "/var/lib/postgresql/11";
71 description = ''
72 The data directory for PostgreSQL. If left as the default value
···161 <link xlink:href="https://www.postgresql.org/docs/current/sql-grant.html">GRANT syntax</link>.
162 The attributes are used as <code>GRANT ''${attrValue} ON ''${attrName}</code>.
163 '';
164+ example = literalExpression ''
165 {
166 "DATABASE \"nextcloud\"" = "ALL PRIVILEGES";
167 "ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
···179 option is changed. This means that users created and permissions assigned once through this option or
180 otherwise have to be removed manually.
181 '';
182+ example = literalExpression ''
183 [
184 {
185 name = "nextcloud";
···221 extraPlugins = mkOption {
222 type = types.listOf types.path;
223 default = [];
224+ example = literalExpression "with pkgs.postgresql_11.pkgs; [ postgis pg_repack ]";
225 description = ''
226 List of PostgreSQL plugins. PostgreSQL version for each plugin should
227 match version for <literal>services.postgresql.package</literal> value.
···241 escaped with two single quotes as described by the upstream documentation linked above.
242 </para></note>
243 '';
244+ example = literalExpression ''
245 {
246 log_connections = true;
247 log_statement = "all";
+2-3
nixos/modules/services/databases/redis.nix
···47 package = mkOption {
48 type = types.package;
49 default = pkgs.redis;
50- defaultText = "pkgs.redis";
51 description = "Which Redis derivation to use.";
52 };
53···133 type = with types; listOf (listOf int);
134 default = [ [900 1] [300 10] [60 10000] ];
135 description = "The schedule in which data is persisted to disk, represented as a list of lists where the first element represent the amount of seconds and the second the number of changes.";
136- example = [ [900 1] [300 10] [60 10000] ];
137 };
138139 slaveOf = mkOption {
···217 <link xlink:href="https://redis.io/topics/config"/>
218 for details on supported values.
219 '';
220- example = literalExample ''
221 {
222 loadmodule = [ "/path/to/my_module.so" "/path/to/other_module.so" ];
223 }
···47 package = mkOption {
48 type = types.package;
49 default = pkgs.redis;
50+ defaultText = literalExpression "pkgs.redis";
51 description = "Which Redis derivation to use.";
52 };
53···133 type = with types; listOf (listOf int);
134 default = [ [900 1] [300 10] [60 10000] ];
135 description = "The schedule in which data is persisted to disk, represented as a list of lists where the first element represent the amount of seconds and the second the number of changes.";
0136 };
137138 slaveOf = mkOption {
···216 <link xlink:href="https://redis.io/topics/config"/>
217 for details on supported values.
218 '';
219+ example = literalExpression ''
220 {
221 loadmodule = [ "/path/to/my_module.so" "/path/to/other_module.so" ];
222 }
···40 # want to pass in JUPYTER_PATH but use .environment instead,
41 # saving a rebuild.
42 default = pkgs.python3.pkgs.notebook;
043 description = ''
44 Jupyter package to use.
45 '';
···105 "open('/path/secret_file', 'r', encoding='utf8').read().strip()"
106 It will be interpreted at the end of the notebookConfig.
107 '';
108- example = [
109- "'sha1:1b961dc713fb:88483270a63e57d18d43cf337e629539de1436ba'"
110- "open('/path/secret_file', 'r', encoding='utf8').read().strip()"
111- ];
112 };
113114 notebookConfig = mkOption {
···125 })));
126127 default = null;
128- example = literalExample ''
129 {
130 python3 = let
131 env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [
···40 # want to pass in JUPYTER_PATH but use .environment instead,
41 # saving a rebuild.
42 default = pkgs.python3.pkgs.notebook;
43+ defaultText = literalExpression "pkgs.python3.pkgs.notebook";
44 description = ''
45 Jupyter package to use.
46 '';
···106 "open('/path/secret_file', 'r', encoding='utf8').read().strip()"
107 It will be interpreted at the end of the notebookConfig.
108 '';
109+ example = "'sha1:1b961dc713fb:88483270a63e57d18d43cf337e629539de1436ba'";
000110 };
111112 notebookConfig = mkOption {
···123 })));
124125 default = null;
126+ example = literalExpression ''
127 {
128 python3 = let
129 env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [
···13 package = mkOption {
14 type = types.package;
15 default = pkgs.greetd.greetd;
16- defaultText = "pkgs.greetd.greetd";
17 description = "The greetd package that should be used.";
18 };
1920 settings = mkOption {
21 type = settingsFormat.type;
22- example = literalExample ''
23 {
24 default_session = {
25 command = "''${pkgs.greetd.greetd}/bin/agreety --cmd sway";
···43 restart = mkOption {
44 type = types.bool;
45 default = !(cfg.settings ? initial_session);
46- defaultText = "!(config.services.greetd.settings ? initial_session)";
47 description = ''
48 Wether to restart greetd when it terminates (e.g. on failure).
49 This is usually desirable so a user can always log in, but should be disabled when using 'settings.initial_session' (autologin),
···13 package = mkOption {
14 type = types.package;
15 default = pkgs.greetd.greetd;
16+ defaultText = literalExpression "pkgs.greetd.greetd";
17 description = "The greetd package that should be used.";
18 };
1920 settings = mkOption {
21 type = settingsFormat.type;
22+ example = literalExpression ''
23 {
24 default_session = {
25 command = "''${pkgs.greetd.greetd}/bin/agreety --cmd sway";
···43 restart = mkOption {
44 type = types.bool;
45 default = !(cfg.settings ? initial_session);
46+ defaultText = literalExpression "!(config.services.greetd.settings ? initial_session)";
47 description = ''
48 Wether to restart greetd when it terminates (e.g. on failure).
49 This is usually desirable so a user can always log in, but should be disabled when using 'settings.initial_session' (autologin),
···18 package = mkOption {
19 type = types.package;
20 default = pkgs.crossfire-server;
21- defaultText = "pkgs.crossfire-server";
22 description = ''
23 The package to use for the Crossfire server (and map/arch data, if you
24 don't change dataDir).
···28 dataDir = mkOption {
29 type = types.str;
30 default = "${cfg.package}/share/crossfire";
31- defaultText = "\${config.services.crossfire.package}/share/crossfire";
32 description = ''
33 Where to load readonly data from -- maps, archetypes, treasure tables,
34 and the like. If you plan to edit the data on the live server (rather
···72 overwrite the example files that come with the server, rather than being
73 appended to them as the other configuration files are.
74 '';
75- example = literalExample ''
76- dm_file = '''
77- admin:secret_password:localhost
78- jane:xyzzy:*
79- ''';
80- ban_file = '''
81- # Bob is a jerk
82- bob@*
83- # So is everyone on 192.168.86.255/24
84- *@192.168.86.
85- ''';
86- metaserver2 = '''
87- metaserver2_notification on
88- localhostname crossfire.example.net
89- ''';
90- motd = "Welcome to CrossFire!";
91- news = "No news yet.";
92- rules = "Don't be a jerk.";
93- settings = '''
94- # be nicer to newbies and harsher to experienced players
95- balanced_stat_loss true
96- # don't let players pick up and use admin-created items
97- real_wiz false
98- ''';
0099 '';
100 default = {};
101 };
···18 package = mkOption {
19 type = types.package;
20 default = pkgs.crossfire-server;
21+ defaultText = literalExpression "pkgs.crossfire-server";
22 description = ''
23 The package to use for the Crossfire server (and map/arch data, if you
24 don't change dataDir).
···28 dataDir = mkOption {
29 type = types.str;
30 default = "${cfg.package}/share/crossfire";
31+ defaultText = literalExpression ''"''${config.services.crossfire.package}/share/crossfire"'';
32 description = ''
33 Where to load readonly data from -- maps, archetypes, treasure tables,
34 and the like. If you plan to edit the data on the live server (rather
···72 overwrite the example files that come with the server, rather than being
73 appended to them as the other configuration files are.
74 '';
75+ example = literalExpression ''
76+ {
77+ dm_file = '''
78+ admin:secret_password:localhost
79+ jane:xyzzy:*
80+ ''';
81+ ban_file = '''
82+ # Bob is a jerk
83+ bob@*
84+ # So is everyone on 192.168.86.255/24
85+ *@192.168.86.
86+ ''';
87+ metaserver2 = '''
88+ metaserver2_notification on
89+ localhostname crossfire.example.net
90+ ''';
91+ motd = "Welcome to CrossFire!";
92+ news = "No news yet.";
93+ rules = "Don't be a jerk.";
94+ settings = '''
95+ # be nicer to newbies and harsher to experienced players
96+ balanced_stat_loss true
97+ # don't let players pick up and use admin-created items
98+ real_wiz false
99+ ''';
100+ }
101 '';
102 default = {};
103 };
+20-18
nixos/modules/services/games/deliantra-server.nix
···18 package = mkOption {
19 type = types.package;
20 default = pkgs.deliantra-server;
21- defaultText = "pkgs.deliantra-server";
22 description = ''
23 The package to use for the Deliantra server (and map/arch data, if you
24 don't change dataDir).
···28 dataDir = mkOption {
29 type = types.str;
30 default = "${pkgs.deliantra-data}";
31- defaultText = "\${pkgs.deliantra-data}";
32 description = ''
33 Where to store readonly data (maps, archetypes, sprites, etc).
34 Note that if you plan to use the live map editor (rather than editing
···69 The example here is not comprehensive. See the files in
70 /etc/deliantra-server after enabling this module for full documentation.
71 '';
72- example = literalExample ''
73- dm_file = '''
74- admin:secret_password:localhost
75- jane:xyzzy:*
76- ''';
77- motd = "Welcome to Deliantra!";
78- settings = '''
79- # Settings for game mechanics.
80- stat_loss_on_death true
81- armor_max_enchant 7
82- ''';
83- config = '''
84- # Settings for the server daemon.
85- hiscore_url https://deliantra.example.net/scores/
86- max_map_reset 86400
87- ''';
0088 '';
89 default = {
90 motd = "";
···18 package = mkOption {
19 type = types.package;
20 default = pkgs.deliantra-server;
21+ defaultText = literalExpression "pkgs.deliantra-server";
22 description = ''
23 The package to use for the Deliantra server (and map/arch data, if you
24 don't change dataDir).
···28 dataDir = mkOption {
29 type = types.str;
30 default = "${pkgs.deliantra-data}";
31+ defaultText = literalExpression ''"''${pkgs.deliantra-data}"'';
32 description = ''
33 Where to store readonly data (maps, archetypes, sprites, etc).
34 Note that if you plan to use the live map editor (rather than editing
···69 The example here is not comprehensive. See the files in
70 /etc/deliantra-server after enabling this module for full documentation.
71 '';
72+ example = literalExpression ''
73+ {
74+ dm_file = '''
75+ admin:secret_password:localhost
76+ jane:xyzzy:*
77+ ''';
78+ motd = "Welcome to Deliantra!";
79+ settings = '''
80+ # Settings for game mechanics.
81+ stat_loss_on_death true
82+ armor_max_enchant 7
83+ ''';
84+ config = '''
85+ # Settings for the server daemon.
86+ hiscore_url https://deliantra.example.net/scores/
87+ max_map_reset 86400
88+ ''';
89+ }
90 '';
91 default = {
92 motd = "";
+3-3
nixos/modules/services/games/factorio.nix
···86 configFile = mkOption {
87 type = types.path;
88 default = configFile;
89- defaultText = "configFile";
90 description = ''
91 The server's configuration file.
92···162 package = mkOption {
163 type = types.package;
164 default = pkgs.factorio-headless;
165- defaultText = "pkgs.factorio-headless";
166- example = "pkgs.factorio-headless-experimental";
167 description = ''
168 Factorio version to use. This defaults to the stable channel.
169 '';
···86 configFile = mkOption {
87 type = types.path;
88 default = configFile;
89+ defaultText = literalExpression "configFile";
90 description = ''
91 The server's configuration file.
92···162 package = mkOption {
163 type = types.package;
164 default = pkgs.factorio-headless;
165+ defaultText = literalExpression "pkgs.factorio-headless";
166+ example = literalExpression "pkgs.factorio-headless-experimental";
167 description = ''
168 Factorio version to use. This defaults to the stable channel.
169 '';
+4-4
nixos/modules/services/games/minecraft-server.nix
···109 You can use <link xlink:href="https://mcuuid.net/"/> to get a
110 Minecraft UUID for a username.
111 '';
112- example = literalExample ''
113 {
114 username1 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
115 username2 = "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy";
···120 serverProperties = mkOption {
121 type = with types; attrsOf (oneOf [ bool int str ]);
122 default = {};
123- example = literalExample ''
124 {
125 server-port = 43000;
126 difficulty = 3;
···144 package = mkOption {
145 type = types.package;
146 default = pkgs.minecraft-server;
147- defaultText = "pkgs.minecraft-server";
148- example = literalExample "pkgs.minecraft-server_1_12_2";
149 description = "Version of minecraft-server to run.";
150 };
151
···109 You can use <link xlink:href="https://mcuuid.net/"/> to get a
110 Minecraft UUID for a username.
111 '';
112+ example = literalExpression ''
113 {
114 username1 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
115 username2 = "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy";
···120 serverProperties = mkOption {
121 type = with types; attrsOf (oneOf [ bool int str ]);
122 default = {};
123+ example = literalExpression ''
124 {
125 server-port = 43000;
126 difficulty = 3;
···144 package = mkOption {
145 type = types.package;
146 default = pkgs.minecraft-server;
147+ defaultText = literalExpression "pkgs.minecraft-server";
148+ example = literalExpression "pkgs.minecraft-server_1_12_2";
149 description = "Version of minecraft-server to run.";
150 };
151
···80 extraTrustedKeys = mkOption {
81 type = types.listOf types.path;
82 default = [];
83- example = literalExample "[ /etc/nixos/fwupd/myfirmware.pem ]";
84 description = ''
85 Installing a public key allows firmware signed with a matching private key to be recognized as trusted, which may require less authentication to install than for untrusted files. By default trusted firmware can be upgraded (but not downgraded) without the user or administrator password. Only very few keys are installed by default.
86 '';
···98 package = mkOption {
99 type = types.package;
100 default = pkgs.fwupd;
0101 description = ''
102 Which fwupd package to use.
103 '';
···80 extraTrustedKeys = mkOption {
81 type = types.listOf types.path;
82 default = [];
83+ example = literalExpression "[ /etc/nixos/fwupd/myfirmware.pem ]";
84 description = ''
85 Installing a public key allows firmware signed with a matching private key to be recognized as trusted, which may require less authentication to install than for untrusted files. By default trusted firmware can be upgraded (but not downgraded) without the user or administrator password. Only very few keys are installed by default.
86 '';
···98 package = mkOption {
99 type = types.package;
100 default = pkgs.fwupd;
101+ defaultText = literalExpression "pkgs.fwupd";
102 description = ''
103 Which fwupd package to use.
104 '';
···15 plugins = mkOption {
16 type = types.listOf types.package;
17 default = [ pkgs.interception-tools-plugins.caps2esc ];
018 description = ''
19 A list of interception tools plugins that will be made available to use
20 inside the udevmon configuration.
···15 plugins = mkOption {
16 type = types.listOf types.package;
17 default = [ pkgs.interception-tools-plugins.caps2esc ];
18+ defaultText = literalExpression "[ pkgs.interception-tools-plugins.caps2esc ]";
19 description = ''
20 A list of interception tools plugins that will be made available to use
21 inside the udevmon configuration.
+2-2
nixos/modules/services/hardware/pcscd.nix
···21 plugins = mkOption {
22 type = types.listOf types.package;
23 default = [ pkgs.ccid ];
24- defaultText = "[ pkgs.ccid ]";
25- example = literalExample "[ pkgs.pcsc-cyberjack ]";
26 description = "Plugin packages to be used for PCSC-Lite.";
27 };
28
···21 plugins = mkOption {
22 type = types.listOf types.package;
23 default = [ pkgs.ccid ];
24+ defaultText = literalExpression "[ pkgs.ccid ]";
25+ example = literalExpression "[ pkgs.pcsc-cyberjack ]";
26 description = "Plugin packages to be used for PCSC-Lite.";
27 };
28
+2-1
nixos/modules/services/hardware/sane.nix
···73 The example contains the package for HP scanners.
74 </para></note>
75 '';
76- example = literalExample "[ pkgs.hplipWithPlugin ]";
77 };
7879 hardware.sane.disabledDefaultBackends = mkOption {
···115 hardware.sane.drivers.scanSnap.package = mkOption {
116 type = types.package;
117 default = pkgs.sane-drivers.epjitsu;
0118 description = ''
119 Epjitsu driver package to use. Useful if you want to extract the driver files yourself.
120
···73 The example contains the package for HP scanners.
74 </para></note>
75 '';
76+ example = literalExpression "[ pkgs.hplipWithPlugin ]";
77 };
7879 hardware.sane.disabledDefaultBackends = mkOption {
···115 hardware.sane.drivers.scanSnap.package = mkOption {
116 type = types.package;
117 default = pkgs.sane-drivers.epjitsu;
118+ defaultText = literalExpression "pkgs.sane-drivers.epjitsu";
119 description = ''
120 Epjitsu driver package to use. Useful if you want to extract the driver files yourself.
121
···20 the name of attribute will be used.
21 '';
2223- example = literalExample "office1";
24 };
2526 model = mkOption {
···29 The model of the network device.
30 '';
3132- example = literalExample "MFC-7860DW";
33 };
3435 ip = mkOption {
···40 provide a nodename.
41 '';
4243- example = literalExample "192.168.1.2";
44 };
4546 nodename = mkOption {
···51 provide an ip.
52 '';
5354- example = literalExample "BRW0080927AFBCE";
55 };
5657 };
···20 the name of attribute will be used.
21 '';
2223+ example = "office1";
24 };
2526 model = mkOption {
···29 The model of the network device.
30 '';
3132+ example = "MFC-7860DW";
33 };
3435 ip = mkOption {
···40 provide a nodename.
41 '';
4243+ example = "192.168.1.2";
44 };
4546 nodename = mkOption {
···51 provide an ip.
52 '';
5354+ example = "BRW0080927AFBCE";
55 };
5657 };
···20 the name of attribute will be used.
21 '';
2223- example = literalExample "office1";
24 };
2526 model = mkOption {
···29 The model of the network device.
30 '';
3132- example = literalExample "ADS-1200";
33 };
3435 ip = mkOption {
···40 provide a nodename.
41 '';
4243- example = literalExample "192.168.1.2";
44 };
4546 nodename = mkOption {
···51 provide an ip.
52 '';
5354- example = literalExample "BRW0080927AFBCE";
55 };
5657 };
···20 the name of attribute will be used.
21 '';
2223+ example = "office1";
24 };
2526 model = mkOption {
···29 The model of the network device.
30 '';
3132+ example = "ADS-1200";
33 };
3435 ip = mkOption {
···40 provide a nodename.
41 '';
4243+ example = "192.168.1.2";
44 };
4546 nodename = mkOption {
···51 provide an ip.
52 '';
5354+ example = "BRW0080927AFBCE";
55 };
5657 };
···51 hostAliases = mkOption {
52 type = types.listOf types.str;
53 default = [];
54- example = "[ \"www.example.org\" ]";
55 description = ''
56 List of aliases the site has.
57 '';
···60 extraConfig = mkOption {
61 type = types.attrsOf types.str;
62 default = {};
63- example = literalExample ''
64 {
65 "ValidHTTPCodes" = "404";
66 }
67 '';
68- description = "Extra configuration to be appendend to awstats.\${name}.conf.";
69 };
7071 webService = {
···106 configs = mkOption {
107 type = types.attrsOf (types.submodule configOpts);
108 default = {};
109- example = literalExample ''
110 {
111 "mysite" = {
112 domain = "example.com";
···51 hostAliases = mkOption {
52 type = types.listOf types.str;
53 default = [];
54+ example = [ "www.example.org" ];
55 description = ''
56 List of aliases the site has.
57 '';
···60 extraConfig = mkOption {
61 type = types.attrsOf types.str;
62 default = {};
63+ example = literalExpression ''
64 {
65 "ValidHTTPCodes" = "404";
66 }
67 '';
68+ description = "Extra configuration to be appended to awstats.\${name}.conf.";
69 };
7071 webService = {
···106 configs = mkOption {
107 type = types.attrsOf (types.submodule configOpts);
108 default = {};
109+ example = literalExpression ''
110 {
111 "mysite" = {
112 domain = "example.com";
+1-1
nixos/modules/services/logging/fluentd.nix
···27 package = mkOption {
28 type = types.path;
29 default = pkgs.fluentd;
30- defaultText = "pkgs.fluentd";
31 description = "The fluentd package to use.";
32 };
33
···27 package = mkOption {
28 type = types.path;
29 default = pkgs.fluentd;
30+ defaultText = literalExpression "pkgs.fluentd";
31 description = "The fluentd package to use.";
32 };
33
+2-3
nixos/modules/services/logging/graylog.nix
···38 package = mkOption {
39 type = types.package;
40 default = pkgs.graylog;
41- defaultText = "pkgs.graylog";
42 description = "Graylog package to use.";
43 };
4445 user = mkOption {
46 type = types.str;
47 default = "graylog";
48- example = literalExample "graylog";
49 description = "User account under which graylog runs";
50 };
51···9091 elasticsearchHosts = mkOption {
92 type = types.listOf types.str;
93- example = literalExample ''[ "http://node1:9200" "http://user:password@node2:19200" ]'';
94 description = "List of valid URIs of the http ports of your elastic nodes. If one or more of your elasticsearch hosts require authentication, include the credentials in each node URI that requires authentication";
95 };
96
···38 package = mkOption {
39 type = types.package;
40 default = pkgs.graylog;
41+ defaultText = literalExpression "pkgs.graylog";
42 description = "Graylog package to use.";
43 };
4445 user = mkOption {
46 type = types.str;
47 default = "graylog";
048 description = "User account under which graylog runs";
49 };
50···8990 elasticsearchHosts = mkOption {
91 type = types.listOf types.str;
92+ example = literalExpression ''[ "http://node1:9200" "http://user:password@node2:19200" ]'';
93 description = "List of valid URIs of the http ports of your elastic nodes. If one or more of your elasticsearch hosts require authentication, include the credentials in each node URI that requires authentication";
94 };
95
+2-2
nixos/modules/services/logging/journalbeat.nix
···27 package = mkOption {
28 type = types.package;
29 default = pkgs.journalbeat;
30- defaultText = "pkgs.journalbeat";
31- example = literalExample "pkgs.journalbeat7";
32 description = ''
33 The journalbeat package to use
34 '';
···27 package = mkOption {
28 type = types.package;
29 default = pkgs.journalbeat;
30+ defaultText = literalExpression "pkgs.journalbeat";
31+ example = literalExpression "pkgs.journalbeat7";
32 description = ''
33 The journalbeat package to use
34 '';
+1-1
nixos/modules/services/logging/logcheck.nix
···172173 extraRulesDirs = mkOption {
174 default = [];
175- example = "/etc/logcheck";
176 type = types.listOf types.path;
177 description = ''
178 Directories with extra rules.
···172173 extraRulesDirs = mkOption {
174 default = [];
175+ example = [ "/etc/logcheck" ];
176 type = types.listOf types.path;
177 description = ''
178 Directories with extra rules.
+1-1
nixos/modules/services/logging/logrotate.nix
···111 can be controlled by the <link linkend="opt-services.logrotate.paths._name_.priority">priority</link> option
112 using the same semantics as `lib.mkOrder`. Smaller values have a greater priority.
113 '';
114- example = literalExample ''
115 {
116 httpd = {
117 path = "/var/log/httpd/*.log";
···111 can be controlled by the <link linkend="opt-services.logrotate.paths._name_.priority">priority</link> option
112 using the same semantics as `lib.mkOrder`. Smaller values have a greater priority.
113 '';
114+ example = literalExpression ''
115 {
116 httpd = {
117 path = "/var/log/httpd/*.log";
+10-9
nixos/modules/services/logging/logstash.nix
···53 package = mkOption {
54 type = types.package;
55 default = pkgs.logstash;
56- defaultText = "pkgs.logstash";
57- example = literalExample "pkgs.logstash";
58 description = "Logstash package to use.";
59 };
6061 plugins = mkOption {
62 type = types.listOf types.path;
63 default = [ ];
64- example = literalExample "[ pkgs.logstash-contrib ]";
65 description = "The paths to find other logstash plugins in.";
66 };
67···102 type = types.lines;
103 default = "generator { }";
104 description = "Logstash input configuration.";
105- example = ''
106- # Read from journal
107- pipe {
108- command => "''${pkgs.systemd}/bin/journalctl -f -o json"
109- type => "syslog" codec => json {}
110- }
00111 '';
112 };
113
···42 and <link xlink:href="http://davmail.sourceforge.net/advanced.html"/>
43 for details on supported values.
44 '';
45- example = literalExample ''
46 {
47 davmail.allowRemote = true;
48 davmail.imapPort = 55555;
···42 and <link xlink:href="http://davmail.sourceforge.net/advanced.html"/>
43 for details on supported values.
44 '';
45+ example = literalExpression ''
46 {
47 davmail.allowRemote = true;
48 davmail.imapPort = 55555;
+2-2
nixos/modules/services/mail/dovecot.nix
···289 modules = mkOption {
290 type = types.listOf types.package;
291 default = [];
292- example = literalExample "[ pkgs.dovecot_pigeonhole ]";
293 description = ''
294 Symlinks the contents of lib/dovecot of every given package into
295 /etc/dovecot/modules. This will make the given modules available
···339 (list: listToAttrs (map (entry: { name = entry.name; value = removeAttrs entry ["name"]; }) list))
340 (attrsOf (submodule mailboxes));
341 default = {};
342- example = literalExample ''
343 {
344 Spam = { specialUse = "Junk"; auto = "create"; };
345 }
···289 modules = mkOption {
290 type = types.listOf types.package;
291 default = [];
292+ example = literalExpression "[ pkgs.dovecot_pigeonhole ]";
293 description = ''
294 Symlinks the contents of lib/dovecot of every given package into
295 /etc/dovecot/modules. This will make the given modules available
···339 (list: listToAttrs (map (entry: { name = entry.name; value = removeAttrs entry ["name"]; }) list))
340 (attrsOf (submodule mailboxes));
341 default = {};
342+ example = literalExpression ''
343 {
344 Spam = { specialUse = "Junk"; auto = "create"; };
345 }
+2-2
nixos/modules/services/mail/exim.nix
···1{ config, lib, pkgs, ... }:
23let
4- inherit (lib) mkIf mkOption singleton types;
5 inherit (pkgs) coreutils;
6 cfg = config.services.exim;
7in
···60 package = mkOption {
61 type = types.package;
62 default = pkgs.exim;
63- defaultText = "pkgs.exim";
64 description = ''
65 The Exim derivation to use.
66 This can be used to enable features such as LDAP or PAM support.
···1{ config, lib, pkgs, ... }:
23let
4+ inherit (lib) literalExpression mkIf mkOption singleton types;
5 inherit (pkgs) coreutils;
6 cfg = config.services.exim;
7in
···60 package = mkOption {
61 type = types.package;
62 default = pkgs.exim;
63+ defaultText = literalExpression "pkgs.exim";
64 description = ''
65 The Exim derivation to use.
66 This can be used to enable features such as LDAP or PAM support.
···25 package = mkOption {
26 type = types.package;
27 default = pkgs.offlineimap;
28- defaultText = "pkgs.offlineimap";
29 description = "Offlineimap derivation to use.";
30 };
3132 path = mkOption {
33 type = types.listOf types.path;
34 default = [];
35- example = literalExample "[ pkgs.pass pkgs.bash pkgs.notmuch ]";
36 description = "List of derivations to put in Offlineimap's path.";
37 };
38
···25 package = mkOption {
26 type = types.package;
27 default = pkgs.offlineimap;
28+ defaultText = literalExpression "pkgs.offlineimap";
29 description = "Offlineimap derivation to use.";
30 };
3132 path = mkOption {
33 type = types.listOf types.path;
34 default = [];
35+ example = literalExpression "[ pkgs.pass pkgs.bash pkgs.notmuch ]";
36 description = "List of derivations to put in Offlineimap's path.";
37 };
38
+1-1
nixos/modules/services/mail/opensmtpd.nix
···34 package = mkOption {
35 type = types.package;
36 default = pkgs.opensmtpd;
37- defaultText = "pkgs.opensmtpd";
38 description = "The OpenSMTPD package to use.";
39 };
40
···34 package = mkOption {
35 type = types.package;
36 default = pkgs.opensmtpd;
37+ defaultText = literalExpression "pkgs.opensmtpd";
38 description = "The OpenSMTPD package to use.";
39 };
40
+1
nixos/modules/services/mail/postfix.nix
···505 tlsTrustedAuthorities = mkOption {
506 type = types.str;
507 default = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
0508 description = ''
509 File containing trusted certification authorities (CA) to verify certificates of mailservers contacted for mail delivery. This basically sets smtp_tls_CAfile and enables opportunistic tls. Defaults to NixOS trusted certification authorities.
510 '';
···505 tlsTrustedAuthorities = mkOption {
506 type = types.str;
507 default = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
508+ defaultText = literalExpression ''"''${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"'';
509 description = ''
510 File containing trusted certification authorities (CA) to verify certificates of mailservers contacted for mail delivery. This basically sets smtp_tls_CAfile and enables opportunistic tls. Defaults to NixOS trusted certification authorities.
511 '';
+3-2
nixos/modules/services/mail/roundcube.nix
···32 package = mkOption {
33 type = types.package;
34 default = pkgs.roundcube;
03536- example = literalExample ''
37 roundcube.withPlugins (plugins: [ plugins.persistent_login ])
38 '';
39···89 dicts = mkOption {
90 type = types.listOf types.package;
91 default = [];
92- example = literalExample "with pkgs.aspellDicts; [ en fr de ]";
93 description = ''
94 List of aspell dictionnaries for spell checking. If empty, spell checking is disabled.
95 '';
···32 package = mkOption {
33 type = types.package;
34 default = pkgs.roundcube;
35+ defaultText = literalExpression "pkgs.roundcube";
3637+ example = literalExpression ''
38 roundcube.withPlugins (plugins: [ plugins.persistent_login ])
39 '';
40···90 dicts = mkOption {
91 type = types.listOf types.package;
92 default = [];
93+ example = literalExpression "with pkgs.aspellDicts; [ en fr de ]";
94 description = ''
95 List of aspell dictionnaries for spell checking. If empty, spell checking is disabled.
96 '';
+3-7
nixos/modules/services/mail/rspamd.nix
···240 description = ''
241 Local configuration files, written into <filename>/etc/rspamd/local.d/{name}</filename>.
242 '';
243- example = literalExample ''
244 { "redis.conf".source = "/nix/store/.../etc/dir/redis.conf";
245 "arc.conf".text = "allow_envfrom_empty = true;";
246 }
···253 description = ''
254 Overridden configuration files, written into <filename>/etc/rspamd/override.d/{name}</filename>.
255 '';
256- example = literalExample ''
257 { "redis.conf".source = "/nix/store/.../etc/dir/redis.conf";
258 "arc.conf".text = "allow_envfrom_empty = true;";
259 }
···278 normal = {};
279 controller = {};
280 };
281- example = literalExample ''
282 {
283 normal = {
284 includes = [ "$CONFDIR/worker-normal.inc" ];
···335 Addon to postfix configuration
336 '';
337 default = {
338- smtpd_milters = ["unix:/run/rspamd/rspamd-milter.sock"];
339- non_smtpd_milters = ["unix:/run/rspamd/rspamd-milter.sock"];
340- };
341- example = {
342 smtpd_milters = ["unix:/run/rspamd/rspamd-milter.sock"];
343 non_smtpd_milters = ["unix:/run/rspamd/rspamd-milter.sock"];
344 };
···240 description = ''
241 Local configuration files, written into <filename>/etc/rspamd/local.d/{name}</filename>.
242 '';
243+ example = literalExpression ''
244 { "redis.conf".source = "/nix/store/.../etc/dir/redis.conf";
245 "arc.conf".text = "allow_envfrom_empty = true;";
246 }
···253 description = ''
254 Overridden configuration files, written into <filename>/etc/rspamd/override.d/{name}</filename>.
255 '';
256+ example = literalExpression ''
257 { "redis.conf".source = "/nix/store/.../etc/dir/redis.conf";
258 "arc.conf".text = "allow_envfrom_empty = true;";
259 }
···278 normal = {};
279 controller = {};
280 };
281+ example = literalExpression ''
282 {
283 normal = {
284 includes = [ "$CONFDIR/worker-normal.inc" ];
···335 Addon to postfix configuration
336 '';
337 default = {
0000338 smtpd_milters = ["unix:/run/rspamd/rspamd-milter.sock"];
339 non_smtpd_milters = ["unix:/run/rspamd/rspamd-milter.sock"];
340 };
+4-4
nixos/modules/services/mail/sympa.nix
···153 Email domains handled by this instance. There have
154 to be MX records for keys of this attribute set.
155 '';
156- example = literalExample ''
157 {
158 "lists.example.org" = {
159 webHost = "lists.example.org";
···200 name = mkOption {
201 type = str;
202 default = if cfg.database.type == "SQLite" then "${dataDir}/sympa.sqlite" else "sympa";
203- defaultText = ''if database.type == "SQLite" then "${dataDir}/sympa.sqlite" else "sympa"'';
204 description = ''
205 Database name. When using SQLite this must be an absolute
206 path to the database file.
···279 settings = mkOption {
280 type = attrsOf (oneOf [ str int bool ]);
281 default = {};
282- example = literalExample ''
283 {
284 default_home = "lists";
285 viewlogs_page_size = 50;
···314 config.source = mkIf (config.text != null) (mkDefault (pkgs.writeText "sympa-${baseNameOf name}" config.text));
315 }));
316 default = {};
317- example = literalExample ''
318 {
319 "list_data/lists.example.org/help" = {
320 text = "subject This list provides help to users";
···153 Email domains handled by this instance. There have
154 to be MX records for keys of this attribute set.
155 '';
156+ example = literalExpression ''
157 {
158 "lists.example.org" = {
159 webHost = "lists.example.org";
···200 name = mkOption {
201 type = str;
202 default = if cfg.database.type == "SQLite" then "${dataDir}/sympa.sqlite" else "sympa";
203+ defaultText = literalExpression ''if database.type == "SQLite" then "${dataDir}/sympa.sqlite" else "sympa"'';
204 description = ''
205 Database name. When using SQLite this must be an absolute
206 path to the database file.
···279 settings = mkOption {
280 type = attrsOf (oneOf [ str int bool ]);
281 default = {};
282+ example = literalExpression ''
283 {
284 default_home = "lists";
285 viewlogs_page_size = 50;
···314 config.source = mkIf (config.text != null) (mkDefault (pkgs.writeText "sympa-${baseNameOf name}" config.text));
315 }));
316 default = {};
317+ example = literalExpression ''
318 {
319 "list_data/lists.example.org/help" = {
320 text = "subject This list provides help to users";
+3-3
nixos/modules/services/misc/airsonic.nix
···74 transcoders = mkOption {
75 type = types.listOf types.path;
76 default = [ "${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
77- defaultText= [ "\${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
78 description = ''
79 List of paths to transcoder executables that should be accessible
80 from Airsonic. Symlinks will be created to each executable inside
···85 jre = mkOption {
86 type = types.package;
87 default = pkgs.jre8;
88- defaultText = literalExample "pkgs.jre8";
89 description = ''
90 JRE package to use.
91···97 war = mkOption {
98 type = types.path;
99 default = "${pkgs.airsonic}/webapps/airsonic.war";
100- defaultText = "\${pkgs.airsonic}/webapps/airsonic.war";
101 description = "Airsonic war file to use.";
102 };
103
···74 transcoders = mkOption {
75 type = types.listOf types.path;
76 default = [ "${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
77+ defaultText = literalExpression ''[ "''${pkgs.ffmpeg.bin}/bin/ffmpeg" ]'';
78 description = ''
79 List of paths to transcoder executables that should be accessible
80 from Airsonic. Symlinks will be created to each executable inside
···85 jre = mkOption {
86 type = types.package;
87 default = pkgs.jre8;
88+ defaultText = literalExpression "pkgs.jre8";
89 description = ''
90 JRE package to use.
91···97 war = mkOption {
98 type = types.path;
99 default = "${pkgs.airsonic}/webapps/airsonic.war";
100+ defaultText = literalExpression ''"''${pkgs.airsonic}/webapps/airsonic.war"'';
101 description = "Airsonic war file to use.";
102 };
103
+1-1
nixos/modules/services/misc/ankisyncd.nix
···33 package = mkOption {
34 type = types.package;
35 default = pkgs.ankisyncd;
36- defaultText = literalExample "pkgs.ankisyncd";
37 description = "The package to use for the ankisyncd command.";
38 };
39
···33 package = mkOption {
34 type = types.package;
35 default = pkgs.ankisyncd;
36+ defaultText = literalExpression "pkgs.ankisyncd";
37 description = "The package to use for the ankisyncd command.";
38 };
39
+2-2
nixos/modules/services/misc/apache-kafka.nix
···102 package = mkOption {
103 description = "The kafka package to use";
104 default = pkgs.apacheKafka;
105- defaultText = "pkgs.apacheKafka";
106 type = types.package;
107 };
108109 jre = mkOption {
110 description = "The JRE with which to run Kafka";
111 default = cfg.package.passthru.jre;
112- defaultText = "pkgs.apacheKafka.passthru.jre";
113 type = types.package;
114 };
115
···102 package = mkOption {
103 description = "The kafka package to use";
104 default = pkgs.apacheKafka;
105+ defaultText = literalExpression "pkgs.apacheKafka";
106 type = types.package;
107 };
108109 jre = mkOption {
110 description = "The JRE with which to run Kafka";
111 default = cfg.package.passthru.jre;
112+ defaultText = literalExpression "pkgs.apacheKafka.passthru.jre";
113 type = types.package;
114 };
115
+1-1
nixos/modules/services/misc/autofs.nix
···2930 autoMaster = mkOption {
31 type = types.str;
32- example = literalExample ''
33 let
34 mapConf = pkgs.writeText "auto" '''
35 kernel -ro,soft,intr ftp.kernel.org:/pub/linux
···2930 autoMaster = mkOption {
31 type = types.str;
32+ example = literalExpression ''
33 let
34 mapConf = pkgs.writeText "auto" '''
35 kernel -ro,soft,intr ftp.kernel.org:/pub/linux
+2-2
nixos/modules/services/misc/bees.nix
···61 description = ''
62 Extra command-line options passed to the daemon. See upstream bees documentation.
63 '';
64- example = literalExample ''
65 [ "--thread-count" "4" ]
66 '';
67 };
···75 type = with types; attrsOf (submodule fsOptions);
76 description = "BTRFS filesystems to run block-level deduplication on.";
77 default = { };
78- example = literalExample ''
79 {
80 root = {
81 spec = "LABEL=root";
···61 description = ''
62 Extra command-line options passed to the daemon. See upstream bees documentation.
63 '';
64+ example = literalExpression ''
65 [ "--thread-count" "4" ]
66 '';
67 };
···75 type = with types; attrsOf (submodule fsOptions);
76 description = "BTRFS filesystems to run block-level deduplication on.";
77 default = { };
78+ example = literalExpression ''
79 {
80 root = {
81 spec = "LABEL=root";
···79 staticDir = mkOption {
80 type = types.path;
81 default = "${pkgs.nitter}/share/nitter/public";
82- defaultText = "\${pkgs.nitter}/share/nitter/public";
83 description = "Path to the static files directory.";
84 };
85
···79 staticDir = mkOption {
80 type = types.path;
81 default = "${pkgs.nitter}/share/nitter/public";
82+ defaultText = literalExpression ''"''${pkgs.nitter}/share/nitter/public"'';
83 description = "Path to the static files directory.";
84 };
85
+2-2
nixos/modules/services/misc/nix-daemon.nix
···85 package = mkOption {
86 type = types.package;
87 default = pkgs.nix;
88- defaultText = "pkgs.nix";
89 description = ''
90 This option specifies the Nix package instance to use throughout the system.
91 '';
···460 flake = mkOption {
461 type = types.nullOr types.attrs;
462 default = null;
463- example = literalExample "nixpkgs";
464 description = ''
465 The flake input to which <option>from></option> is to be rewritten.
466 '';
···85 package = mkOption {
86 type = types.package;
87 default = pkgs.nix;
88+ defaultText = literalExpression "pkgs.nix";
89 description = ''
90 This option specifies the Nix package instance to use throughout the system.
91 '';
···460 flake = mkOption {
461 type = types.nullOr types.attrs;
462 default = null;
463+ example = literalExpression "nixpkgs";
464 description = ''
465 The flake input to which <option>from></option> is to be rewritten.
466 '';
···68 plugins = mkOption {
69 type = types.functionTo (types.listOf types.package);
70 default = plugins: [];
71- defaultText = "plugins: []";
72- example = literalExample "plugins: with plugins; [ themeify stlviewer ]";
73 description = "Additional plugins to be used. Available plugins are passed through the plugins input.";
74 };
75
···68 plugins = mkOption {
69 type = types.functionTo (types.listOf types.package);
70 default = plugins: [];
71+ defaultText = literalExpression "plugins: []";
72+ example = literalExpression "plugins: with plugins; [ themeify stlviewer ]";
73 description = "Additional plugins to be used. Available plugins are passed through the plugins input.";
74 };
75
+4-4
nixos/modules/services/misc/paperless-ng.nix
···107 mediaDir = mkOption {
108 type = types.str;
109 default = "${cfg.dataDir}/media";
110- defaultText = "\${dataDir}/consume";
111 description = "Directory to store the Paperless documents.";
112 };
113114 consumptionDir = mkOption {
115 type = types.str;
116 default = "${cfg.dataDir}/consume";
117- defaultText = "\${dataDir}/consume";
118 description = "Directory from which new documents are imported.";
119 };
120···167 See <link xlink:href="https://paperless-ng.readthedocs.io/en/latest/configuration.html">the documentation</link>
168 for available options.
169 '';
170- example = literalExample ''
171 {
172 PAPERLESS_OCR_LANGUAGE = "deu+eng";
173 }
···183 package = mkOption {
184 type = types.package;
185 default = pkgs.paperless-ng;
186- defaultText = "pkgs.paperless-ng";
187 description = "The Paperless package to use.";
188 };
189 };
···107 mediaDir = mkOption {
108 type = types.str;
109 default = "${cfg.dataDir}/media";
110+ defaultText = literalExpression ''"''${dataDir}/media"'';
111 description = "Directory to store the Paperless documents.";
112 };
113114 consumptionDir = mkOption {
115 type = types.str;
116 default = "${cfg.dataDir}/consume";
117+ defaultText = literalExpression ''"''${dataDir}/consume"'';
118 description = "Directory from which new documents are imported.";
119 };
120···167 See <link xlink:href="https://paperless-ng.readthedocs.io/en/latest/configuration.html">the documentation</link>
168 for available options.
169 '';
170+ example = literalExpression ''
171 {
172 PAPERLESS_OCR_LANGUAGE = "deu+eng";
173 }
···183 package = mkOption {
184 type = types.package;
185 default = pkgs.paperless-ng;
186+ defaultText = literalExpression "pkgs.paperless-ng";
187 description = "The Paperless package to use.";
188 };
189 };
+1-1
nixos/modules/services/misc/plex.nix
···68 package = mkOption {
69 type = types.package;
70 default = pkgs.plex;
71- defaultText = "pkgs.plex";
72 description = ''
73 The Plex package to use. Plex subscribers may wish to use their own
74 package here, pointing to subscriber-only server versions.
···68 package = mkOption {
69 type = types.package;
70 default = pkgs.plex;
71+ defaultText = literalExpression "pkgs.plex";
72 description = ''
73 The Plex package to use. Plex subscribers may wish to use their own
74 package here, pointing to subscriber-only server versions.
+9-8
nixos/modules/services/misc/redmine.nix
···23let
4 inherit (lib) mkBefore mkDefault mkEnableOption mkIf mkOption mkRemovedOptionModule types;
5- inherit (lib) concatStringsSep literalExample mapAttrsToList;
6 inherit (lib) optional optionalAttrs optionalString;
78 cfg = config.services.redmine;
···54 package = mkOption {
55 type = types.package;
56 default = pkgs.redmine;
057 description = "Which Redmine package to use.";
58- example = "pkgs.redmine.override { ruby = pkgs.ruby_2_7; }";
59 };
6061 user = mkOption {
···90 <link xlink:href="https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration"/>
91 for details.
92 '';
93- example = literalExample ''
94 {
95 email_delivery = {
96 delivery_method = "smtp";
···112 See <link xlink:href="https://svn.redmine.org/redmine/trunk/config/additional_environment.rb.example"/>
113 for details.
114 '';
115- example = literalExample ''
116 config.logger.level = Logger::DEBUG
117 '';
118 };
···121 type = types.attrsOf types.path;
122 default = {};
123 description = "Set of themes.";
124- example = literalExample ''
125 {
126 dkuk-redmine_alex_skin = builtins.fetchurl {
127 url = "https://bitbucket.org/dkuk/redmine_alex_skin/get/1842ef675ef3.zip";
···135 type = types.attrsOf types.path;
136 default = {};
137 description = "Set of plugins.";
138- example = literalExample ''
139 {
140 redmine_env_auth = builtins.fetchurl {
141 url = "https://github.com/Intera/redmine_env_auth/archive/0.6.zip";
···162 port = mkOption {
163 type = types.int;
164 default = if cfg.database.type == "postgresql" then 5432 else 3306;
165- defaultText = "3306";
166 description = "Database host port.";
167 };
168···194 if mysqlLocal then "/run/mysqld/mysqld.sock"
195 else if pgsqlLocal then "/run/postgresql"
196 else null;
197- defaultText = "/run/mysqld/mysqld.sock";
198 example = "/run/mysqld/mysqld.sock";
199 description = "Path to the unix socket file to use for authentication.";
200 };
···23let
4 inherit (lib) mkBefore mkDefault mkEnableOption mkIf mkOption mkRemovedOptionModule types;
5+ inherit (lib) concatStringsSep literalExpression mapAttrsToList;
6 inherit (lib) optional optionalAttrs optionalString;
78 cfg = config.services.redmine;
···54 package = mkOption {
55 type = types.package;
56 default = pkgs.redmine;
57+ defaultText = literalExpression "pkgs.redmine";
58 description = "Which Redmine package to use.";
59+ example = literalExpression "pkgs.redmine.override { ruby = pkgs.ruby_2_7; }";
60 };
6162 user = mkOption {
···91 <link xlink:href="https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration"/>
92 for details.
93 '';
94+ example = literalExpression ''
95 {
96 email_delivery = {
97 delivery_method = "smtp";
···113 See <link xlink:href="https://svn.redmine.org/redmine/trunk/config/additional_environment.rb.example"/>
114 for details.
115 '';
116+ example = ''
117 config.logger.level = Logger::DEBUG
118 '';
119 };
···122 type = types.attrsOf types.path;
123 default = {};
124 description = "Set of themes.";
125+ example = literalExpression ''
126 {
127 dkuk-redmine_alex_skin = builtins.fetchurl {
128 url = "https://bitbucket.org/dkuk/redmine_alex_skin/get/1842ef675ef3.zip";
···136 type = types.attrsOf types.path;
137 default = {};
138 description = "Set of plugins.";
139+ example = literalExpression ''
140 {
141 redmine_env_auth = builtins.fetchurl {
142 url = "https://github.com/Intera/redmine_env_auth/archive/0.6.zip";
···163 port = mkOption {
164 type = types.int;
165 default = if cfg.database.type == "postgresql" then 5432 else 3306;
166+ defaultText = literalExpression "3306";
167 description = "Database host port.";
168 };
169···195 if mysqlLocal then "/run/mysqld/mysqld.sock"
196 else if pgsqlLocal then "/run/postgresql"
197 else null;
198+ defaultText = literalExpression "/run/mysqld/mysqld.sock";
199 example = "/run/mysqld/mysqld.sock";
200 description = "Path to the unix socket file to use for authentication.";
201 };
···24 package = mkOption {
25 type = types.package;
26 default = pkgs.sickbeard;
27- example = literalExample "pkgs.sickrage";
028 description =''
29 Enable <literal>pkgs.sickrage</literal> or <literal>pkgs.sickgear</literal>
30 as an alternative to SickBeard
···24 package = mkOption {
25 type = types.package;
26 default = pkgs.sickbeard;
27+ defaultText = literalExpression "pkgs.sickbeard";
28+ example = literalExpression "pkgs.sickrage";
29 description =''
30 Enable <literal>pkgs.sickrage</literal> or <literal>pkgs.sickgear</literal>
31 as an alternative to SickBeard
···93 transcoders = mkOption {
94 type = types.listOf types.path;
95 default = [ "${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
096 description = ''
97 List of paths to transcoder executables that should be accessible
98 from Subsonic. Symlinks will be created to each executable inside
···93 transcoders = mkOption {
94 type = types.listOf types.path;
95 default = [ "${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
96+ defaultText = literalExpression ''[ "''${pkgs.ffmpeg.bin}/bin/ffmpeg" ]'';
97 description = ''
98 List of paths to transcoder executables that should be accessible
99 from Subsonic. Symlinks will be created to each executable inside
+1-1
nixos/modules/services/misc/tautulli.nix
···47 package = mkOption {
48 type = types.package;
49 default = pkgs.tautulli;
50- defaultText = "pkgs.tautulli";
51 description = ''
52 The Tautulli package to use.
53 '';
···47 package = mkOption {
48 type = types.package;
49 default = pkgs.tautulli;
50+ defaultText = literalExpression "pkgs.tautulli";
51 description = ''
52 The Tautulli package to use.
53 '';
···110 package = mkOption {
111 description = "The zookeeper package to use";
112 default = pkgs.zookeeper;
113- defaultText = "pkgs.zookeeper";
114 type = types.package;
115 };
116
···110 package = mkOption {
111 description = "The zookeeper package to use";
112 default = pkgs.zookeeper;
113+ defaultText = literalExpression "pkgs.zookeeper";
114 type = types.package;
115 };
116
-4
nixos/modules/services/monitoring/alerta.nix
···32 bind = mkOption {
33 type = types.str;
34 default = "0.0.0.0";
35- example = literalExample "0.0.0.0";
36 description = "Address to bind to. The default is to bind to all addresses";
37 };
38···46 type = types.str;
47 description = "URL of the MongoDB or PostgreSQL database to connect to";
48 default = "mongodb://localhost";
49- example = "mongodb://localhost";
50 };
5152 databaseName = mkOption {
53 type = types.str;
54 description = "Name of the database instance to connect to";
55 default = "monitoring";
56- example = "monitoring";
57 };
5859 corsOrigins = mkOption {
60 type = types.listOf types.str;
61 description = "List of URLs that can access the API for Cross-Origin Resource Sharing (CORS)";
62 example = [ "http://localhost" "http://localhost:5000" ];
63- default = [ "http://localhost" "http://localhost:5000" ];
64 };
6566 authenticationRequired = mkOption {
···32 bind = mkOption {
33 type = types.str;
34 default = "0.0.0.0";
035 description = "Address to bind to. The default is to bind to all addresses";
36 };
37···45 type = types.str;
46 description = "URL of the MongoDB or PostgreSQL database to connect to";
47 default = "mongodb://localhost";
048 };
4950 databaseName = mkOption {
51 type = types.str;
52 description = "Name of the database instance to connect to";
53 default = "monitoring";
054 };
5556 corsOrigins = mkOption {
57 type = types.listOf types.str;
58 description = "List of URLs that can access the API for Cross-Origin Resource Sharing (CORS)";
59 example = [ "http://localhost" "http://localhost:5000" ];
060 };
6162 authenticationRequired = mkOption {
+1-2
nixos/modules/services/monitoring/arbtt.nix
···18 package = mkOption {
19 type = types.package;
20 default = pkgs.haskellPackages.arbtt;
21- defaultText = "pkgs.haskellPackages.arbtt";
22- example = literalExample "pkgs.haskellPackages.arbtt";
23 description = ''
24 The package to use for the arbtt binaries.
25 '';
···18 package = mkOption {
19 type = types.package;
20 default = pkgs.haskellPackages.arbtt;
21+ defaultText = literalExpression "pkgs.haskellPackages.arbtt";
022 description = ''
23 The package to use for the arbtt binaries.
24 '';
···330 staticRootPath = mkOption {
331 description = "Root path for static assets.";
332 default = "${cfg.package}/share/grafana/public";
0333 type = types.str;
334 };
335336 package = mkOption {
337 description = "Package to use.";
338 default = pkgs.grafana;
339- defaultText = "pkgs.grafana";
340 type = types.package;
341 };
342···344 type = with types; nullOr (listOf path);
345 default = null;
346 description = "If non-null, then a list of packages containing Grafana plugins to install. If set, plugins cannot be manually installed.";
347- example = literalExample "with pkgs.grafanaPlugins; [ grafana-piechart-panel ]";
348 # Make sure each plugin is added only once; otherwise building
349 # the link farm fails, since the same path is added multiple
350 # times.
···330 staticRootPath = mkOption {
331 description = "Root path for static assets.";
332 default = "${cfg.package}/share/grafana/public";
333+ defaultText = literalExpression ''"''${package}/share/grafana/public"'';
334 type = types.str;
335 };
336337 package = mkOption {
338 description = "Package to use.";
339 default = pkgs.grafana;
340+ defaultText = literalExpression "pkgs.grafana";
341 type = types.package;
342 };
343···345 type = with types; nullOr (listOf path);
346 default = null;
347 description = "If non-null, then a list of packages containing Grafana plugins to install. If set, plugins cannot be manually installed.";
348+ example = literalExpression "with pkgs.grafanaPlugins; [ grafana-piechart-panel ]";
349 # Make sure each plugin is added only once; otherwise building
350 # the link farm fails, since the same path is added multiple
351 # times.
+3-3
nixos/modules/services/monitoring/graphite.nix
···132 finders = mkOption {
133 description = "List of finder plugins to load.";
134 default = [];
135- example = literalExample "[ pkgs.python3Packages.influxgraph ]";
136 type = types.listOf types.package;
137 };
138···160 package = mkOption {
161 description = "Package to use for graphite api.";
162 default = pkgs.python3Packages.graphite_api;
163- defaultText = "pkgs.python3Packages.graphite_api";
164 type = types.package;
165 };
166···335 <link xlink:href='https://github.com/scobal/seyren#config' />
336 '';
337 type = types.attrsOf types.str;
338- example = literalExample ''
339 {
340 GRAPHITE_USERNAME = "user";
341 GRAPHITE_PASSWORD = "pass";
···132 finders = mkOption {
133 description = "List of finder plugins to load.";
134 default = [];
135+ example = literalExpression "[ pkgs.python3Packages.influxgraph ]";
136 type = types.listOf types.package;
137 };
138···160 package = mkOption {
161 description = "Package to use for graphite api.";
162 default = pkgs.python3Packages.graphite_api;
163+ defaultText = literalExpression "pkgs.python3Packages.graphite_api";
164 type = types.package;
165 };
166···335 <link xlink:href='https://github.com/scobal/seyren#config' />
336 '';
337 type = types.attrsOf types.str;
338+ example = literalExpression ''
339 {
340 GRAPHITE_USERNAME = "user";
341 GRAPHITE_PASSWORD = "pass";
+1-1
nixos/modules/services/monitoring/heapster.nix
···33 package = mkOption {
34 description = "Package to use by heapster";
35 default = pkgs.heapster;
36- defaultText = "pkgs.heapster";
37 type = types.package;
38 };
39 };
···33 package = mkOption {
34 description = "Package to use by heapster";
35 default = pkgs.heapster;
36+ defaultText = literalExpression "pkgs.heapster";
37 type = types.package;
38 };
39 };
+1-1
nixos/modules/services/monitoring/incron.nix
···56 extraPackages = mkOption {
57 type = types.listOf types.package;
58 default = [];
59- example = literalExample "[ pkgs.rsync ]";
60 description = "Extra packages available to the system incrontab.";
61 };
62
···56 extraPackages = mkOption {
57 type = types.listOf types.package;
58 default = [];
59+ example = literalExpression "[ pkgs.rsync ]";
60 description = "Extra packages available to the system incrontab.";
61 };
62
+1-4
nixos/modules/services/monitoring/kapacitor.nix
···62 dataDir = mkOption {
63 type = types.path;
64 example = "/var/lib/kapacitor";
65- default = "/var/lib/kapacitor";
66 description = "Location where Kapacitor stores its state";
67 };
68···75 bind = mkOption {
76 type = types.str;
77 default = "";
78- example = literalExample "0.0.0.0";
79 description = "Address to bind to. The default is to bind to all addresses";
80 };
81···101 type = types.str;
102 description = "Specifies how often to snapshot the task state (in InfluxDB time units)";
103 default = "1m0s";
104- example = "1m0s";
105 };
106107 loadDirectory = mkOption {
···136 url = mkOption {
137 description = "The URL to the Alerta REST API";
138 default = "http://localhost:5000";
139- example = "http://localhost:5000";
140 type = types.str;
141 };
142
···62 dataDir = mkOption {
63 type = types.path;
64 example = "/var/lib/kapacitor";
065 description = "Location where Kapacitor stores its state";
66 };
67···74 bind = mkOption {
75 type = types.str;
76 default = "";
77+ example = "0.0.0.0";
78 description = "Address to bind to. The default is to bind to all addresses";
79 };
80···100 type = types.str;
101 description = "Specifies how often to snapshot the task state (in InfluxDB time units)";
102 default = "1m0s";
0103 };
104105 loadDirectory = mkOption {
···134 url = mkOption {
135 description = "The URL to the Alerta REST API";
136 default = "http://localhost:5000";
0137 type = types.str;
138 };
139
+2-2
nixos/modules/services/monitoring/loki.nix
···1{ config, lib, pkgs, ... }:
23let
4- inherit (lib) escapeShellArgs literalExample mkEnableOption mkIf mkOption types;
56 cfg = config.services.loki;
7···57 extraFlags = mkOption {
58 type = types.listOf types.str;
59 default = [];
60- example = literalExample [ "--server.http-listen-port=3101" ];
61 description = ''
62 Specify a list of additional command line flags,
63 which get escaped and are then passed to Loki.
···1{ config, lib, pkgs, ... }:
23let
4+ inherit (lib) escapeShellArgs mkEnableOption mkIf mkOption types;
56 cfg = config.services.loki;
7···57 extraFlags = mkOption {
58 type = types.listOf types.str;
59 default = [];
60+ example = [ "--server.http-listen-port=3101" ];
61 description = ''
62 Specify a list of additional command line flags,
63 which get escaped and are then passed to Loki.
···1920 apiKeyFile = mkOption {
21 type = types.path;
22- default = "";
23 example = "/run/keys/mackerel-api-key";
24 description = ''
25 Path to file containing the Mackerel API key. The file should contain a
···1920 apiKeyFile = mkOption {
21 type = types.path;
022 example = "/run/keys/mackerel-api-key";
23 description = ''
24 Path to file containing the Mackerel API key. The file should contain a
+3-4
nixos/modules/services/monitoring/metricbeat.nix
···3let
4 inherit (lib)
5 attrValues
6- literalExample
7 mkEnableOption
8 mkIf
9 mkOption
···24 package = mkOption {
25 type = types.package;
26 default = pkgs.metricbeat;
27- defaultText = literalExample "pkgs.metricbeat";
28- example = literalExample "pkgs.metricbeat7";
29 description = ''
30 The metricbeat package to use
31 '';
···51 module = mkOption {
52 type = types.str;
53 default = name;
54- defaultText = literalExample ''<name>'';
55 description = ''
56 The name of the module.
57
···3let
4 inherit (lib)
5 attrValues
6+ literalExpression
7 mkEnableOption
8 mkIf
9 mkOption
···24 package = mkOption {
25 type = types.package;
26 default = pkgs.metricbeat;
27+ defaultText = literalExpression "pkgs.metricbeat";
28+ example = literalExpression "pkgs.metricbeat7";
29 description = ''
30 The metricbeat package to use
31 '';
···51 module = mkOption {
52 type = types.str;
53 default = name;
054 description = ''
55 The name of the module.
56
+7-5
nixos/modules/services/monitoring/munin.nix
···189 <literal>/bin</literal>, <literal>/usr/bin</literal>,
190 <literal>/sbin</literal>, and <literal>/usr/sbin</literal>.
191 '';
192- example = literalExample ''
193 {
194 zfs_usage_bigpool = /src/munin-contrib/plugins/zfs/zfs_usage_;
195 zfs_usage_smallpool = /src/munin-contrib/plugins/zfs/zfs_usage_;
···220 <literal>/bin</literal>, <literal>/usr/bin</literal>,
221 <literal>/sbin</literal>, and <literal>/usr/sbin</literal>.
222 '';
223- example = literalExample ''
224 [
225 /src/munin-contrib/plugins/zfs
226 /src/munin-contrib/plugins/ssh
···285 host for cron to succeed. See
286 <link xlink:href='http://guide.munin-monitoring.org/en/latest/reference/munin.conf.html' />
287 '';
288- example = ''
289- [''${config.networking.hostName}]
290- address localhost
00291 '';
292 };
293
···189 <literal>/bin</literal>, <literal>/usr/bin</literal>,
190 <literal>/sbin</literal>, and <literal>/usr/sbin</literal>.
191 '';
192+ example = literalExpression ''
193 {
194 zfs_usage_bigpool = /src/munin-contrib/plugins/zfs/zfs_usage_;
195 zfs_usage_smallpool = /src/munin-contrib/plugins/zfs/zfs_usage_;
···220 <literal>/bin</literal>, <literal>/usr/bin</literal>,
221 <literal>/sbin</literal>, and <literal>/usr/sbin</literal>.
222 '';
223+ example = literalExpression ''
224 [
225 /src/munin-contrib/plugins/zfs
226 /src/munin-contrib/plugins/ssh
···285 host for cron to succeed. See
286 <link xlink:href='http://guide.munin-monitoring.org/en/latest/reference/munin.conf.html' />
287 '';
288+ example = literalExpression ''
289+ '''
290+ [''${config.networking.hostName}]
291+ address localhost
292+ '''
293 '';
294 };
295
+4-4
nixos/modules/services/monitoring/nagios.nix
···97 network that you want Nagios to monitor.
98 ";
99 type = types.listOf types.path;
100- example = literalExample "[ ./objects.cfg ]";
101 };
102103 plugins = mkOption {
104 type = types.listOf types.package;
105 default = with pkgs; [ monitoring-plugins ssmtp mailutils ];
106- defaultText = "[pkgs.monitoring-plugins pkgs.ssmtp pkgs.mailutils]";
107 description = "
108 Packages to be added to the Nagios <envar>PATH</envar>.
109 Typically used to add plugins, but can be anything.
···137 cgiConfigFile = mkOption {
138 type = types.package;
139 default = nagiosCGICfgFile;
140- defaultText = "nagiosCGICfgFile";
141 description = "
142 Derivation for the configuration file of Nagios CGI scripts
143 that can be used in web servers for running the Nagios web interface.
···155156 virtualHost = mkOption {
157 type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
158- example = literalExample ''
159 { hostName = "example.org";
160 adminAddr = "webmaster@example.org";
161 enableSSL = true;
···97 network that you want Nagios to monitor.
98 ";
99 type = types.listOf types.path;
100+ example = literalExpression "[ ./objects.cfg ]";
101 };
102103 plugins = mkOption {
104 type = types.listOf types.package;
105 default = with pkgs; [ monitoring-plugins ssmtp mailutils ];
106+ defaultText = literalExpression "[pkgs.monitoring-plugins pkgs.ssmtp pkgs.mailutils]";
107 description = "
108 Packages to be added to the Nagios <envar>PATH</envar>.
109 Typically used to add plugins, but can be anything.
···137 cgiConfigFile = mkOption {
138 type = types.package;
139 default = nagiosCGICfgFile;
140+ defaultText = literalExpression "nagiosCGICfgFile";
141 description = "
142 Derivation for the configuration file of Nagios CGI scripts
143 that can be used in web servers for running the Nagios web interface.
···155156 virtualHost = mkOption {
157 type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
158+ example = literalExpression ''
159 { hostName = "example.org";
160 adminAddr = "webmaster@example.org";
161 enableSSL = true;
···26 package = mkOption {
27 type = types.package;
28 default = pkgs.prometheus-pushgateway;
29- defaultText = "pkgs.prometheus-pushgateway";
30 description = ''
31 Package that should be used for the prometheus pushgateway.
32 '';
···26 package = mkOption {
27 type = types.package;
28 default = pkgs.prometheus-pushgateway;
29+ defaultText = literalExpression "pkgs.prometheus-pushgateway";
30 description = ''
31 Package that should be used for the prometheus pushgateway.
32 '';
+2-3
nixos/modules/services/monitoring/scollector.nix
···43 package = mkOption {
44 type = types.package;
45 default = pkgs.scollector;
46- defaultText = "pkgs.scollector";
47- example = literalExample "pkgs.scollector";
48 description = ''
49 scollector binary to use.
50 '';
···78 collectors = mkOption {
79 type = with types; attrsOf (listOf path);
80 default = {};
81- example = literalExample "{ \"0\" = [ \"\${postgresStats}/bin/collect-stats\" ]; }";
82 description = ''
83 An attribute set mapping the frequency of collection to a list of
84 binaries that should be executed at that frequency. You can use "0"
···43 package = mkOption {
44 type = types.package;
45 default = pkgs.scollector;
46+ defaultText = literalExpression "pkgs.scollector";
047 description = ''
48 scollector binary to use.
49 '';
···77 collectors = mkOption {
78 type = with types; attrsOf (listOf path);
79 default = {};
80+ example = literalExpression ''{ "0" = [ "''${postgresStats}/bin/collect-stats" ]; }'';
81 description = ''
82 An attribute set mapping the frequency of collection to a list of
83 binaries that should be executed at that frequency. You can use "0"
+2-2
nixos/modules/services/monitoring/telegraf.nix
···1516 package = mkOption {
17 default = pkgs.telegraf;
18- defaultText = "pkgs.telegraf";
19 description = "Which telegraf derivation to use";
20 type = types.package;
21 };
···23 environmentFiles = mkOption {
24 type = types.listOf types.path;
25 default = [];
26- example = "/run/keys/telegraf.env";
27 description = ''
28 File to load as environment file. Environment variables from this file
29 will be interpolated into the config file using envsubst with this
···1516 package = mkOption {
17 default = pkgs.telegraf;
18+ defaultText = literalExpression "pkgs.telegraf";
19 description = "Which telegraf derivation to use";
20 type = types.package;
21 };
···23 environmentFiles = mkOption {
24 type = types.listOf types.path;
25 default = [];
26+ example = [ "/run/keys/telegraf.env" ];
27 description = ''
28 File to load as environment file. Environment variables from this file
29 will be interpolated into the config file using envsubst with this
+4-4
nixos/modules/services/monitoring/thanos.nix
···120 type = with types; nullOr str;
121 default = if cfg.tracing.config == null then null
122 else toString (toYAML "tracing.yaml" cfg.tracing.config);
123- defaultText = ''
124 if config.services.thanos.<cmd>.tracing.config == null then null
125 else toString (toYAML "tracing.yaml" config.services.thanos.<cmd>.tracing.config);
126 '';
···185 type = with types; nullOr str;
186 default = if cfg.objstore.config == null then null
187 else toString (toYAML "objstore.yaml" cfg.objstore.config);
188- defaultText = ''
189 if config.services.thanos.<cmd>.objstore.config == null then null
190 else toString (toYAML "objstore.yaml" config.services.thanos.<cmd>.objstore.config);
191 '';
···227 option = mkOption {
228 type = types.str;
229 default = "/var/lib/${config.services.prometheus.stateDir}/data";
230- defaultText = "/var/lib/\${config.services.prometheus.stateDir}/data";
231 description = ''
232 Data directory of TSDB.
233 '';
···656 package = mkOption {
657 type = types.package;
658 default = pkgs.thanos;
659- defaultText = "pkgs.thanos";
660 description = ''
661 The thanos package that should be used.
662 '';
···120 type = with types; nullOr str;
121 default = if cfg.tracing.config == null then null
122 else toString (toYAML "tracing.yaml" cfg.tracing.config);
123+ defaultText = literalExpression ''
124 if config.services.thanos.<cmd>.tracing.config == null then null
125 else toString (toYAML "tracing.yaml" config.services.thanos.<cmd>.tracing.config);
126 '';
···185 type = with types; nullOr str;
186 default = if cfg.objstore.config == null then null
187 else toString (toYAML "objstore.yaml" cfg.objstore.config);
188+ defaultText = literalExpression ''
189 if config.services.thanos.<cmd>.objstore.config == null then null
190 else toString (toYAML "objstore.yaml" config.services.thanos.<cmd>.objstore.config);
191 '';
···227 option = mkOption {
228 type = types.str;
229 default = "/var/lib/${config.services.prometheus.stateDir}/data";
230+ defaultText = literalExpression ''"/var/lib/''${config.services.prometheus.stateDir}/data"'';
231 description = ''
232 Data directory of TSDB.
233 '';
···656 package = mkOption {
657 type = types.package;
658 default = pkgs.thanos;
659+ defaultText = literalExpression "pkgs.thanos";
660 description = ''
661 The thanos package that should be used.
662 '';
···87 pass = mkOption {
88 type = types.path;
89 default = pkgs.writeText "unifi-poller-influxdb-default.password" "unifipoller";
90- defaultText = "unifi-poller-influxdb-default.password";
91 description = ''
92 Path of a file containing the password for influxdb.
93 This file needs to be readable by the unifi-poller user.
···130 pass = mkOption {
131 type = types.path;
132 default = pkgs.writeText "unifi-poller-unifi-default.password" "unifi";
133- defaultText = "unifi-poller-unifi-default.password";
134 description = ''
135 Path of a file containing the password for the unifi service user.
136 This file needs to be readable by the unifi-poller user.
···87 pass = mkOption {
88 type = types.path;
89 default = pkgs.writeText "unifi-poller-influxdb-default.password" "unifipoller";
90+ defaultText = literalExpression "unifi-poller-influxdb-default.password";
91 description = ''
92 Path of a file containing the password for influxdb.
93 This file needs to be readable by the unifi-poller user.
···130 pass = mkOption {
131 type = types.path;
132 default = pkgs.writeText "unifi-poller-unifi-default.password" "unifi";
133+ defaultText = literalExpression "unifi-poller-unifi-default.password";
134 description = ''
135 Path of a file containing the password for the unifi service user.
136 This file needs to be readable by the unifi-poller user.
···97 mgrModulePath = mkOption {
98 type = types.path;
99 default = "${pkgs.ceph.lib}/lib/ceph/mgr";
0100 description = ''
101 Path at which to find ceph-mgr modules.
102 '';
···181 rgwMimeTypesFile = mkOption {
182 type = with types; nullOr path;
183 default = "${pkgs.mime-types}/etc/mime.types";
0184 description = ''
185 Path to mime types used by radosgw.
186 '';
···190 extraConfig = mkOption {
191 type = with types; attrsOf str;
192 default = {};
193- example = ''
194- {
195- "ms bind ipv6" = "true";
196- };
197- '';
198 description = ''
199 Extra configuration to add to the global section. Use for setting values that are common for all daemons in the cluster.
200 '';
···205 daemons = mkOption {
206 type = with types; listOf str;
207 default = [];
208- example = ''
209- [ "name1" "name2" ];
210- '';
211 description = ''
212 A list of names for manager daemons that should have a service created. The names correspond
213 to the id part in ceph i.e. [ "name1" ] would result in mgr.name1
···227 daemons = mkOption {
228 type = with types; listOf str;
229 default = [];
230- example = ''
231- [ "name1" "name2" ];
232- '';
233 description = ''
234 A list of monitor daemons that should have a service created. The names correspond
235 to the id part in ceph i.e. [ "name1" ] would result in mon.name1
···249 daemons = mkOption {
250 type = with types; listOf str;
251 default = [];
252- example = ''
253- [ "name1" "name2" ];
254- '';
255 description = ''
256 A list of OSD daemons that should have a service created. The names correspond
257 to the id part in ceph i.e. [ "name1" ] would result in osd.name1
···279 daemons = mkOption {
280 type = with types; listOf str;
281 default = [];
282- example = ''
283- [ "name1" "name2" ];
284- '';
285 description = ''
286 A list of metadata service daemons that should have a service created. The names correspond
287 to the id part in ceph i.e. [ "name1" ] would result in mds.name1
···301 daemons = mkOption {
302 type = with types; listOf str;
303 default = [];
304- example = ''
305- [ "name1" "name2" ];
306- '';
307 description = ''
308 A list of rados gateway daemons that should have a service created. The names correspond
309 to the id part in ceph i.e. [ "name1" ] would result in client.name1, radosgw daemons
···318 extraConfig = mkOption {
319 type = with types; attrsOf (attrsOf str);
320 default = {};
321- example = ''
322 {
323 # This would create a section for a radosgw daemon named node0 and related
324 # configuration for it
···97 mgrModulePath = mkOption {
98 type = types.path;
99 default = "${pkgs.ceph.lib}/lib/ceph/mgr";
100+ defaultText = literalExpression ''"''${pkgs.ceph.lib}/lib/ceph/mgr"'';
101 description = ''
102 Path at which to find ceph-mgr modules.
103 '';
···182 rgwMimeTypesFile = mkOption {
183 type = with types; nullOr path;
184 default = "${pkgs.mime-types}/etc/mime.types";
185+ defaultText = literalExpression ''"''${pkgs.mime-types}/etc/mime.types"'';
186 description = ''
187 Path to mime types used by radosgw.
188 '';
···192 extraConfig = mkOption {
193 type = with types; attrsOf str;
194 default = {};
195+ example = {
196+ "ms bind ipv6" = "true";
197+ };
00198 description = ''
199 Extra configuration to add to the global section. Use for setting values that are common for all daemons in the cluster.
200 '';
···205 daemons = mkOption {
206 type = with types; listOf str;
207 default = [];
208+ example = [ "name1" "name2" ];
00209 description = ''
210 A list of names for manager daemons that should have a service created. The names correspond
211 to the id part in ceph i.e. [ "name1" ] would result in mgr.name1
···225 daemons = mkOption {
226 type = with types; listOf str;
227 default = [];
228+ example = [ "name1" "name2" ];
00229 description = ''
230 A list of monitor daemons that should have a service created. The names correspond
231 to the id part in ceph i.e. [ "name1" ] would result in mon.name1
···245 daemons = mkOption {
246 type = with types; listOf str;
247 default = [];
248+ example = [ "name1" "name2" ];
00249 description = ''
250 A list of OSD daemons that should have a service created. The names correspond
251 to the id part in ceph i.e. [ "name1" ] would result in osd.name1
···273 daemons = mkOption {
274 type = with types; listOf str;
275 default = [];
276+ example = [ "name1" "name2" ];
00277 description = ''
278 A list of metadata service daemons that should have a service created. The names correspond
279 to the id part in ceph i.e. [ "name1" ] would result in mds.name1
···293 daemons = mkOption {
294 type = with types; listOf str;
295 default = [];
296+ example = [ "name1" "name2" ];
00297 description = ''
298 A list of rados gateway daemons that should have a service created. The names correspond
299 to the id part in ceph i.e. [ "name1" ] would result in client.name1, radosgw daemons
···308 extraConfig = mkOption {
309 type = with types; attrsOf (attrsOf str);
310 default = {};
311+ example = literalExpression ''
312 {
313 # This would create a section for a radosgw daemon named node0 and related
314 # configuration for it
···54 hostName = mkOption {
55 type = types.str;
56 default = config.networking.hostName;
57- defaultText = literalExample "config.networking.hostName";
58 description = ''
59 Host name advertised on the LAN. If not set, avahi will use the value
60 of <option>config.networking.hostName</option>.
···87 ipv6 = mkOption {
88 type = types.bool;
89 default = config.networking.enableIPv6;
90- defaultText = "config.networking.enableIPv6";
91 description = "Whether to use IPv6.";
92 };
93···134 extraServiceFiles = mkOption {
135 type = with types; attrsOf (either str path);
136 default = {};
137- example = literalExample ''
138 {
139 ssh = "''${pkgs.avahi}/etc/avahi/services/ssh.service";
140 smb = '''
···54 hostName = mkOption {
55 type = types.str;
56 default = config.networking.hostName;
57+ defaultText = literalExpression "config.networking.hostName";
58 description = ''
59 Host name advertised on the LAN. If not set, avahi will use the value
60 of <option>config.networking.hostName</option>.
···87 ipv6 = mkOption {
88 type = types.bool;
89 default = config.networking.enableIPv6;
90+ defaultText = literalExpression "config.networking.enableIPv6";
91 description = "Whether to use IPv6.";
92 };
93···134 extraServiceFiles = mkOption {
135 type = with types; attrsOf (either str path);
136 default = {};
137+ example = literalExpression ''
138 {
139 ssh = "''${pkgs.avahi}/etc/avahi/services/ssh.service";
140 smb = '''
+2-2
nixos/modules/services/networking/bee.nix
···20 package = mkOption {
21 type = types.package;
22 default = pkgs.bee;
23- defaultText = "pkgs.bee";
24- example = "pkgs.bee-unstable";
25 description = "The package providing the bee binary for the service.";
26 };
27
···20 package = mkOption {
21 type = types.package;
22 default = pkgs.bee;
23+ defaultText = literalExpression "pkgs.bee";
24+ example = literalExpression "pkgs.bee-unstable";
25 description = "The package providing the bee binary for the service.";
26 };
27
+1
nixos/modules/services/networking/biboumi.nix
···107 options.policy_directory = mkOption {
108 type = types.path;
109 default = "${pkgs.biboumi}/etc/biboumi";
0110 description = ''
111 A directory that should contain the policy files,
112 used to customize Botan’s behaviour
···107 options.policy_directory = mkOption {
108 type = types.path;
109 default = "${pkgs.biboumi}/etc/biboumi";
110+ defaultText = literalExpression ''"''${pkgs.biboumi}/etc/biboumi"'';
111 description = ''
112 A directory that should contain the policy files,
113 used to customize Botan’s behaviour
+2-2
nixos/modules/services/networking/bind.nix
···110 package = mkOption {
111 type = types.package;
112 default = pkgs.bind;
113- defaultText = "pkgs.bind";
114 description = "The BIND package to use.";
115 };
116···209 configFile = mkOption {
210 type = types.path;
211 default = confFile;
212- defaultText = "confFile";
213 description = "
214 Overridable config file to use for named. By default, that
215 generated by nixos.
···110 package = mkOption {
111 type = types.package;
112 default = pkgs.bind;
113+ defaultText = literalExpression "pkgs.bind";
114 description = "The BIND package to use.";
115 };
116···209 configFile = mkOption {
210 type = types.path;
211 default = confFile;
212+ defaultText = literalExpression "confFile";
213 description = "
214 Overridable config file to use for named. By default, that
215 generated by nixos.
···1415 settings = mkOption {
16 type = settingsFormat.type;
17- example = literalExample ''
18 {
19 interfaces = [
20 # eth0 is an upstream interface monitoring for IPv6 router advertisements.
···4445 configFile = mkOption {
46 type = types.path;
47- example = literalExample "\"\${pkgs.corerad}/etc/corerad/corerad.toml\"";
48 description = "Path to CoreRAD TOML configuration file.";
49 };
5051 package = mkOption {
52 default = pkgs.corerad;
53- defaultText = literalExample "pkgs.corerad";
54 type = types.package;
55 description = "CoreRAD package to use.";
56 };
···1415 settings = mkOption {
16 type = settingsFormat.type;
17+ example = literalExpression ''
18 {
19 interfaces = [
20 # eth0 is an upstream interface monitoring for IPv6 router advertisements.
···4445 configFile = mkOption {
46 type = types.path;
47+ example = literalExpression ''"''${pkgs.corerad}/etc/corerad/corerad.toml"'';
48 description = "Path to CoreRAD TOML configuration file.";
49 };
5051 package = mkOption {
52 default = pkgs.corerad;
53+ defaultText = literalExpression "pkgs.corerad";
54 type = types.package;
55 description = "CoreRAD package to use.";
56 };
+2-2
nixos/modules/services/networking/coturn.nix
···68 alt-listening-port = mkOption {
69 type = types.int;
70 default = cfg.listening-port + 1;
71- defaultText = "listening-port + 1";
72 description = ''
73 Alternative listening port for UDP and TCP listeners;
74 default (or zero) value means "listening port plus one".
···83 alt-tls-listening-port = mkOption {
84 type = types.int;
85 default = cfg.tls-listening-port + 1;
86- defaultText = "tls-listening-port + 1";
87 description = ''
88 Alternative listening port for TLS and DTLS protocols.
89 '';
···68 alt-listening-port = mkOption {
69 type = types.int;
70 default = cfg.listening-port + 1;
71+ defaultText = literalExpression "listening-port + 1";
72 description = ''
73 Alternative listening port for UDP and TCP listeners;
74 default (or zero) value means "listening port plus one".
···83 alt-tls-listening-port = mkOption {
84 type = types.int;
85 default = cfg.tls-listening-port + 1;
86+ defaultText = literalExpression "tls-listening-port + 1";
87 description = ''
88 Alternative listening port for TLS and DTLS protocols.
89 '';
+1-1
nixos/modules/services/networking/dnscache.nix
···61 Table of {hostname: server} pairs to use as authoritative servers for hosts (and subhosts).
62 If entry for @ is not specified predefined list of root servers is used.
63 '';
64- example = literalExample ''
65 {
66 "@" = ["8.8.8.8" "8.8.4.4"];
67 "example.com" = ["192.168.100.100"];
···61 Table of {hostname: server} pairs to use as authoritative servers for hosts (and subhosts).
62 If entry for @ is not specified predefined list of root servers is used.
63 '';
64+ example = literalExpression ''
65 {
66 "@" = ["8.8.8.8" "8.8.4.4"];
67 "example.com" = ["192.168.100.100"];
···13 Attrset that is converted and passed as TOML config file.
14 For available params, see: <link xlink:href="https://github.com/DNSCrypt/dnscrypt-proxy/blob/${pkgs.dnscrypt-proxy2.version}/dnscrypt-proxy/example-dnscrypt-proxy.toml"/>
15 '';
16- example = literalExample ''
17 {
18 sources.public-resolvers = {
19 urls = [ "https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md" ];
···2930 upstreamDefaults = mkOption {
31 description = ''
32- Whether to base the config declared in <literal>services.dnscrypt-proxy2.settings</literal> on the upstream example config (<link xlink:href="https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml"/>)
3334 Disable this if you want to declare your dnscrypt config from scratch.
35 '';
···56 ''}
57 ${pkgs.remarshal}/bin/json2toml < config.json > $out
58 '';
59- defaultText = literalExample "TOML file generated from services.dnscrypt-proxy2.settings";
60 };
61 };
62
···13 Attrset that is converted and passed as TOML config file.
14 For available params, see: <link xlink:href="https://github.com/DNSCrypt/dnscrypt-proxy/blob/${pkgs.dnscrypt-proxy2.version}/dnscrypt-proxy/example-dnscrypt-proxy.toml"/>
15 '';
16+ example = literalExpression ''
17 {
18 sources.public-resolvers = {
19 urls = [ "https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md" ];
···2930 upstreamDefaults = mkOption {
31 description = ''
32+ Whether to base the config declared in <option>services.dnscrypt-proxy2.settings</option> on the upstream example config (<link xlink:href="https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml"/>)
3334 Disable this if you want to declare your dnscrypt config from scratch.
35 '';
···56 ''}
57 ${pkgs.remarshal}/bin/json2toml < config.json > $out
58 '';
59+ defaultText = literalDocBook "TOML file generated from <option>services.dnscrypt-proxy2.settings</option>";
60 };
61 };
62
···15 flags = mkOption {
16 type = types.listOf types.str;
17 default = [];
18- example = literalExample [ "--server-address=9.9.9.9:53" ];
19 description = ''
20 A list of command-line flags to pass to doh-proxy. For details on the
21 available options, see <link xlink:href="https://github.com/jedisct1/doh-server#usage"/>.
···15 flags = mkOption {
16 type = types.listOf types.str;
17 default = [];
18+ example = [ "--server-address=9.9.9.9:53" ];
19 description = ''
20 A list of command-line flags to pass to doh-proxy. For details on the
21 available options, see <link xlink:href="https://github.com/jedisct1/doh-server#usage"/>.
+2-2
nixos/modules/services/networking/ejabberd.nix
···32 package = mkOption {
33 type = types.package;
34 default = pkgs.ejabberd;
35- defaultText = "pkgs.ejabberd";
36 description = "ejabberd server package to use";
37 };
38···76 type = types.listOf types.path;
77 default = [];
78 description = "Configuration dumps that should be loaded on the first startup";
79- example = literalExample "[ ./myejabberd.dump ]";
80 };
8182 imagemagick = mkOption {
···32 package = mkOption {
33 type = types.package;
34 default = pkgs.ejabberd;
35+ defaultText = literalExpression "pkgs.ejabberd";
36 description = "ejabberd server package to use";
37 };
38···76 type = types.listOf types.path;
77 default = [];
78 description = "Configuration dumps that should be loaded on the first startup";
79+ example = literalExpression "[ ./myejabberd.dump ]";
80 };
8182 imagemagick = mkOption {
+1
nixos/modules/services/networking/epmd.nix
···20 package = mkOption {
21 type = types.package;
22 default = pkgs.erlang;
023 description = ''
24 The Erlang package to use to get epmd binary. That way you can re-use
25 an Erlang runtime that is already installed for other purposes.
···20 package = mkOption {
21 type = types.package;
22 default = pkgs.erlang;
23+ defaultText = literalExpression "pkgs.erlang";
24 description = ''
25 The Erlang package to use to get epmd binary. That way you can re-use
26 an Erlang runtime that is already installed for other purposes.
···325 package = mkOption {
326 type = types.package;
327 default = pkgs.iptables;
328- defaultText = "pkgs.iptables";
329- example = literalExample "pkgs.iptables-nftables-compat";
330 description =
331 ''
332 The iptables package to use for running the firewall service."
···500 extraPackages = mkOption {
501 type = types.listOf types.package;
502 default = [ ];
503- example = literalExample "[ pkgs.ipset ]";
504 description =
505 ''
506 Additional packages to be included in the environment of the system
···325 package = mkOption {
326 type = types.package;
327 default = pkgs.iptables;
328+ defaultText = literalExpression "pkgs.iptables";
329+ example = literalExpression "pkgs.iptables-nftables-compat";
330 description =
331 ''
332 The iptables package to use for running the firewall service."
···500 extraPackages = mkOption {
501 type = types.listOf types.package;
502 default = [ ];
503+ example = literalExpression "[ pkgs.ipset ]";
504 description =
505 ''
506 Additional packages to be included in the environment of the system
+1-1
nixos/modules/services/networking/flannel.nix
···20 description = "Package to use for flannel";
21 type = types.package;
22 default = pkgs.flannel;
23- defaultText = "pkgs.flannel";
24 };
2526 publicIp = mkOption {
···20 description = "Package to use for flannel";
21 type = types.package;
22 default = pkgs.flannel;
23+ defaultText = literalExpression "pkgs.flannel";
24 };
2526 publicIp = mkOption {
···21 as described at <link xlink:href="https://www.infradead.org/openconnect/hip.html" />
22 '';
23 default = null;
24- example = literalExample "\${pkgs.openconnect}/libexec/openconnect/hipreport.sh";
25 type = types.nullOr types.path;
26 };
27 };
···21 as described at <link xlink:href="https://www.infradead.org/openconnect/hip.html" />
22 '';
23 default = null;
24+ example = literalExpression ''"''${pkgs.openconnect}/libexec/openconnect/hipreport.sh"'';
25 type = types.nullOr types.path;
26 };
27 };
+2-2
nixos/modules/services/networking/gnunet.nix
···115 package = mkOption {
116 type = types.package;
117 default = pkgs.gnunet;
118- defaultText = "pkgs.gnunet";
119 description = "Overridable attribute of the gnunet package to use.";
120- example = literalExample "pkgs.gnunet_git";
121 };
122123 extraOptions = mkOption {
···115 package = mkOption {
116 type = types.package;
117 default = pkgs.gnunet;
118+ defaultText = literalExpression "pkgs.gnunet";
119 description = "Overridable attribute of the gnunet package to use.";
120+ example = literalExpression "pkgs.gnunet_git";
121 };
122123 extraOptions = mkOption {
+1-1
nixos/modules/services/networking/gobgpd.nix
···18 <link xlink:href="https://github.com/osrg/gobgp#documentation"/>
19 for details on supported values.
20 '';
21- example = literalExample ''
22 {
23 global = {
24 config = {
···18 <link xlink:href="https://github.com/osrg/gobgp#documentation"/>
19 for details on supported values.
20 '';
21+ example = literalExpression ''
22 {
23 global = {
24 config = {
+1-1
nixos/modules/services/networking/hans.nix
···27 where <replaceable>name</replaceable> is the name of the
28 corresponding attribute name.
29 '';
30- example = literalExample ''
31 {
32 foo = {
33 server = "192.0.2.1";
···27 where <replaceable>name</replaceable> is the name of the
28 corresponding attribute name.
29 '';
30+ example = literalExpression ''
31 {
32 foo = {
33 server = "192.0.2.1";
···17 package = lib.mkOption {
18 type = lib.types.package;
19 default = pkgs.inspircd;
20- defaultText = lib.literalExample "pkgs.inspircd";
21- example = lib.literalExample "pkgs.inspircdMinimal";
22 description = ''
23 The InspIRCd package to use. This is mainly useful
24 to specify an overridden version of the
···17 package = lib.mkOption {
18 type = lib.types.package;
19 default = pkgs.inspircd;
20+ defaultText = lib.literalExpression "pkgs.inspircd";
21+ example = lib.literalExpression "pkgs.inspircdMinimal";
22 description = ''
23 The InspIRCd package to use. This is mainly useful
24 to specify an overridden version of the
+1-1
nixos/modules/services/networking/iodine.nix
···36 where <replaceable>name</replaceable> is the name of the
37 corresponding attribute name.
38 '';
39- example = literalExample ''
40 {
41 foo = {
42 server = "tunnel.mdomain.com";
···36 where <replaceable>name</replaceable> is the name of the
37 corresponding attribute name.
38 '';
39+ example = literalExpression ''
40 {
41 foo = {
42 server = "tunnel.mdomain.com";
···25 package = mkOption {
26 type = types.package;
27 default = pkgs.miredo;
28- defaultText = "pkgs.miredo";
29 description = ''
30 The package to use for the miredo daemon's binary.
31 '';
···25 package = mkOption {
26 type = types.package;
27 default = pkgs.miredo;
28+ defaultText = literalExpression "pkgs.miredo";
29 description = ''
30 The package to use for the miredo daemon's binary.
31 '';
+2-5
nixos/modules/services/networking/morty.nix
···23 type = types.bool;
24 default = true;
25 description = "Allow IPv6 HTTP requests?";
26- defaultText = "Allow IPv6 HTTP requests.";
27 };
2829 key = mkOption {
···33 HMAC url validation key (hexadecimal encoded).
34 Leave blank to disable. Without validation key, anyone can
35 submit proxy requests. Leave blank to disable.
036 '';
37- defaultText = "No HMAC url validation. Generate with echo -n somevalue | openssl dgst -sha1 -hmac somekey";
38 };
3940 timeout = mkOption {
41 type = types.int;
42 default = 2;
43 description = "Request timeout in seconds.";
44- defaultText = "A resource now gets 2 seconds to respond.";
45 };
4647 package = mkOption {
48 type = types.package;
49 default = pkgs.morty;
50- defaultText = "pkgs.morty";
51 description = "morty package to use.";
52 };
53···61 type = types.str;
62 default = "127.0.0.1";
63 description = "The address on which the service listens";
64- defaultText = "127.0.0.1 (localhost)";
65 };
6667 };
···23 type = types.bool;
24 default = true;
25 description = "Allow IPv6 HTTP requests?";
026 };
2728 key = mkOption {
···32 HMAC url validation key (hexadecimal encoded).
33 Leave blank to disable. Without validation key, anyone can
34 submit proxy requests. Leave blank to disable.
35+ Generate with <literal>printf %s somevalue | openssl dgst -sha1 -hmac somekey</literal>
36 '';
037 };
3839 timeout = mkOption {
40 type = types.int;
41 default = 2;
42 description = "Request timeout in seconds.";
043 };
4445 package = mkOption {
46 type = types.package;
47 default = pkgs.morty;
48+ defaultText = literalExpression "pkgs.morty";
49 description = "morty package to use.";
50 };
51···59 type = types.str;
60 default = "127.0.0.1";
61 description = "The address on which the service listens";
062 };
6364 };
-2
nixos/modules/services/networking/mosquitto.nix
···5657 port = mkOption {
58 default = 1883;
59- example = 1883;
60 type = types.int;
61 description = ''
62 Port on which to listen without SSL.
···9596 port = mkOption {
97 default = 8883;
98- example = 8883;
99 type = types.int;
100 description = ''
101 Port on which to listen with SSL.
···5657 port = mkOption {
58 default = 1883;
059 type = types.int;
60 description = ''
61 Port on which to listen without SSL.
···9495 port = mkOption {
96 default = 8883;
097 type = types.int;
98 description = ''
99 Port on which to listen with SSL.
+1-1
nixos/modules/services/networking/murmur.nix
···112 package = mkOption {
113 type = types.package;
114 default = pkgs.murmur;
115- defaultText = "pkgs.murmur";
116 description = "Overridable attribute of the murmur package to use.";
117 };
118
···112 package = mkOption {
113 type = types.package;
114 default = pkgs.murmur;
115+ defaultText = literalExpression "pkgs.murmur";
116 description = "Overridable attribute of the murmur package to use.";
117 };
118
+1-1
nixos/modules/services/networking/mxisd.nix
···42 package = mkOption {
43 type = types.package;
44 default = pkgs.ma1sd;
45- defaultText = "pkgs.ma1sd";
46 description = "The mxisd/ma1sd package to use";
47 };
48
···42 package = mkOption {
43 type = types.package;
44 default = pkgs.ma1sd;
45+ defaultText = literalExpression "pkgs.ma1sd";
46 description = "The mxisd/ma1sd package to use";
47 };
48
+1-1
nixos/modules/services/networking/nat.nix
···247 loopbackIPs = mkOption {
248 type = types.listOf types.str;
249 default = [];
250- example = literalExample ''[ "55.1.2.3" ]'';
251 description = "Public IPs for NAT reflection; for connections to `loopbackip:sourcePort' from the host itself and from other hosts behind NAT";
252 };
253 };
···247 loopbackIPs = mkOption {
248 type = types.listOf types.str;
249 default = [];
250+ example = literalExpression ''[ "55.1.2.3" ]'';
251 description = "Public IPs for NAT reflection; for connections to `loopbackip:sourcePort' from the host itself and from other hosts behind NAT";
252 };
253 };
+1-2
nixos/modules/services/networking/nats.nix
···4344 port = mkOption {
45 default = 4222;
46- example = 4222;
47 type = types.port;
48 description = ''
49 Port on which to listen.
···67 settings = mkOption {
68 default = { };
69 type = format.type;
70- example = literalExample ''
71 {
72 jetstream = {
73 max_mem = "1G";
···4344 port = mkOption {
45 default = 4222;
046 type = types.port;
47 description = ''
48 Port on which to listen.
···66 settings = mkOption {
67 default = { };
68 type = format.type;
69+ example = literalExpression ''
70 {
71 jetstream = {
72 max_mem = "1G";
···142 messages, and respond to them according to a set of rules.
143 '';
144 default = {};
145- example = literalExample ''
146 {
147 eth0.rules."1111::/64" = {};
148 }
···142 messages, and respond to them according to a set of rules.
143 '';
144 default = {};
145+ example = literalExpression ''
146 {
147 eth0.rules."1111::/64" = {};
148 }
+6-8
nixos/modules/services/networking/nebula.nix
···30 package = mkOption {
31 type = types.package;
32 default = pkgs.nebula;
33- defaultText = "pkgs.nebula";
34 description = "Nebula derivation to use.";
35 };
36···59 The static host map defines a set of hosts with fixed IP addresses on the internet (or any network).
60 A host can have multiple fixed IP addresses defined here, and nebula will try each when establishing a tunnel.
61 '';
62- example = literalExample ''
63- { "192.168.100.1" = [ "100.64.22.11:4242" ]; }
64- '';
65 };
6667 isLighthouse = mkOption {
···77 List of IPs of lighthouse hosts this node should report to and query from. This should be empty on lighthouse
78 nodes. The IPs should be the lighthouse's Nebula IPs, not their external IPs.
79 '';
80- example = ''[ "192.168.100.1" ]'';
81 };
8283 listen.host = mkOption {
···110 type = types.listOf types.attrs;
111 default = [];
112 description = "Firewall rules for outbound traffic.";
113- example = ''[ { port = "any"; proto = "any"; host = "any"; } ]'';
114 };
115116 firewall.inbound = mkOption {
117 type = types.listOf types.attrs;
118 default = [];
119 description = "Firewall rules for inbound traffic.";
120- example = ''[ { port = "any"; proto = "any"; host = "any"; } ]'';
121 };
122123 settings = mkOption {
···128 <link xlink:href="https://github.com/slackhq/nebula/blob/master/examples/config.yml"/>
129 for details on supported values.
130 '';
131- example = literalExample ''
132 {
133 lighthouse.dns = {
134 host = "0.0.0.0";
···30 package = mkOption {
31 type = types.package;
32 default = pkgs.nebula;
33+ defaultText = literalExpression "pkgs.nebula";
34 description = "Nebula derivation to use.";
35 };
36···59 The static host map defines a set of hosts with fixed IP addresses on the internet (or any network).
60 A host can have multiple fixed IP addresses defined here, and nebula will try each when establishing a tunnel.
61 '';
62+ example = { "192.168.100.1" = [ "100.64.22.11:4242" ]; };
0063 };
6465 isLighthouse = mkOption {
···75 List of IPs of lighthouse hosts this node should report to and query from. This should be empty on lighthouse
76 nodes. The IPs should be the lighthouse's Nebula IPs, not their external IPs.
77 '';
78+ example = [ "192.168.100.1" ];
79 };
8081 listen.host = mkOption {
···108 type = types.listOf types.attrs;
109 default = [];
110 description = "Firewall rules for outbound traffic.";
111+ example = [ { port = "any"; proto = "any"; host = "any"; } ];
112 };
113114 firewall.inbound = mkOption {
115 type = types.listOf types.attrs;
116 default = [];
117 description = "Firewall rules for inbound traffic.";
118+ example = [ { port = "any"; proto = "any"; host = "any"; } ];
119 };
120121 settings = mkOption {
···126 <link xlink:href="https://github.com/slackhq/nebula/blob/master/examples/config.yml"/>
127 for details on supported values.
128 '';
129+ example = literalExpression ''
130 {
131 lighthouse.dns = {
132 host = "0.0.0.0";
···32 };
33 networking.nftables.ruleset = mkOption {
34 type = types.lines;
035 example = ''
36 # Check out https://wiki.nftables.org/ for better documentation.
37 # Table for both IPv4 and IPv6.
···86 name = "nftables-rules";
87 text = cfg.ruleset;
88 };
089 description =
90 ''
91 The ruleset file to be used with nftables. Should be in a format that
···32 };
33 networking.nftables.ruleset = mkOption {
34 type = types.lines;
35+ default = "";
36 example = ''
37 # Check out https://wiki.nftables.org/ for better documentation.
38 # Table for both IPv4 and IPv6.
···87 name = "nftables-rules";
88 text = cfg.ruleset;
89 };
90+ defaultText = literalDocBook ''a file with the contents of <option>networking.nftables.ruleset</option>'';
91 description =
92 ''
93 The ruleset file to be used with nftables. Should be in a format that
···13 package = mkOption {
14 type = types.package;
15 default = pkgs.nomad;
16- defaultText = "pkgs.nomad";
17 description = ''
18 The package used for the Nomad agent and CLI.
19 '';
···25 description = ''
26 Extra packages to add to <envar>PATH</envar> for the Nomad agent process.
27 '';
28- example = literalExample ''
29 with pkgs; [ cni-plugins ]
30 '';
31 };
···55 description = ''
56 Additional settings paths used to configure nomad. These can be files or directories.
57 '';
58- example = literalExample ''
59 [ "/etc/nomad-mutable.json" "/run/keys/nomad-with-secrets.json" "/etc/nomad/config.d" ]
60 '';
61 };
···81 the <literal>DynamicUser</literal> feature of systemd which directly
82 manages and operates on <literal>StateDirectory</literal>.
83 '';
84- example = literalExample ''
85 {
86 # A minimal config example:
87 server = {
···13 package = mkOption {
14 type = types.package;
15 default = pkgs.nomad;
16+ defaultText = literalExpression "pkgs.nomad";
17 description = ''
18 The package used for the Nomad agent and CLI.
19 '';
···25 description = ''
26 Extra packages to add to <envar>PATH</envar> for the Nomad agent process.
27 '';
28+ example = literalExpression ''
29 with pkgs; [ cni-plugins ]
30 '';
31 };
···55 description = ''
56 Additional settings paths used to configure nomad. These can be files or directories.
57 '';
58+ example = literalExpression ''
59 [ "/etc/nomad-mutable.json" "/run/keys/nomad-with-secrets.json" "/etc/nomad/config.d" ]
60 '';
61 };
···81 the <literal>DynamicUser</literal> feature of systemd which directly
82 manages and operates on <literal>StateDirectory</literal>.
83 '';
84+ example = literalExpression ''
85 {
86 # A minimal config example:
87 server = {
+2-4
nixos/modules/services/networking/nsd.nix
···260 data = mkOption {
261 type = types.lines;
262 default = "";
263- example = "";
264 description = ''
265 The actual zone data. This is the content of your zone file.
266 Use imports or pkgs.lib.readFile if you don't want this data in your config file.
···397 requestXFR = mkOption {
398 type = types.listOf types.str;
399 default = [];
400- example = [];
401 description = ''
402 Format: <code>[AXFR|UDP] <ip-address> <key-name | NOKEY></code>
403 '';
···726 };
727 });
728 default = {};
729- example = literalExample ''
730 { "tsig.example.org" = {
731 algorithm = "hmac-md5";
732 keyFile = "/path/to/my/key";
···861 zones = mkOption {
862 type = types.attrsOf zoneOptions;
863 default = {};
864- example = literalExample ''
865 { "serverGroup1" = {
866 provideXFR = [ "10.1.2.3 NOKEY" ];
867 children = {
···260 data = mkOption {
261 type = types.lines;
262 default = "";
0263 description = ''
264 The actual zone data. This is the content of your zone file.
265 Use imports or pkgs.lib.readFile if you don't want this data in your config file.
···396 requestXFR = mkOption {
397 type = types.listOf types.str;
398 default = [];
0399 description = ''
400 Format: <code>[AXFR|UDP] <ip-address> <key-name | NOKEY></code>
401 '';
···724 };
725 });
726 default = {};
727+ example = literalExpression ''
728 { "tsig.example.org" = {
729 algorithm = "hmac-md5";
730 keyFile = "/path/to/my/key";
···859 zones = mkOption {
860 type = types.attrsOf zoneOptions;
861 default = {};
862+ example = literalExpression ''
863 { "serverGroup1" = {
864 provideXFR = [ "10.1.2.3 NOKEY" ];
865 children = {
+1-1
nixos/modules/services/networking/ntp/chrony.nix
···44 package = mkOption {
45 type = types.package;
46 default = pkgs.chrony;
47- defaultText = "pkgs.chrony";
48 description = ''
49 Which chrony package to use.
50 '';
···44 package = mkOption {
45 type = types.package;
46 default = pkgs.chrony;
47+ defaultText = literalExpression "pkgs.chrony";
48 description = ''
49 Which chrony package to use.
50 '';
+1-1
nixos/modules/services/networking/ntp/ntpd.nix
···97 extraFlags = mkOption {
98 type = types.listOf types.str;
99 description = "Extra flags passed to the ntpd command.";
100- example = literalExample ''[ "--interface=eth0" ]'';
101 default = [];
102 };
103
···97 extraFlags = mkOption {
98 type = types.listOf types.str;
99 description = "Extra flags passed to the ntpd command.";
100+ example = literalExpression ''[ "--interface=eth0" ]'';
101 default = [];
102 };
103
+1-1
nixos/modules/services/networking/ofono.nix
···24 plugins = mkOption {
25 type = types.listOf types.package;
26 default = [];
27- example = literalExample "[ pkgs.modem-manager-gui ]";
28 description = ''
29 The list of plugins to install.
30 '';
···24 plugins = mkOption {
25 type = types.listOf types.package;
26 default = [];
27+ example = literalExpression "[ pkgs.modem-manager-gui ]";
28 description = ''
29 The list of plugins to install.
30 '';
···65 include = mkOption {
66 type = types.listOf types.str;
67 default = [];
68- example = ''[ "eth*" "lo*" ]'';
69 description = ''
70 For a port to pass the filter and appear on the port list managed
71 by drone, it be allowed by this include list.
···74 exclude = mkOption {
75 type = types.listOf types.str;
76 default = [];
77- example = ''[ "usbmon*" "eth0" ]'';
78 description = ''
79 A list of ports does not appear on the port list managed by drone.
80 '';
···65 include = mkOption {
66 type = types.listOf types.str;
67 default = [];
68+ example = [ "eth*" "lo*" ];
69 description = ''
70 For a port to pass the filter and appear on the port list managed
71 by drone, it be allowed by this include list.
···74 exclude = mkOption {
75 type = types.listOf types.str;
76 default = [];
77+ example = [ "usbmon*" "eth0" ];
78 description = ''
79 A list of ports does not appear on the port list managed by drone.
80 '';
···98 plugin = mkOption {
99 type = types.nullOr types.str;
100 default = null;
101- example = "\${pkgs.shadowsocks-v2ray-plugin}/bin/v2ray-plugin";
102 description = ''
103 SIP003 plugin for shadowsocks
104 '';
···116 extraConfig = mkOption {
117 type = types.attrs;
118 default = {};
119- example = ''
120- {
121- nameserver = "8.8.8.8";
122- }
123- '';
124 description = ''
125 Additional configuration for shadowsocks that is not covered by the
126 provided options. The provided attrset will be serialized to JSON and
···98 plugin = mkOption {
99 type = types.nullOr types.str;
100 default = null;
101+ example = literalExpression ''"''${pkgs.shadowsocks-v2ray-plugin}/bin/v2ray-plugin"'';
102 description = ''
103 SIP003 plugin for shadowsocks
104 '';
···116 extraConfig = mkOption {
117 type = types.attrs;
118 default = {};
119+ example = {
120+ nameserver = "8.8.8.8";
121+ };
00122 description = ''
123 Additional configuration for shadowsocks that is not covered by the
124 provided options. The provided attrset will be serialized to JSON and
···30 package = mkOption {
31 type = types.package;
32 default = pkgs.spacecookie;
33- defaultText = literalExample "pkgs.spacecookie";
34- example = literalExample "pkgs.haskellPackages.spacecookie";
35 description = ''
36 The spacecookie derivation to use. This can be used to
37 override the used package or to use another version.
···30 package = mkOption {
31 type = types.package;
32 default = pkgs.spacecookie;
33+ defaultText = literalExpression "pkgs.spacecookie";
34+ example = literalExpression "pkgs.haskellPackages.spacecookie";
35 description = ''
36 The spacecookie derivation to use. This can be used to
37 override the used package or to use another version.
···69 CAFile = mkOption {
70 type = types.nullOr types.path;
71 default = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
072 description = "Path to a file containing certificates to validate against.";
73 };
74
···69 CAFile = mkOption {
70 type = types.nullOr types.path;
71 default = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
72+ defaultText = literalExpression ''"''${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"'';
73 description = "Path to a file containing certificates to validate against.";
74 };
75
+2-2
nixos/modules/services/networking/supplicant.nix
···73 path = mkOption {
74 type = types.nullOr types.path;
75 default = null;
76- example = literalExample "/etc/wpa_supplicant.conf";
77 description = ''
78 External <literal>wpa_supplicant.conf</literal> configuration file.
79 The configuration options defined declaratively within <literal>networking.supplicant</literal> have
···170171 default = { };
172173- example = literalExample ''
174 { "wlan0 wlan1" = {
175 configFile.path = "/etc/wpa_supplicant.conf";
176 userControlled.group = "network";
···73 path = mkOption {
74 type = types.nullOr types.path;
75 default = null;
76+ example = literalExpression "/etc/wpa_supplicant.conf";
77 description = ''
78 External <literal>wpa_supplicant.conf</literal> configuration file.
79 The configuration options defined declaratively within <literal>networking.supplicant</literal> have
···170171 default = { };
172173+ example = literalExpression ''
174 { "wlan0 wlan1" = {
175 configFile.path = "/etc/wpa_supplicant.conf";
176 userControlled.group = "network";
+4-3
nixos/modules/services/networking/supybot.nix
···24 default = if versionAtLeast config.system.stateVersion "20.09"
25 then "/var/lib/supybot"
26 else "/home/supybot";
27- defaultText = "/var/lib/supybot";
28 description = "The root directory, logs and plugins are stored here";
29 };
30···49 Please note that you still need to add the plugins to the config
50 file (or with <literal>!load</literal>) using their attribute name.
51 '';
52- example = literalExample ''
53 let
54 plugins = pkgs.fetchzip {
55 url = "https://github.com/ProgVal/Supybot-plugins/archive/57c2450c.zip";
···66 extraPackages = mkOption {
67 type = types.functionTo (types.listOf types.package);
68 default = p: [];
069 description = ''
70 Extra Python packages available to supybot plugins. The
71 value must be a function which receives the attrset defined
72 in <varname>python3Packages</varname> as the sole argument.
73 '';
74- example = literalExample "p: [ p.lxml p.requests ]";
75 };
7677 };
···24 default = if versionAtLeast config.system.stateVersion "20.09"
25 then "/var/lib/supybot"
26 else "/home/supybot";
27+ defaultText = literalExpression "/var/lib/supybot";
28 description = "The root directory, logs and plugins are stored here";
29 };
30···49 Please note that you still need to add the plugins to the config
50 file (or with <literal>!load</literal>) using their attribute name.
51 '';
52+ example = literalExpression ''
53 let
54 plugins = pkgs.fetchzip {
55 url = "https://github.com/ProgVal/Supybot-plugins/archive/57c2450c.zip";
···66 extraPackages = mkOption {
67 type = types.functionTo (types.listOf types.package);
68 default = p: [];
69+ defaultText = literalExpression "p: []";
70 description = ''
71 Extra Python packages available to supybot plugins. The
72 value must be a function which receives the attrset defined
73 in <varname>python3Packages</varname> as the sole argument.
74 '';
75+ example = literalExpression "p: [ p.lxml p.requests ]";
76 };
7778 };
+5-5
nixos/modules/services/networking/syncthing.nix
···182 will be reverted on restart if <link linkend="opt-services.syncthing.overrideDevices">overrideDevices</link>
183 is enabled.
184 '';
185- example = literalExample ''
186 {
187 "/home/user/sync" = {
188 id = "syncme";
···243 There are 4 different types of versioning with different parameters.
244 See <link xlink:href="https://docs.syncthing.net/users/versioning.html"/>.
245 '';
246- example = literalExample ''
247 [
248 {
249 versioning = {
···430 description = ''
431 The path where the settings and keys will exist.
432 '';
433- default = cfg.dataDir + (optionalString cond "/.config/syncthing");
434- defaultText = literalExample "dataDir${optionalString cond " + \"/.config/syncthing\""}";
435 };
436437 extraFlags = mkOption {
···461 package = mkOption {
462 type = types.package;
463 default = pkgs.syncthing;
464- defaultText = literalExample "pkgs.syncthing";
465 description = ''
466 The Syncthing package to use.
467 '';
···182 will be reverted on restart if <link linkend="opt-services.syncthing.overrideDevices">overrideDevices</link>
183 is enabled.
184 '';
185+ example = literalExpression ''
186 {
187 "/home/user/sync" = {
188 id = "syncme";
···243 There are 4 different types of versioning with different parameters.
244 See <link xlink:href="https://docs.syncthing.net/users/versioning.html"/>.
245 '';
246+ example = literalExpression ''
247 [
248 {
249 versioning = {
···430 description = ''
431 The path where the settings and keys will exist.
432 '';
433+ default = cfg.dataDir + optionalString cond "/.config/syncthing";
434+ defaultText = literalExpression "dataDir${optionalString cond " + \"/.config/syncthing\""}";
435 };
436437 extraFlags = mkOption {
···461 package = mkOption {
462 type = types.package;
463 default = pkgs.syncthing;
464+ defaultText = literalExpression "pkgs.syncthing";
465 description = ''
466 The Syncthing package to use.
467 '';
+1-1
nixos/modules/services/networking/tailscale.nix
···24 package = mkOption {
25 type = types.package;
26 default = pkgs.tailscale;
27- defaultText = "pkgs.tailscale";
28 description = "The package to use for tailscale";
29 };
30 };
···24 package = mkOption {
25 type = types.package;
26 default = pkgs.tailscale;
27+ defaultText = literalExpression "pkgs.tailscale";
28 description = "The package to use for tailscale";
29 };
30 };
+1-1
nixos/modules/services/networking/tedicross.nix
···18 config = mkOption {
19 type = types.attrs;
20 # from https://github.com/TediCross/TediCross/blob/master/example.settings.yaml
21- example = literalExample ''
22 {
23 telegram = {
24 useFirstNameInsteadOfUsername = false;
···18 config = mkOption {
19 type = types.attrs;
20 # from https://github.com/TediCross/TediCross/blob/master/example.settings.yaml
21+ example = literalExpression ''
22 {
23 telegram = {
24 useFirstNameInsteadOfUsername = false;
···22 auto_add_peers = mkOption {
23 type = types.listOf types.str;
24 default = [];
25- example = ''[ "toxid1" "toxid2" ]'';
26 description = "peers to automatically connect to on startup";
27 };
28 };
···22 auto_add_peers = mkOption {
23 type = types.listOf types.str;
24 default = [];
25+ example = [ "toxid1" "toxid2" ];
26 description = "peers to automatically connect to on startup";
27 };
28 };
+1-1
nixos/modules/services/networking/trickster.nix
···20 package = mkOption {
21 type = types.package;
22 default = pkgs.trickster;
23- defaultText = "pkgs.trickster";
24 description = ''
25 Package that should be used for trickster.
26 '';
···20 package = mkOption {
21 type = types.package;
22 default = pkgs.trickster;
23+ defaultText = literalExpression "pkgs.trickster";
24 description = ''
25 Package that should be used for trickster.
26 '';
+5-5
nixos/modules/services/networking/ucarp.nix
···91 Command to run after become master, the interface name, virtual address
92 and optional extra parameters are passed as arguments.
93 '';
94- example = ''
95 pkgs.writeScript "upscript" '''
96 #!/bin/sh
97- $\{pkgs.iproute2\}/bin/ip addr add "$2"/24 dev "$1"
98 ''';
99 '';
100 };
···105 Command to run after become backup, the interface name, virtual address
106 and optional extra parameters are passed as arguments.
107 '';
108- example = ''
109 pkgs.writeScript "downscript" '''
110 #!/bin/sh
111- $\{pkgs.iproute2\}/bin/ip addr del "$2"/24 dev "$1"
112 ''';
113 '';
114 };
···152 upstream updates for a long time and can be considered as unmaintained.
153 '';
154 default = pkgs.ucarp;
155- defaultText = "pkgs.ucarp";
156 };
157 };
158
···91 Command to run after become master, the interface name, virtual address
92 and optional extra parameters are passed as arguments.
93 '';
94+ example = literalExpression ''
95 pkgs.writeScript "upscript" '''
96 #!/bin/sh
97+ ''${pkgs.iproute2}/bin/ip addr add "$2"/24 dev "$1"
98 ''';
99 '';
100 };
···105 Command to run after become backup, the interface name, virtual address
106 and optional extra parameters are passed as arguments.
107 '';
108+ example = literalExpression ''
109 pkgs.writeScript "downscript" '''
110 #!/bin/sh
111+ ''${pkgs.iproute2}/bin/ip addr del "$2"/24 dev "$1"
112 ''';
113 '';
114 };
···152 upstream updates for a long time and can be considered as unmaintained.
153 '';
154 default = pkgs.ucarp;
155+ defaultText = literalExpression "pkgs.ucarp";
156 };
157 };
158
+2-2
nixos/modules/services/networking/unbound.nix
···45 package = mkOption {
46 type = types.package;
47 default = pkgs.unbound-with-systemd;
48- defaultText = "pkgs.unbound-with-systemd";
49 description = "The unbound package to use";
50 };
51···128 };
129 };
130 };
131- example = literalExample ''
132 {
133 server = {
134 interface = [ "127.0.0.1" ];
···328 description = ''
329 Set this to <literal>true</literal> if the SSID of the network is hidden.
330 '';
331- example = literalExample ''
332 { echelon = {
333 hidden = true;
334 psk = "abcdefgh";
···377 /etc/wpa_supplicant.conf as the configuration file.
378 '';
379 default = {};
380- example = literalExample ''
381 { echelon = { # SSID with no spaces or special characters
382 psk = "abcdefgh"; # (password will be written to /nix/store!)
383 };
···328 description = ''
329 Set this to <literal>true</literal> if the SSID of the network is hidden.
330 '';
331+ example = literalExpression ''
332 { echelon = {
333 hidden = true;
334 psk = "abcdefgh";
···377 /etc/wpa_supplicant.conf as the configuration file.
378 '';
379 default = {};
380+ example = literalExpression ''
381 { echelon = { # SSID with no spaces or special characters
382 psk = "abcdefgh"; # (password will be written to /nix/store!)
383 };
+8-7
nixos/modules/services/networking/x2goserver.nix
···42 nxagentDefaultOptions = mkOption {
43 type = types.listOf types.str;
44 default = [ "-extension GLX" "-nolisten tcp" ];
45- example = [ "-extension GLX" "-nolisten tcp" ];
46 description = ''
47 List of default nx agent options.
48 '';
···55 x2goserver.conf ini configuration as nix attributes. See
56 `x2goserver.conf(5)` for details
57 '';
58- example = literalExample ''
59- superenicer = {
60- "enable" = "yes";
61- "idle-nice-level" = 19;
62- };
63- telekinesis = { "enable" = "no"; };
0064 '';
65 };
66 };
···40 package = mkOption {
41 type = types.package;
42 default = pkgs.certmgr;
43- defaultText = "pkgs.certmgr";
44 description = "Which certmgr package to use in the service.";
45 };
46···7677 specs = mkOption {
78 default = {};
79- example = literalExample ''
80 {
81 exampleCert =
82 let
···40 package = mkOption {
41 type = types.package;
42 default = pkgs.certmgr;
43+ defaultText = literalExpression "pkgs.certmgr";
44 description = "Which certmgr package to use in the service.";
45 };
46···7677 specs = mkOption {
78 default = {};
79+ example = literalExpression ''
80 {
81 exampleCert =
82 let
+2-2
nixos/modules/services/security/cfssl.nix
···27 };
2829 ca = mkOption {
30- defaultText = "\${cfg.dataDir}/ca.pem";
31 type = types.str;
32 description = "CA used to sign the new certificate -- accepts '[file:]fname' or 'env:varname'.";
33 };
3435 caKey = mkOption {
36- defaultText = "file:\${cfg.dataDir}/ca-key.pem";
37 type = types.str;
38 description = "CA private key -- accepts '[file:]fname' or 'env:varname'.";
39 };
···27 };
2829 ca = mkOption {
30+ defaultText = literalExpression ''"''${cfg.dataDir}/ca.pem"'';
31 type = types.str;
32 description = "CA used to sign the new certificate -- accepts '[file:]fname' or 'env:varname'.";
33 };
3435 caKey = mkOption {
36+ defaultText = literalExpression ''"file:''${cfg.dataDir}/ca-key.pem"'';
37 type = types.str;
38 description = "CA private key -- accepts '[file:]fname' or 'env:varname'.";
39 };
+6-4
nixos/modules/services/security/fail2ban.nix
···5556 package = mkOption {
57 default = pkgs.fail2ban;
058 type = types.package;
59- example = "pkgs.fail2ban_0_11";
60 description = "The fail2ban package to use for running the fail2ban service.";
61 };
6263 packageFirewall = mkOption {
64 default = pkgs.iptables;
065 type = types.package;
66- example = "pkgs.nftables";
67 description = "The firewall package used by fail2ban service.";
68 };
6970 extraPackages = mkOption {
71 default = [];
72 type = types.listOf types.package;
73- example = lib.literalExample "[ pkgs.ipset ]";
74 description = ''
75 Extra packages to be made available to the fail2ban service. The example contains
76 the packages needed by the `iptables-ipset-proto6` action.
···202203 jails = mkOption {
204 default = { };
205- example = literalExample ''
206 { apache-nohome-iptables = '''
207 # Block an IP address if it accesses a non-existent
208 # home directory more than 5 times in 10 minutes,
···5556 package = mkOption {
57 default = pkgs.fail2ban;
58+ defaultText = literalExpression "pkgs.fail2ban";
59 type = types.package;
60+ example = literalExpression "pkgs.fail2ban_0_11";
61 description = "The fail2ban package to use for running the fail2ban service.";
62 };
6364 packageFirewall = mkOption {
65 default = pkgs.iptables;
66+ defaultText = literalExpression "pkgs.iptables";
67 type = types.package;
68+ example = literalExpression "pkgs.nftables";
69 description = "The firewall package used by fail2ban service.";
70 };
7172 extraPackages = mkOption {
73 default = [];
74 type = types.listOf types.package;
75+ example = lib.literalExpression "[ pkgs.ipset ]";
76 description = ''
77 Extra packages to be made available to the fail2ban service. The example contains
78 the packages needed by the `iptables-ipset-proto6` action.
···204205 jails = mkOption {
206 default = { };
207+ example = literalExpression ''
208 { apache-nohome-iptables = '''
209 # Block an IP address if it accesses a non-existent
210 # home directory more than 5 times in 10 minutes,
···44 package = mkOption {
45 type = types.package;
46 default = pkgs.usbguard;
47- defaultText = "pkgs.usbguard";
48 description = ''
49 The usbguard package to use. If you do not need the Qt GUI, use
50 <literal>pkgs.usbguard-nox</literal> to save disk space.
···44 package = mkOption {
45 type = types.package;
46 default = pkgs.usbguard;
47+ defaultText = literalExpression "pkgs.usbguard";
48 description = ''
49 The usbguard package to use. If you do not need the Qt GUI, use
50 <literal>pkgs.usbguard-nox</literal> to save disk space.
···3940 systemScheduler = mkOption {
41 default = true;
42- example = "false";
43 type = types.bool;
44 description = "When true, execute the runs via the flexget-runner.timer. If false, you have to specify the settings yourself in the YML file.";
45 };
···3940 systemScheduler = mkOption {
41 default = true;
42+ example = false;
43 type = types.bool;
44 description = "When true, execute the runs via the flexget-runner.timer. If false, you have to specify the settings yourself in the YML file.";
45 };
···33 apply = p: p.override {
34 plugins = lib.unique (p.enabledPlugins ++ cfg.plugins);
35 };
36- defaultText = "pkgs.discourse";
37 description = ''
38 The discourse package to use.
39 '';
···45 config.networking.fqdn
46 else
47 config.networking.hostName;
48- defaultText = "config.networking.fqdn";
49 example = "discourse.example.com";
50 description = ''
51 The hostname to serve Discourse on.
···99 enableACME = lib.mkOption {
100 type = lib.types.bool;
101 default = cfg.sslCertificate == null && cfg.sslCertificateKey == null;
102- defaultText = "true, unless services.discourse.sslCertificate and services.discourse.sslCertificateKey are set.";
000103 description = ''
104 Whether an ACME certificate should be used to secure
105 connections to the server.
···109 backendSettings = lib.mkOption {
110 type = with lib.types; attrsOf (nullOr (oneOf [ str int bool float ]));
111 default = {};
112- example = lib.literalExample ''
113 {
114 max_reqs_per_ip_per_minute = 300;
115 max_reqs_per_ip_per_10_seconds = 60;
···134 siteSettings = lib.mkOption {
135 type = json.type;
136 default = {};
137- example = lib.literalExample ''
138 {
139 required = {
140 title = "My Cats";
···334 notificationEmailAddress = lib.mkOption {
335 type = lib.types.str;
336 default = "${if cfg.mail.incoming.enable then "notifications" else "noreply"}@${cfg.hostname}";
337- defaultText = ''
338- "notifications@`config.services.discourse.hostname`" if
339- config.services.discourse.mail.incoming.enable is "true",
340- otherwise "noreply`config.services.discourse.hostname`"
341 '';
342 description = ''
343 The <literal>from:</literal> email address used when
···448 replyEmailAddress = lib.mkOption {
449 type = lib.types.str;
450 default = "%{reply_key}@${cfg.hostname}";
451- defaultText = "%{reply_key}@`config.services.discourse.hostname`";
452 description = ''
453 Template for reply by email incoming email address, for
454 example: %{reply_key}@reply.example.com or
···459 mailReceiverPackage = lib.mkOption {
460 type = lib.types.package;
461 default = pkgs.discourse-mail-receiver;
462- defaultText = "pkgs.discourse-mail-receiver";
463 description = ''
464 The discourse-mail-receiver package to use.
465 '';
···484 plugins = lib.mkOption {
485 type = lib.types.listOf lib.types.package;
486 default = [];
487- example = lib.literalExample ''
488 with config.services.discourse.package.plugins; [
489 discourse-canned-replies
490 discourse-github
···33 apply = p: p.override {
34 plugins = lib.unique (p.enabledPlugins ++ cfg.plugins);
35 };
36+ defaultText = lib.literalExpression "pkgs.discourse";
37 description = ''
38 The discourse package to use.
39 '';
···45 config.networking.fqdn
46 else
47 config.networking.hostName;
48+ defaultText = lib.literalExpression "config.networking.fqdn";
49 example = "discourse.example.com";
50 description = ''
51 The hostname to serve Discourse on.
···99 enableACME = lib.mkOption {
100 type = lib.types.bool;
101 default = cfg.sslCertificate == null && cfg.sslCertificateKey == null;
102+ defaultText = lib.literalDocBook ''
103+ <literal>true</literal>, unless <option>services.discourse.sslCertificate</option>
104+ and <option>services.discourse.sslCertificateKey</option> are set.
105+ '';
106 description = ''
107 Whether an ACME certificate should be used to secure
108 connections to the server.
···112 backendSettings = lib.mkOption {
113 type = with lib.types; attrsOf (nullOr (oneOf [ str int bool float ]));
114 default = {};
115+ example = lib.literalExpression ''
116 {
117 max_reqs_per_ip_per_minute = 300;
118 max_reqs_per_ip_per_10_seconds = 60;
···137 siteSettings = lib.mkOption {
138 type = json.type;
139 default = {};
140+ example = lib.literalExpression ''
141 {
142 required = {
143 title = "My Cats";
···337 notificationEmailAddress = lib.mkOption {
338 type = lib.types.str;
339 default = "${if cfg.mail.incoming.enable then "notifications" else "noreply"}@${cfg.hostname}";
340+ defaultText = lib.literalExpression ''
341+ "''${if config.services.discourse.mail.incoming.enable then "notifications" else "noreply"}@''${config.services.discourse.hostname}"
00342 '';
343 description = ''
344 The <literal>from:</literal> email address used when
···449 replyEmailAddress = lib.mkOption {
450 type = lib.types.str;
451 default = "%{reply_key}@${cfg.hostname}";
452+ defaultText = lib.literalExpression ''"%{reply_key}@''${config.services.discourse.hostname}"'';
453 description = ''
454 Template for reply by email incoming email address, for
455 example: %{reply_key}@reply.example.com or
···460 mailReceiverPackage = lib.mkOption {
461 type = lib.types.package;
462 default = pkgs.discourse-mail-receiver;
463+ defaultText = lib.literalExpression "pkgs.discourse-mail-receiver";
464 description = ''
465 The discourse-mail-receiver package to use.
466 '';
···485 plugins = lib.mkOption {
486 type = lib.types.listOf lib.types.package;
487 default = [];
488+ example = lib.literalExpression ''
489 with config.services.discourse.package.plugins; [
490 discourse-canned-replies
491 discourse-github
+1
nixos/modules/services/web-apps/documize.nix
···26 package = mkOption {
27 type = types.package;
28 default = pkgs.documize-community;
029 description = ''
30 Which package to use for documize.
31 '';
···26 package = mkOption {
27 type = types.package;
28 default = pkgs.documize-community;
29+ defaultText = literalExpression "pkgs.documize-community";
30 description = ''
31 Which package to use for documize.
32 '';
+33-32
nixos/modules/services/web-apps/dokuwiki.nix
···23let
4 inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types maintainers recursiveUpdate;
5- inherit (lib) any attrValues concatMapStrings concatMapStringsSep flatten literalExample;
6 inherit (lib) filterAttrs mapAttrs mapAttrs' mapAttrsToList nameValuePair optional optionalAttrs optionalString;
78 cfg = migrateOldAttrs config.services.dokuwiki;
···69 package = mkOption {
70 type = types.package;
71 default = pkgs.dokuwiki;
072 description = "Which DokuWiki package to use.";
73 };
74···167 List of path(s) to respective plugin(s) which are copied from the 'plugin' directory.
168 <note><para>These plugins need to be packaged before use, see example.</para></note>
169 '';
170- example = ''
171- # Let's package the icalevents plugin
172- plugin-icalevents = pkgs.stdenv.mkDerivation {
173- name = "icalevents";
174- # Download the plugin from the dokuwiki site
175- src = pkgs.fetchurl {
176- url = "https://github.com/real-or-random/dokuwiki-plugin-icalevents/releases/download/2017-06-16/dokuwiki-plugin-icalevents-2017-06-16.zip";
177- sha256 = "e40ed7dd6bbe7fe3363bbbecb4de481d5e42385b5a0f62f6a6ce6bf3a1f9dfa8";
0000000178 };
179- sourceRoot = ".";
180- # We need unzip to build this package
181- buildInputs = [ pkgs.unzip ];
182- # Installing simply means copying all files to the output directory
183- installPhase = "mkdir -p $out; cp -R * $out/";
184- };
185-186 # And then pass this theme to the plugin list like this:
187- plugins = [ plugin-icalevents ];
188 '';
189 };
190···195 List of path(s) to respective template(s) which are copied from the 'tpl' directory.
196 <note><para>These templates need to be packaged before use, see example.</para></note>
197 '';
198- example = ''
199- # Let's package the bootstrap3 theme
200- template-bootstrap3 = pkgs.stdenv.mkDerivation {
201- name = "bootstrap3";
202- # Download the theme from the dokuwiki site
203- src = pkgs.fetchurl {
204- url = "https://github.com/giterlizzi/dokuwiki-template-bootstrap3/archive/v2019-05-22.zip";
205- sha256 = "4de5ff31d54dd61bbccaf092c9e74c1af3a4c53e07aa59f60457a8f00cfb23a6";
000000206 };
207- # We need unzip to build this package
208- buildInputs = [ pkgs.unzip ];
209- # Installing simply means copying all files to the output directory
210- installPhase = "mkdir -p $out; cp -R * $out/";
211- };
212-213 # And then pass this theme to the template list like this:
214- templates = [ template-bootstrap3 ];
215 '';
216 };
217
···23let
4 inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types maintainers recursiveUpdate;
5+ inherit (lib) any attrValues concatMapStrings concatMapStringsSep flatten literalExpression;
6 inherit (lib) filterAttrs mapAttrs mapAttrs' mapAttrsToList nameValuePair optional optionalAttrs optionalString;
78 cfg = migrateOldAttrs config.services.dokuwiki;
···69 package = mkOption {
70 type = types.package;
71 default = pkgs.dokuwiki;
72+ defaultText = literalExpression "pkgs.dokuwiki";
73 description = "Which DokuWiki package to use.";
74 };
75···168 List of path(s) to respective plugin(s) which are copied from the 'plugin' directory.
169 <note><para>These plugins need to be packaged before use, see example.</para></note>
170 '';
171+ example = literalExpression ''
172+ let
173+ # Let's package the icalevents plugin
174+ plugin-icalevents = pkgs.stdenv.mkDerivation {
175+ name = "icalevents";
176+ # Download the plugin from the dokuwiki site
177+ src = pkgs.fetchurl {
178+ url = "https://github.com/real-or-random/dokuwiki-plugin-icalevents/releases/download/2017-06-16/dokuwiki-plugin-icalevents-2017-06-16.zip";
179+ sha256 = "e40ed7dd6bbe7fe3363bbbecb4de481d5e42385b5a0f62f6a6ce6bf3a1f9dfa8";
180+ };
181+ sourceRoot = ".";
182+ # We need unzip to build this package
183+ buildInputs = [ pkgs.unzip ];
184+ # Installing simply means copying all files to the output directory
185+ installPhase = "mkdir -p $out; cp -R * $out/";
186 };
0000000187 # And then pass this theme to the plugin list like this:
188+ in [ plugin-icalevents ]
189 '';
190 };
191···196 List of path(s) to respective template(s) which are copied from the 'tpl' directory.
197 <note><para>These templates need to be packaged before use, see example.</para></note>
198 '';
199+ example = literalExpression ''
200+ let
201+ # Let's package the bootstrap3 theme
202+ template-bootstrap3 = pkgs.stdenv.mkDerivation {
203+ name = "bootstrap3";
204+ # Download the theme from the dokuwiki site
205+ src = pkgs.fetchurl {
206+ url = "https://github.com/giterlizzi/dokuwiki-template-bootstrap3/archive/v2019-05-22.zip";
207+ sha256 = "4de5ff31d54dd61bbccaf092c9e74c1af3a4c53e07aa59f60457a8f00cfb23a6";
208+ };
209+ # We need unzip to build this package
210+ buildInputs = [ pkgs.unzip ];
211+ # Installing simply means copying all files to the output directory
212+ installPhase = "mkdir -p $out; cp -R * $out/";
213 };
000000214 # And then pass this theme to the template list like this:
215+ in [ template-bootstrap3 ]
216 '';
217 };
218
···48 as they don't get backported if they are not security-relevant.
49 '';
50 default = pkgs.matomo;
51- defaultText = "pkgs.matomo";
52 };
5354 webServerUser = mkOption {
···100 )
101 );
102 default = null;
103- example = {
104- serverAliases = [
105- "matomo.\${config.networking.domain}"
106- "stats.\${config.networking.domain}"
107- ];
108- enableACME = false;
109- };
00110 description = ''
111 With this option, you can customize an nginx virtualHost which already has sensible defaults for Matomo.
112 Either this option or the webServerUser option is mandatory.
···48 as they don't get backported if they are not security-relevant.
49 '';
50 default = pkgs.matomo;
51+ defaultText = literalExpression "pkgs.matomo";
52 };
5354 webServerUser = mkOption {
···100 )
101 );
102 default = null;
103+ example = literalExpression ''
104+ {
105+ serverAliases = [
106+ "matomo.''${config.networking.domain}"
107+ "stats.''${config.networking.domain}"
108+ ];
109+ enableACME = false;
110+ }
111+ '';
112 description = ''
113 With this option, you can customize an nginx virtualHost which already has sensible defaults for Matomo.
114 Either this option or the webServerUser option is mandatory.
+6-5
nixos/modules/services/web-apps/mediawiki.nix
···3let
45 inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption;
6- inherit (lib) concatStringsSep literalExample mapAttrsToList optional optionals optionalString types;
78 cfg = config.services.mediawiki;
9 fpm = config.services.phpfpm.pools.mediawiki;
···176 package = mkOption {
177 type = types.package;
178 default = pkgs.mediawiki;
0179 description = "Which MediaWiki package to use.";
180 };
181···219220 Use <literal>null</literal> instead of path to enable extensions that are part of MediaWiki.
221 '';
222- example = literalExample ''
223 {
224 Matomo = pkgs.fetchzip {
225 url = "https://github.com/DaSchTour/matomo-mediawiki-extension/archive/v4.0.1.tar.gz";
···286 socket = mkOption {
287 type = types.nullOr types.path;
288 default = if cfg.database.createLocally then "/run/mysqld/mysqld.sock" else null;
289- defaultText = "/run/mysqld/mysqld.sock";
290 description = "Path to the unix socket file to use for authentication.";
291 };
292293 createLocally = mkOption {
294 type = types.bool;
295 default = cfg.database.type == "mysql";
296- defaultText = "true";
297 description = ''
298 Create the database and database user locally.
299 This currently only applies if database type "mysql" is selected.
···303304 virtualHost = mkOption {
305 type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
306- example = literalExample ''
307 {
308 hostName = "mediawiki.example.org";
309 adminAddr = "webmaster@example.org";
···3let
45 inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption;
6+ inherit (lib) concatStringsSep literalExpression mapAttrsToList optional optionals optionalString types;
78 cfg = config.services.mediawiki;
9 fpm = config.services.phpfpm.pools.mediawiki;
···176 package = mkOption {
177 type = types.package;
178 default = pkgs.mediawiki;
179+ defaultText = literalExpression "pkgs.mediawiki";
180 description = "Which MediaWiki package to use.";
181 };
182···220221 Use <literal>null</literal> instead of path to enable extensions that are part of MediaWiki.
222 '';
223+ example = literalExpression ''
224 {
225 Matomo = pkgs.fetchzip {
226 url = "https://github.com/DaSchTour/matomo-mediawiki-extension/archive/v4.0.1.tar.gz";
···287 socket = mkOption {
288 type = types.nullOr types.path;
289 default = if cfg.database.createLocally then "/run/mysqld/mysqld.sock" else null;
290+ defaultText = literalExpression "/run/mysqld/mysqld.sock";
291 description = "Path to the unix socket file to use for authentication.";
292 };
293294 createLocally = mkOption {
295 type = types.bool;
296 default = cfg.database.type == "mysql";
297+ defaultText = literalExpression "true";
298 description = ''
299 Create the database and database user locally.
300 This currently only applies if database type "mysql" is selected.
···304305 virtualHost = mkOption {
306 type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
307+ example = literalExpression ''
308 {
309 hostName = "mediawiki.example.org";
310 adminAddr = "webmaster@example.org";
···23let
4 inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types;
5- inherit (lib) concatStringsSep literalExample mapAttrsToList optional optionalString;
67 cfg = config.services.moodle;
8 fpm = config.services.phpfpm.pools.moodle;
···67 package = mkOption {
68 type = types.package;
69 default = pkgs.moodle;
70- defaultText = "pkgs.moodle";
71 description = "The Moodle package to use.";
72 };
73···100 mysql = 3306;
101 pgsql = 5432;
102 }.${cfg.database.type};
103- defaultText = "3306";
104 };
105106 name = mkOption {
···131 if mysqlLocal then "/run/mysqld/mysqld.sock"
132 else if pgsqlLocal then "/run/postgresql"
133 else null;
134- defaultText = "/run/mysqld/mysqld.sock";
135 description = "Path to the unix socket file to use for authentication.";
136 };
137···144145 virtualHost = mkOption {
146 type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
147- example = literalExample ''
148 {
149 hostName = "moodle.example.org";
150 adminAddr = "webmaster@example.org";
···23let
4 inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types;
5+ inherit (lib) concatStringsSep literalExpression mapAttrsToList optional optionalString;
67 cfg = config.services.moodle;
8 fpm = config.services.phpfpm.pools.moodle;
···67 package = mkOption {
68 type = types.package;
69 default = pkgs.moodle;
70+ defaultText = literalExpression "pkgs.moodle";
71 description = "The Moodle package to use.";
72 };
73···100 mysql = 3306;
101 pgsql = 5432;
102 }.${cfg.database.type};
103+ defaultText = literalExpression "3306";
104 };
105106 name = mkOption {
···131 if mysqlLocal then "/run/mysqld/mysqld.sock"
132 else if pgsqlLocal then "/run/postgresql"
133 else null;
134+ defaultText = literalExpression "/run/mysqld/mysqld.sock";
135 description = "Path to the unix socket file to use for authentication.";
136 };
137···144145 virtualHost = mkOption {
146 type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
147+ example = literalExpression ''
148 {
149 hostName = "moodle.example.org";
150 adminAddr = "webmaster@example.org";
+2-2
nixos/modules/services/web-apps/nextcloud.nix
···134 phpExtraExtensions = mkOption {
135 type = with types; functionTo (listOf package);
136 default = all: [];
137- defaultText = "all: []";
138 description = ''
139 Additional PHP extensions to use for nextcloud.
140 By default, only extensions necessary for a vanilla nextcloud installation are enabled,
141 but you may choose from the list of available extensions and add further ones.
142 This is sometimes necessary to be able to install a certain nextcloud app that has additional requirements.
143 '';
144- example = literalExample ''
145 all: [ all.pdlib all.bz2 ]
146 '';
147 };
···134 phpExtraExtensions = mkOption {
135 type = with types; functionTo (listOf package);
136 default = all: [];
137+ defaultText = literalExpression "all: []";
138 description = ''
139 Additional PHP extensions to use for nextcloud.
140 By default, only extensions necessary for a vanilla nextcloud installation are enabled,
141 but you may choose from the list of available extensions and add further ones.
142 This is sometimes necessary to be able to install a certain nextcloud app that has additional requirements.
143 '';
144+ example = literalExpression ''
145 all: [ all.pdlib all.bz2 ]
146 '';
147 };
···30 dataDir = mkOption {
31 type = types.path;
32 default = "/var/lib/restya-board";
33- example = "/var/lib/restya-board";
34 description = ''
35 Data of the application.
36 '';
···39 user = mkOption {
40 type = types.str;
41 default = "restya-board";
42- example = "restya-board";
43 description = ''
44 User account under which the web-application runs.
45 '';
···48 group = mkOption {
49 type = types.str;
50 default = "nginx";
51- example = "nginx";
52 description = ''
53 Group account under which the web-application runs.
54 '';
···30 dataDir = mkOption {
31 type = types.path;
32 default = "/var/lib/restya-board";
033 description = ''
34 Data of the application.
35 '';
···38 user = mkOption {
39 type = types.str;
40 default = "restya-board";
041 description = ''
42 User account under which the web-application runs.
43 '';
···46 group = mkOption {
47 type = types.str;
48 default = "nginx";
049 description = ''
50 Group account under which the web-application runs.
51 '';
+1-3
nixos/modules/services/web-apps/rss-bridge.nix
···16 user = mkOption {
17 type = types.str;
18 default = "nginx";
19- example = "nginx";
20 description = ''
21 User account under which both the service and the web-application run.
22 '';
···25 group = mkOption {
26 type = types.str;
27 default = "nginx";
28- example = "nginx";
29 description = ''
30 Group under which the web-application run.
31 '';
···61 whitelist = mkOption {
62 type = types.listOf types.str;
63 default = [];
64- example = options.literalExample ''
65 [
66 "Facebook"
67 "Instagram"
···16 user = mkOption {
17 type = types.str;
18 default = "nginx";
019 description = ''
20 User account under which both the service and the web-application run.
21 '';
···24 group = mkOption {
25 type = types.str;
26 default = "nginx";
027 description = ''
28 Group under which the web-application run.
29 '';
···59 whitelist = mkOption {
60 type = types.listOf types.str;
61 default = [];
62+ example = options.literalExpression ''
63 [
64 "Facebook"
65 "Instagram"
-1
nixos/modules/services/web-apps/selfoss.nix
···35 user = mkOption {
36 type = types.str;
37 default = "nginx";
38- example = "nginx";
39 description = ''
40 User account under which both the service and the web-application run.
41 '';
···35 user = mkOption {
36 type = types.str;
37 default = "nginx";
038 description = ''
39 User account under which both the service and the web-application run.
40 '';
+1-1
nixos/modules/services/web-apps/shiori.nix
···11 package = mkOption {
12 type = types.package;
13 default = pkgs.shiori;
14- defaultText = "pkgs.shiori";
15 description = "The Shiori package to use.";
16 };
17
···11 package = mkOption {
12 type = types.package;
13 default = pkgs.shiori;
14+ defaultText = literalExpression "pkgs.shiori";
15 description = "The Shiori package to use.";
16 };
17
-2
nixos/modules/services/web-apps/tt-rss.nix
···126 root = mkOption {
127 type = types.path;
128 default = "/var/lib/tt-rss";
129- example = "/var/lib/tt-rss";
130 description = ''
131 Root of the application.
132 '';
···135 user = mkOption {
136 type = types.str;
137 default = "tt_rss";
138- example = "tt_rss";
139 description = ''
140 User account under which both the update daemon and the web-application run.
141 '';
···126 root = mkOption {
127 type = types.path;
128 default = "/var/lib/tt-rss";
0129 description = ''
130 Root of the application.
131 '';
···134 user = mkOption {
135 type = types.str;
136 default = "tt_rss";
0137 description = ''
138 User account under which both the update daemon and the web-application run.
139 '';
+3-3
nixos/modules/services/web-apps/vikunja.nix
···14 package-api = mkOption {
15 default = pkgs.vikunja-api;
16 type = types.package;
17- defaultText = "pkgs.vikunja-api";
18 description = "vikunja-api derivation to use.";
19 };
20 package-frontend = mkOption {
21 default = pkgs.vikunja-frontend;
22 type = types.package;
23- defaultText = "pkgs.vikunja-frontend";
24 description = "vikunja-frontend derivation to use.";
25 };
26 environmentFiles = mkOption {
···34 setupNginx = mkOption {
35 type = types.bool;
36 default = config.services.nginx.enable;
37- defaultText = "config.services.nginx.enable";
38 description = ''
39 Whether to setup NGINX.
40 Further nginx configuration can be done by changing
···14 package-api = mkOption {
15 default = pkgs.vikunja-api;
16 type = types.package;
17+ defaultText = literalExpression "pkgs.vikunja-api";
18 description = "vikunja-api derivation to use.";
19 };
20 package-frontend = mkOption {
21 default = pkgs.vikunja-frontend;
22 type = types.package;
23+ defaultText = literalExpression "pkgs.vikunja-frontend";
24 description = "vikunja-frontend derivation to use.";
25 };
26 environmentFiles = mkOption {
···34 setupNginx = mkOption {
35 type = types.bool;
36 default = config.services.nginx.enable;
37+ defaultText = literalExpression "config.services.nginx.enable";
38 description = ''
39 Whether to setup NGINX.
40 Further nginx configuration can be done by changing
···23let
4 inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types;
5- inherit (lib) any attrValues concatMapStringsSep flatten literalExample;
6 inherit (lib) filterAttrs mapAttrs mapAttrs' mapAttrsToList nameValuePair optional optionalAttrs optionalString;
78 cfg = migrateOldAttrs config.services.wordpress;
···87 package = mkOption {
88 type = types.package;
89 default = pkgs.wordpress;
090 description = "Which WordPress package to use.";
91 };
92···106 List of path(s) to respective plugin(s) which are copied from the 'plugins' directory.
107 <note><para>These plugins need to be packaged before use, see example.</para></note>
108 '';
109- example = ''
110- # Wordpress plugin 'embed-pdf-viewer' installation example
111- embedPdfViewerPlugin = pkgs.stdenv.mkDerivation {
112- name = "embed-pdf-viewer-plugin";
113- # Download the theme from the wordpress site
114- src = pkgs.fetchurl {
115- url = "https://downloads.wordpress.org/plugin/embed-pdf-viewer.2.0.3.zip";
116- sha256 = "1rhba5h5fjlhy8p05zf0p14c9iagfh96y91r36ni0rmk6y891lyd";
000000117 };
118- # We need unzip to build this package
119- nativeBuildInputs = [ pkgs.unzip ];
120- # Installing simply means copying all files to the output directory
121- installPhase = "mkdir -p $out; cp -R * $out/";
122- };
123-124- And then pass this theme to the themes list like this:
125- plugins = [ embedPdfViewerPlugin ];
126 '';
127 };
128···133 List of path(s) to respective theme(s) which are copied from the 'theme' directory.
134 <note><para>These themes need to be packaged before use, see example.</para></note>
135 '';
136- example = ''
137- # Let's package the responsive theme
138- responsiveTheme = pkgs.stdenv.mkDerivation {
139- name = "responsive-theme";
140- # Download the theme from the wordpress site
141- src = pkgs.fetchurl {
142- url = "https://downloads.wordpress.org/theme/responsive.3.14.zip";
143- sha256 = "0rjwm811f4aa4q43r77zxlpklyb85q08f9c8ns2akcarrvj5ydx3";
000000144 };
145- # We need unzip to build this package
146- nativeBuildInputs = [ pkgs.unzip ];
147- # Installing simply means copying all files to the output directory
148- installPhase = "mkdir -p $out; cp -R * $out/";
149- };
150-151- And then pass this theme to the themes list like this:
152- themes = [ responsiveTheme ];
153 '';
154 };
155···204 socket = mkOption {
205 type = types.nullOr types.path;
206 default = null;
207- defaultText = "/run/mysqld/mysqld.sock";
208 description = "Path to the unix socket file to use for authentication.";
209 };
210···217218 virtualHost = mkOption {
219 type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
220- example = literalExample ''
221 {
222 adminAddr = "webmaster@example.org";
223 forceSSL = true;
···23let
4 inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types;
5+ inherit (lib) any attrValues concatMapStringsSep flatten literalExpression;
6 inherit (lib) filterAttrs mapAttrs mapAttrs' mapAttrsToList nameValuePair optional optionalAttrs optionalString;
78 cfg = migrateOldAttrs config.services.wordpress;
···87 package = mkOption {
88 type = types.package;
89 default = pkgs.wordpress;
90+ defaultText = literalExpression "pkgs.wordpress";
91 description = "Which WordPress package to use.";
92 };
93···107 List of path(s) to respective plugin(s) which are copied from the 'plugins' directory.
108 <note><para>These plugins need to be packaged before use, see example.</para></note>
109 '';
110+ example = literalExpression ''
111+ let
112+ # Wordpress plugin 'embed-pdf-viewer' installation example
113+ embedPdfViewerPlugin = pkgs.stdenv.mkDerivation {
114+ name = "embed-pdf-viewer-plugin";
115+ # Download the theme from the wordpress site
116+ src = pkgs.fetchurl {
117+ url = "https://downloads.wordpress.org/plugin/embed-pdf-viewer.2.0.3.zip";
118+ sha256 = "1rhba5h5fjlhy8p05zf0p14c9iagfh96y91r36ni0rmk6y891lyd";
119+ };
120+ # We need unzip to build this package
121+ nativeBuildInputs = [ pkgs.unzip ];
122+ # Installing simply means copying all files to the output directory
123+ installPhase = "mkdir -p $out; cp -R * $out/";
124 };
125+ # And then pass this theme to the themes list like this:
126+ in [ embedPdfViewerPlugin ]
000000127 '';
128 };
129···134 List of path(s) to respective theme(s) which are copied from the 'theme' directory.
135 <note><para>These themes need to be packaged before use, see example.</para></note>
136 '';
137+ example = literalExpression ''
138+ let
139+ # Let's package the responsive theme
140+ responsiveTheme = pkgs.stdenv.mkDerivation {
141+ name = "responsive-theme";
142+ # Download the theme from the wordpress site
143+ src = pkgs.fetchurl {
144+ url = "https://downloads.wordpress.org/theme/responsive.3.14.zip";
145+ sha256 = "0rjwm811f4aa4q43r77zxlpklyb85q08f9c8ns2akcarrvj5ydx3";
146+ };
147+ # We need unzip to build this package
148+ nativeBuildInputs = [ pkgs.unzip ];
149+ # Installing simply means copying all files to the output directory
150+ installPhase = "mkdir -p $out; cp -R * $out/";
151 };
152+ # And then pass this theme to the themes list like this:
153+ in [ responsiveTheme ]
000000154 '';
155 };
156···205 socket = mkOption {
206 type = types.nullOr types.path;
207 default = null;
208+ defaultText = literalExpression "/run/mysqld/mysqld.sock";
209 description = "Path to the unix socket file to use for authentication.";
210 };
211···218219 virtualHost = mkOption {
220 type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
221+ example = literalExpression ''
222 {
223 adminAddr = "webmaster@example.org";
224 forceSSL = true;
+2-2
nixos/modules/services/web-apps/youtrack.nix
···46 https://www.jetbrains.com/help/youtrack/standalone/YouTrack-Java-Start-Parameters.html
47 for more information.
48 '';
49- example = literalExample ''
50 {
51 "jetbrains.youtrack.overrideRootPassword" = "tortuga";
52 }
···60 '';
61 type = types.package;
62 default = pkgs.youtrack;
63- defaultText = "pkgs.youtrack";
64 };
6566 port = mkOption {
···46 https://www.jetbrains.com/help/youtrack/standalone/YouTrack-Java-Start-Parameters.html
47 for more information.
48 '';
49+ example = literalExpression ''
50 {
51 "jetbrains.youtrack.overrideRootPassword" = "tortuga";
52 }
···60 '';
61 type = types.package;
62 default = pkgs.youtrack;
63+ defaultText = literalExpression "pkgs.youtrack";
64 };
6566 port = mkOption {
···2223 hostName = mkOption {
24 type = types.str;
25- example = literalExample "config.networking.hostName";
26 default = config.networking.hostName;
027 description = ''
28 The hostname to respond to requests for. Requests for URLs with
29 other hosts will result in a status 53 (PROXY REQUEST REFUSED)
···2223 hostName = mkOption {
24 type = types.str;
025 default = config.networking.hostName;
26+ defaultText = literalExpression "config.networking.hostName";
27 description = ''
28 The hostname to respond to requests for. Requests for URLs with
29 other hosts will result in a status 53 (PROXY REQUEST REFUSED)
···186 sessionPath = mkOption {
187 default = [];
188 type = types.listOf types.package;
189- example = literalExample "[ pkgs.gnome.gpaste ]";
190 description = ''
191 Additional list of packages to be added to the session search path.
192 Useful for GNOME Shell extensions or GSettings-conditional autostart.
···200 internal = true; # this is messy
201 default = defaultFavoriteAppsOverride;
202 type = types.lines;
203- example = literalExample ''
204- [org.gnome.shell]
205- favorite-apps=[ 'firefox.desktop', 'org.gnome.Calendar.desktop' ]
00206 '';
207 description = "List of desktop files to put as favorite apps into gnome-shell. These need to be installed somehow globally.";
208 };
···242 wmCommand = mkOption {
243 type = types.str;
244 description = "The executable of the window manager to use.";
245- example = "\${pkgs.haskellPackages.xmonad}/bin/xmonad";
246 };
247248 enableGnomePanel = mkOption {
249 type = types.bool;
250 default = true;
251- example = "false";
252 description = "Whether to enable the GNOME panel in this session.";
253 };
254 };
···259260 panelModulePackages = mkOption {
261 default = [ pkgs.gnome.gnome-applets ];
0262 type = types.listOf types.path;
263 description = ''
264 Packages containing modules that should be made available to <literal>gnome-panel</literal> (usually for applets).
265266 If you're packaging something to use here, please install the modules in <literal>$out/lib/gnome-panel/modules</literal>.
267 '';
268- example = literalExample "[ pkgs.gnome.gnome-applets ]";
269 };
270 };
271 };
272273 environment.gnome.excludePackages = mkOption {
274 default = [];
275- example = literalExample "[ pkgs.gnome.totem ]";
276 type = types.listOf types.package;
277 description = "Which packages gnome should exclude from the default environment";
278 };
···186 sessionPath = mkOption {
187 default = [];
188 type = types.listOf types.package;
189+ example = literalExpression "[ pkgs.gnome.gpaste ]";
190 description = ''
191 Additional list of packages to be added to the session search path.
192 Useful for GNOME Shell extensions or GSettings-conditional autostart.
···200 internal = true; # this is messy
201 default = defaultFavoriteAppsOverride;
202 type = types.lines;
203+ example = literalExpression ''
204+ '''
205+ [org.gnome.shell]
206+ favorite-apps=[ 'firefox.desktop', 'org.gnome.Calendar.desktop' ]
207+ '''
208 '';
209 description = "List of desktop files to put as favorite apps into gnome-shell. These need to be installed somehow globally.";
210 };
···244 wmCommand = mkOption {
245 type = types.str;
246 description = "The executable of the window manager to use.";
247+ example = literalExpression ''"''${pkgs.haskellPackages.xmonad}/bin/xmonad"'';
248 };
249250 enableGnomePanel = mkOption {
251 type = types.bool;
252 default = true;
253+ example = false;
254 description = "Whether to enable the GNOME panel in this session.";
255 };
256 };
···261262 panelModulePackages = mkOption {
263 default = [ pkgs.gnome.gnome-applets ];
264+ defaultText = literalExpression "[ pkgs.gnome.gnome-applets ]";
265 type = types.listOf types.path;
266 description = ''
267 Packages containing modules that should be made available to <literal>gnome-panel</literal> (usually for applets).
268269 If you're packaging something to use here, please install the modules in <literal>$out/lib/gnome-panel/modules</literal>.
270 '';
0271 };
272 };
273 };
274275 environment.gnome.excludePackages = mkOption {
276 default = [];
277+ example = literalExpression "[ pkgs.gnome.totem ]";
278 type = types.listOf types.package;
279 description = "Which packages gnome should exclude from the default environment";
280 };
···50 defaultWwwUri = mkOption {
51 type = types.str;
52 default = "${pkgs.surf-display}/share/surf-display/empty-page.html";
053 example = "https://www.example.com/";
54 description = "Default URI to display.";
55 };
···57 inactivityInterval = mkOption {
58 type = types.int;
59 default = 300;
60- example = "0";
61 description = ''
62 Setting for internal inactivity timer to restart surf-display if the
63 user goes inactive/idle to get a fresh session for the next user of
···50 defaultWwwUri = mkOption {
51 type = types.str;
52 default = "${pkgs.surf-display}/share/surf-display/empty-page.html";
53+ defaultText = literalExpression ''"''${pkgs.surf-display}/share/surf-display/empty-page.html"'';
54 example = "https://www.example.com/";
55 description = "Default URI to display.";
56 };
···58 inactivityInterval = mkOption {
59 type = types.int;
60 default = 300;
61+ example = 0;
62 description = ''
63 Setting for internal inactivity timer to restart surf-display if the
64 user goes inactive/idle to get a fresh session for the next user of
···49 thunarPlugins = mkOption {
50 default = [];
51 type = types.listOf types.package;
52- example = literalExample "[ pkgs.xfce.thunar-archive-plugin ]";
53 description = ''
54 A list of plugin that should be installed with Thunar.
55 '';
···49 thunarPlugins = mkOption {
50 default = [];
51 type = types.listOf types.package;
52+ example = literalExpression "[ pkgs.xfce.thunar-archive-plugin ]";
53 description = ''
54 A list of plugin that should be installed with Thunar.
55 '';
···35 package = mkOption {
36 type = types.package;
37 default = pkgs.gnome.gnome-themes-extra;
38- defaultText = "pkgs.gnome.gnome-themes-extra";
39 description = ''
40 The package path that contains the theme given in the name option.
41 '';
···54 package = mkOption {
55 type = types.package;
56 default = pkgs.papirus-icon-theme;
57- defaultText = "pkgs.papirus-icon-theme";
58 description = ''
59 The package path that contains the icon theme given in the name option.
60 '';
···73 package = mkOption {
74 type = types.package;
75 default = pkgs.capitaine-cursors;
76- defaultText = "pkgs.capitaine-cursors";
77 description = ''
78 The package path that contains the cursor theme given in the name option.
79 '';
···35 package = mkOption {
36 type = types.package;
37 default = pkgs.gnome.gnome-themes-extra;
38+ defaultText = literalExpression "pkgs.gnome.gnome-themes-extra";
39 description = ''
40 The package path that contains the theme given in the name option.
41 '';
···54 package = mkOption {
55 type = types.package;
56 default = pkgs.papirus-icon-theme;
57+ defaultText = literalExpression "pkgs.papirus-icon-theme";
58 description = ''
59 The package path that contains the icon theme given in the name option.
60 '';
···73 package = mkOption {
74 type = types.package;
75 default = pkgs.capitaine-cursors;
76+ defaultText = literalExpression "pkgs.capitaine-cursors";
77 description = ''
78 The package path that contains the cursor theme given in the name option.
79 '';
···48 package = mkOption {
49 type = types.package;
50 default = pkgs.gnome.gnome-themes-extra;
51- defaultText = "pkgs.gnome.gnome-themes-extra";
52 description = ''
53 The package path that contains the theme given in the name option.
54 '';
···69 package = mkOption {
70 type = types.package;
71 default = pkgs.gnome.adwaita-icon-theme;
72- defaultText = "pkgs.gnome.adwaita-icon-theme";
73 description = ''
74 The package path that contains the icon theme given in the name option.
75 '';
···90 package = mkOption {
91 type = types.package;
92 default = pkgs.gnome.adwaita-icon-theme;
93- defaultText = "pkgs.gnome.adwaita-icon-theme";
94 description = ''
95 The package path that contains the cursor theme given in the name option.
96 '';
···48 package = mkOption {
49 type = types.package;
50 default = pkgs.gnome.gnome-themes-extra;
51+ defaultText = literalExpression "pkgs.gnome.gnome-themes-extra";
52 description = ''
53 The package path that contains the theme given in the name option.
54 '';
···69 package = mkOption {
70 type = types.package;
71 default = pkgs.gnome.adwaita-icon-theme;
72+ defaultText = literalExpression "pkgs.gnome.adwaita-icon-theme";
73 description = ''
74 The package path that contains the icon theme given in the name option.
75 '';
···90 package = mkOption {
91 type = types.package;
92 default = pkgs.gnome.adwaita-icon-theme;
93+ defaultText = literalExpression "pkgs.gnome.adwaita-icon-theme";
94 description = ''
95 The package path that contains the cursor theme given in the name option.
96 '';
···148 background = mkOption {
149 type = types.path;
150 # Manual cannot depend on packages, we are actually setting the default in config below.
151- defaultText = "pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath";
152 description = ''
153 The background image or color to use.
154 '';
···148 background = mkOption {
149 type = types.path;
150 # Manual cannot depend on packages, we are actually setting the default in config below.
151+ defaultText = literalExpression "pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath";
152 description = ''
153 The background image or color to use.
154 '';
···27 default = [];
28 type = types.listOf types.package;
29 description = "List of lua packages available for being used in the Awesome configuration.";
30- example = literalExample "[ pkgs.luaPackages.vicious ]";
31 };
3233 package = mkOption {
···27 default = [];
28 type = types.listOf types.package;
29 description = "List of lua packages available for being used in the Awesome configuration.";
30+ example = literalExpression "[ pkgs.luaPackages.vicious ]";
31 };
3233 package = mkOption {
···78 authorizedKeys = mkOption {
79 type = types.listOf types.str;
80 default = config.users.users.root.openssh.authorizedKeys.keys;
81- defaultText = "config.users.users.root.openssh.authorizedKeys.keys";
82 description = ''
83 Authorized keys for the root user on initrd.
84 '';
···78 authorizedKeys = mkOption {
79 type = types.listOf types.str;
80 default = config.users.users.root.openssh.authorizedKeys.keys;
81+ defaultText = literalExpression "config.users.users.root.openssh.authorizedKeys.keys";
82 description = ''
83 Authorized keys for the root user on initrd.
84 '';
+6-6
nixos/modules/system/boot/kernel.nix
···2324 boot.kernel.features = mkOption {
25 default = {};
26- example = literalExample "{ debug = true; }";
27 internal = true;
28 description = ''
29 This option allows to enable or disable certain kernel features.
···46 });
47 # We don't want to evaluate all of linuxPackages for the manual
48 # - some of it might not even evaluate correctly.
49- defaultText = "pkgs.linuxPackages";
50- example = literalExample "pkgs.linuxKernel.packages.linux_5_10";
51 description = ''
52 This option allows you to override the Linux kernel used by
53 NixOS. Since things like external kernel module packages are
···65 boot.kernelPatches = mkOption {
66 type = types.listOf types.attrs;
67 default = [];
68- example = literalExample "[ pkgs.kernelPatches.ubuntu_fan_4_4 ]";
69 description = "A list of additional patches to apply to the kernel.";
70 };
71···113 boot.extraModulePackages = mkOption {
114 type = types.listOf types.package;
115 default = [];
116- example = literalExample "[ config.boot.kernelPackages.nvidia_x11 ]";
117 description = "A list of additional packages supplying kernel modules.";
118 };
119···181182 system.requiredKernelConfig = mkOption {
183 default = [];
184- example = literalExample ''
185 with config.lib.kernelConfig; [
186 (isYes "MODULES")
187 (isEnabled "FB_CON_DECOR")
···2324 boot.kernel.features = mkOption {
25 default = {};
26+ example = literalExpression "{ debug = true; }";
27 internal = true;
28 description = ''
29 This option allows to enable or disable certain kernel features.
···46 });
47 # We don't want to evaluate all of linuxPackages for the manual
48 # - some of it might not even evaluate correctly.
49+ defaultText = literalExpression "pkgs.linuxPackages";
50+ example = literalExpression "pkgs.linuxKernel.packages.linux_5_10";
51 description = ''
52 This option allows you to override the Linux kernel used by
53 NixOS. Since things like external kernel module packages are
···65 boot.kernelPatches = mkOption {
66 type = types.listOf types.attrs;
67 default = [];
68+ example = literalExpression "[ pkgs.kernelPatches.ubuntu_fan_4_4 ]";
69 description = "A list of additional patches to apply to the kernel.";
70 };
71···113 boot.extraModulePackages = mkOption {
114 type = types.listOf types.package;
115 default = [];
116+ example = literalExpression "[ config.boot.kernelPackages.nvidia_x11 ]";
117 description = "A list of additional packages supplying kernel modules.";
118 };
119···181182 system.requiredKernelConfig = mkOption {
183 default = [];
184+ example = literalExpression ''
185 with config.lib.kernelConfig; [
186 (isYes "MODULES")
187 (isEnabled "FB_CON_DECOR")
+1-1
nixos/modules/system/boot/kernel_config.nix
···100101 settings = mkOption {
102 type = types.attrsOf kernelItem;
103- example = literalExample '' with lib.kernel; {
104 "9P_NET" = yes;
105 USB = option yes;
106 MMC_BLOCK_MINORS = freeform "32";
···100101 settings = mkOption {
102 type = types.attrsOf kernelItem;
103+ example = literalExpression '' with lib.kernel; {
104 "9P_NET" = yes;
105 USB = option yes;
106 MMC_BLOCK_MINORS = freeform "32";
+6-6
nixos/modules/system/boot/loader/grub/grub.nix
···329330 extraInstallCommands = mkOption {
331 default = "";
332- example = literalExample ''
333 # the example below generates detached signatures that GRUB can verify
334 # https://www.gnu.org/software/grub/manual/grub/grub.html#Using-digital-signatures
335 ''${pkgs.findutils}/bin/find /boot -not -path "/boot/efi/*" -type f -name '*.sig' -delete
···392 extraFiles = mkOption {
393 type = types.attrsOf types.path;
394 default = {};
395- example = literalExample ''
396 { "memtest.bin" = "''${pkgs.memtest86plus}/memtest.bin"; }
397 '';
398 description = ''
···413414 splashImage = mkOption {
415 type = types.nullOr types.path;
416- example = literalExample "./my-background.png";
417 description = ''
418 Background image used for GRUB.
419 Set to <literal>null</literal> to run GRUB in text mode.
···449450 theme = mkOption {
451 type = types.nullOr types.path;
452- example = literalExample "pkgs.nixos-grub2-theme";
453 default = null;
454 description = ''
455 Grub theme to be used.
···475 font = mkOption {
476 type = types.nullOr types.path;
477 default = "${realGrub}/share/grub/unicode.pf2";
478- defaultText = ''"''${pkgs.grub2}/share/grub/unicode.pf2"'';
479 description = ''
480 Path to a TrueType, OpenType, or pf2 font to be used by Grub.
481 '';
···483484 fontSize = mkOption {
485 type = types.nullOr types.int;
486- example = literalExample 16;
487 default = null;
488 description = ''
489 Font size for the grub menu. Ignored unless <literal>font</literal>
···329330 extraInstallCommands = mkOption {
331 default = "";
332+ example = ''
333 # the example below generates detached signatures that GRUB can verify
334 # https://www.gnu.org/software/grub/manual/grub/grub.html#Using-digital-signatures
335 ''${pkgs.findutils}/bin/find /boot -not -path "/boot/efi/*" -type f -name '*.sig' -delete
···392 extraFiles = mkOption {
393 type = types.attrsOf types.path;
394 default = {};
395+ example = literalExpression ''
396 { "memtest.bin" = "''${pkgs.memtest86plus}/memtest.bin"; }
397 '';
398 description = ''
···413414 splashImage = mkOption {
415 type = types.nullOr types.path;
416+ example = literalExpression "./my-background.png";
417 description = ''
418 Background image used for GRUB.
419 Set to <literal>null</literal> to run GRUB in text mode.
···449450 theme = mkOption {
451 type = types.nullOr types.path;
452+ example = literalExpression "pkgs.nixos-grub2-theme";
453 default = null;
454 description = ''
455 Grub theme to be used.
···475 font = mkOption {
476 type = types.nullOr types.path;
477 default = "${realGrub}/share/grub/unicode.pf2";
478+ defaultText = literalExpression ''"''${pkgs.grub2}/share/grub/unicode.pf2"'';
479 description = ''
480 Path to a TrueType, OpenType, or pf2 font to be used by Grub.
481 '';
···483484 fontSize = mkOption {
485 type = types.nullOr types.int;
486+ example = 16;
487 default = null;
488 description = ''
489 Font size for the grub menu. Ignored unless <literal>font</literal>
+1-1
nixos/modules/system/boot/loader/grub/ipxe.nix
···33 booting from the GRUB boot menu.
34 '';
35 default = { };
36- example = literalExample ''
37 { demo = '''
38 #!ipxe
39 dhcp
···33 booting from the GRUB boot menu.
34 '';
35 default = { };
36+ example = literalExpression ''
37 { demo = '''
38 #!ipxe
39 dhcp
-2
nixos/modules/system/boot/luksroot.nix
···663 };
664665 encryptedPass = mkOption {
666- default = "";
667 type = types.path;
668 description = "Path to the GPG encrypted passphrase.";
669 };
670671 publicKey = mkOption {
672- default = "";
673 type = types.path;
674 description = "Path to the Public Key.";
675 };
···663 };
664665 encryptedPass = mkOption {
0666 type = types.path;
667 description = "Path to the GPG encrypted passphrase.";
668 };
669670 publicKey = mkOption {
0671 type = types.path;
672 description = "Path to the Public Key.";
673 };
+4-8
nixos/modules/system/boot/networkd.nix
···844 options = {
845 wireguardPeerConfig = mkOption {
846 default = {};
847- example = { };
848 type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionWireGuardPeer;
849 description = ''
850 Each attribute in this set specifies an option in the
···859 netdevOptions = commonNetworkOptions // {
860861 netdevConfig = mkOption {
862- default = {};
863 example = { Name = "mybridge"; Kind = "bridge"; };
864 type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionNetdev;
865 description = ''
···896897 vxlanConfig = mkOption {
898 default = {};
899- example = { Id = "4"; };
900 type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionVXLAN;
901 description = ''
902 Each attribute in this set specifies an option in the
···959 example = {
960 PrivateKeyFile = "/etc/wireguard/secret.key";
961 ListenPort = 51820;
962- FwMark = 42;
963 };
964 type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionWireGuard;
965 description = ''
···1038 addressOptions = {
1039 options = {
1040 addressConfig = mkOption {
1041- default = {};
1042 example = { Address = "192.168.0.100/24"; };
1043 type = types.addCheck (types.attrsOf unitOption) check.network.sectionAddress;
1044 description = ''
···1055 options = {
1056 routingPolicyRuleConfig = mkOption {
1057 default = { };
1058- example = { routingPolicyRuleConfig = { Table = 10; IncomingInterface = "eth1"; Family = "both"; } ;};
1059 type = types.addCheck (types.attrsOf unitOption) check.network.sectionRoutingPolicyRule;
1060 description = ''
1061 Each attribute in this set specifies an option in the
···11461147 dhcpV6Config = mkOption {
1148 default = {};
1149- example = { UseDNS = true; UseRoutes = true; };
1150 type = types.addCheck (types.attrsOf unitOption) check.network.sectionDHCPv6;
1151 description = ''
1152 Each attribute in this set specifies an option in the
···12131214 ipv6Prefixes = mkOption {
1215 default = [];
1216- example = { AddressAutoconfiguration = true; OnLink = true; };
1217 type = with types; listOf (submodule ipv6PrefixOptions);
1218 description = ''
1219 A list of ipv6Prefix sections to be added to the unit. See
···844 options = {
845 wireguardPeerConfig = mkOption {
846 default = {};
0847 type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionWireGuardPeer;
848 description = ''
849 Each attribute in this set specifies an option in the
···858 netdevOptions = commonNetworkOptions // {
859860 netdevConfig = mkOption {
0861 example = { Name = "mybridge"; Kind = "bridge"; };
862 type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionNetdev;
863 description = ''
···894895 vxlanConfig = mkOption {
896 default = {};
0897 type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionVXLAN;
898 description = ''
899 Each attribute in this set specifies an option in the
···956 example = {
957 PrivateKeyFile = "/etc/wireguard/secret.key";
958 ListenPort = 51820;
959+ FirewallMark = 42;
960 };
961 type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionWireGuard;
962 description = ''
···1035 addressOptions = {
1036 options = {
1037 addressConfig = mkOption {
01038 example = { Address = "192.168.0.100/24"; };
1039 type = types.addCheck (types.attrsOf unitOption) check.network.sectionAddress;
1040 description = ''
···1051 options = {
1052 routingPolicyRuleConfig = mkOption {
1053 default = { };
1054+ example = { Table = 10; IncomingInterface = "eth1"; Family = "both"; };
1055 type = types.addCheck (types.attrsOf unitOption) check.network.sectionRoutingPolicyRule;
1056 description = ''
1057 Each attribute in this set specifies an option in the
···11421143 dhcpV6Config = mkOption {
1144 default = {};
1145+ example = { UseDNS = true; };
1146 type = types.addCheck (types.attrsOf unitOption) check.network.sectionDHCPv6;
1147 description = ''
1148 Each attribute in this set specifies an option in the
···12091210 ipv6Prefixes = mkOption {
1211 default = [];
1212+ example = [ { AddressAutoconfiguration = true; OnLink = true; } ];
1213 type = with types; listOf (submodule ipv6PrefixOptions);
1214 description = ''
1215 A list of ipv6Prefix sections to be added to the unit. See
+2-1
nixos/modules/system/boot/plymouth.nix
···6263 font = mkOption {
64 default = "${pkgs.dejavu_fonts.minimal}/share/fonts/truetype/DejaVuSans.ttf";
065 type = types.path;
66 description = ''
67 Font file made available for displaying text on the splash screen.
···88 type = types.path;
89 # Dimensions are 48x48 to match GDM logo
90 default = "${nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake-white.png";
91- defaultText = ''pkgs.fetchurl {
92 url = "https://nixos.org/logo/nixos-hires.png";
93 sha256 = "1ivzgd7iz0i06y36p8m5w48fd8pjqwxhdaavc0pxs7w1g7mcy5si";
94 }'';
···6263 font = mkOption {
64 default = "${pkgs.dejavu_fonts.minimal}/share/fonts/truetype/DejaVuSans.ttf";
65+ defaultText = literalExpression ''"''${pkgs.dejavu_fonts.minimal}/share/fonts/truetype/DejaVuSans.ttf"'';
66 type = types.path;
67 description = ''
68 Font file made available for displaying text on the splash screen.
···89 type = types.path;
90 # Dimensions are 48x48 to match GDM logo
91 default = "${nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake-white.png";
92+ defaultText = literalExpression ''pkgs.fetchurl {
93 url = "https://nixos.org/logo/nixos-hires.png";
94 sha256 = "1ivzgd7iz0i06y36p8m5w48fd8pjqwxhdaavc0pxs7w1g7mcy5si";
95 }'';
+3-3
nixos/modules/system/boot/stage-1.nix
···411 boot.initrd.enable = mkOption {
412 type = types.bool;
413 default = !config.boot.isContainer;
414- defaultText = "!config.boot.isContainer";
415 description = ''
416 Whether to enable the NixOS initial RAM disk (initrd). This may be
417 needed to perform some initialisation tasks (like mounting
···527 then "zstd"
528 else "gzip"
529 );
530- defaultText = "zstd if the kernel supports it (5.9+), gzip if not.";
531 type = types.unspecified; # We don't have a function type...
532 description = ''
533 The compressor to use on the initrd image. May be any of:
···559 is the path it should be copied from (or null for the same
560 path inside and out).
561 '';
562- example = literalExample
563 ''
564 { "/etc/dropbear/dropbear_rsa_host_key" =
565 ./secret-dropbear-key;
···411 boot.initrd.enable = mkOption {
412 type = types.bool;
413 default = !config.boot.isContainer;
414+ defaultText = literalExpression "!config.boot.isContainer";
415 description = ''
416 Whether to enable the NixOS initial RAM disk (initrd). This may be
417 needed to perform some initialisation tasks (like mounting
···527 then "zstd"
528 else "gzip"
529 );
530+ defaultText = literalDocBook "<literal>zstd</literal> if the kernel supports it (5.9+), <literal>gzip</literal> if not";
531 type = types.unspecified; # We don't have a function type...
532 description = ''
533 The compressor to use on the initrd image. May be any of:
···559 is the path it should be copied from (or null for the same
560 path inside and out).
561 '';
562+ example = literalExpression
563 ''
564 { "/etc/dropbear/dropbear_rsa_host_key" =
565 ./secret-dropbear-key;
+5-5
nixos/modules/system/boot/systemd.nix
···426427 systemd.package = mkOption {
428 default = pkgs.systemd;
429- defaultText = "pkgs.systemd";
430 type = types.package;
431 description = "The systemd package.";
432 };
···446 systemd.packages = mkOption {
447 default = [];
448 type = types.listOf types.package;
449- example = literalExample "[ pkgs.systemd-cryptsetup-generator ]";
450 description = "Packages providing systemd units and hooks.";
451 };
452···663664 services.journald.forwardToSyslog = mkOption {
665 default = config.services.rsyslogd.enable || config.services.syslog-ng.enable;
666- defaultText = "services.rsyslogd.enable || services.syslog-ng.enable";
667 type = types.bool;
668 description = ''
669 Whether to forward log messages to syslog.
···722723 services.logind.lidSwitchExternalPower = mkOption {
724 default = config.services.logind.lidSwitch;
725- defaultText = "services.logind.lidSwitch";
726 example = "ignore";
727 type = logindHandlerType;
728···768 systemd.tmpfiles.packages = mkOption {
769 type = types.listOf types.package;
770 default = [];
771- example = literalExample "[ pkgs.lvm2 ]";
772 apply = map getLib;
773 description = ''
774 List of packages containing <command>systemd-tmpfiles</command> rules.
···104 readOnly = true;
105 type = types.package;
106 default = if config.boot.zfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs;
107- defaultText = "if config.boot.zfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs";
108 description = "Configured ZFS userland tools package.";
109 };
110···150 devNodes = mkOption {
151 type = types.path;
152 default = "/dev/disk/by-id";
153- example = "/dev/disk/by-id";
154 description = ''
155 Name of directory from which to import ZFS devices.
156···351352 settings = mkOption {
353 type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
354- example = literalExample ''
355 {
356 ZED_DEBUG_LOG = "/tmp/zed.debug.log";
357
···104 readOnly = true;
105 type = types.package;
106 default = if config.boot.zfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs;
107+ defaultText = literalExpression "if config.boot.zfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs";
108 description = "Configured ZFS userland tools package.";
109 };
110···150 devNodes = mkOption {
151 type = types.path;
152 default = "/dev/disk/by-id";
0153 description = ''
154 Name of directory from which to import ZFS devices.
155···350351 settings = mkOption {
352 type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
353+ example = literalExpression ''
354 {
355 ZED_DEBUG_LOG = "/tmp/zed.debug.log";
356
+1-1
nixos/modules/tasks/lvm.nix
···9 type = types.package;
10 default = if cfg.dmeventd.enable then pkgs.lvm2_dmeventd else pkgs.lvm2;
11 internal = true;
12- defaultText = "pkgs.lvm2";
13 description = ''
14 This option allows you to override the LVM package that's used on the system
15 (udev rules, tmpfiles, systemd services).
···9 type = types.package;
10 default = if cfg.dmeventd.enable then pkgs.lvm2_dmeventd else pkgs.lvm2;
11 internal = true;
12+ defaultText = literalExpression "pkgs.lvm2";
13 description = ''
14 This option allows you to override the LVM package that's used on the system
15 (udev rules, tmpfiles, systemd services).
+9-10
nixos/modules/tasks/network-interfaces.nix
···146 tempAddress = mkOption {
147 type = types.enum (lib.attrNames tempaddrValues);
148 default = cfg.tempAddresses;
149- defaultText = literalExample ''config.networking.tempAddresses'';
150 description = ''
151 When IPv6 is enabled with SLAAC, this option controls the use of
152 temporary address (aka privacy extensions) on this
···257258 virtualType = mkOption {
259 default = if hasPrefix "tun" name then "tun" else "tap";
260- defaultText = literalExample ''if hasPrefix "tun" name then "tun" else "tap"'';
261 type = with types; enum [ "tun" "tap" ];
262 description = ''
263 The type of interface to create.
···420 The FQDN is required but cannot be determined. Please make sure that
421 both networking.hostName and networking.domain are set properly.
422 '';
423- defaultText = literalExample ''''${networking.hostName}.''${networking.domain}'';
424 description = ''
425 The fully qualified domain name (FQDN) of this host. It is the result
426 of combining networking.hostName and networking.domain. Using this
···578 options = {
579580 interfaces = mkOption {
581- example = [ "eth0" "eth1" ];
582 description = "The physical network interfaces connected by the vSwitch.";
583 type = with types; attrsOf (submodule vswitchInterfaceOpts);
584 };
···691 '';
692 in mkOption {
693 default = { };
694- example = literalExample ''
695 {
696 bond0 = {
697 interfaces = [ "eth0" "wlan0" ];
···720 driverOptions = mkOption {
721 type = types.attrsOf types.str;
722 default = {};
723- example = literalExample driverOptionsExample;
724 description = ''
725 Options for the bonding driver.
726 Documentation can be found in
···784785 networking.macvlans = mkOption {
786 default = { };
787- example = literalExample ''
788 {
789 wan = {
790 interface = "enp2s0";
···819820 networking.sits = mkOption {
821 default = { };
822- example = literalExample ''
823 {
824 hurricane = {
825 remote = "10.0.0.1";
···883884 networking.vlans = mkOption {
885 default = { };
886- example = literalExample ''
887 {
888 vlan0 = {
889 id = 3;
···927928 networking.wlanInterfaces = mkOption {
929 default = { };
930- example = literalExample ''
931 {
932 wlan-station0 = {
933 device = "wlp6s0";
···146 tempAddress = mkOption {
147 type = types.enum (lib.attrNames tempaddrValues);
148 default = cfg.tempAddresses;
149+ defaultText = literalExpression ''config.networking.tempAddresses'';
150 description = ''
151 When IPv6 is enabled with SLAAC, this option controls the use of
152 temporary address (aka privacy extensions) on this
···257258 virtualType = mkOption {
259 default = if hasPrefix "tun" name then "tun" else "tap";
260+ defaultText = literalExpression ''if hasPrefix "tun" name then "tun" else "tap"'';
261 type = with types; enum [ "tun" "tap" ];
262 description = ''
263 The type of interface to create.
···420 The FQDN is required but cannot be determined. Please make sure that
421 both networking.hostName and networking.domain are set properly.
422 '';
423+ defaultText = literalExpression ''"''${networking.hostName}.''${networking.domain}"'';
424 description = ''
425 The fully qualified domain name (FQDN) of this host. It is the result
426 of combining networking.hostName and networking.domain. Using this
···578 options = {
579580 interfaces = mkOption {
0581 description = "The physical network interfaces connected by the vSwitch.";
582 type = with types; attrsOf (submodule vswitchInterfaceOpts);
583 };
···690 '';
691 in mkOption {
692 default = { };
693+ example = literalExpression ''
694 {
695 bond0 = {
696 interfaces = [ "eth0" "wlan0" ];
···719 driverOptions = mkOption {
720 type = types.attrsOf types.str;
721 default = {};
722+ example = literalExpression driverOptionsExample;
723 description = ''
724 Options for the bonding driver.
725 Documentation can be found in
···783784 networking.macvlans = mkOption {
785 default = { };
786+ example = literalExpression ''
787 {
788 wan = {
789 interface = "enp2s0";
···818819 networking.sits = mkOption {
820 default = { };
821+ example = literalExpression ''
822 {
823 hurricane = {
824 remote = "10.0.0.1";
···882883 networking.vlans = mkOption {
884 default = { };
885+ example = literalExpression ''
886 {
887 vlan0 = {
888 id = 3;
···926927 networking.wlanInterfaces = mkOption {
928 default = { };
929+ example = literalExpression ''
930 {
931 wlan-station0 = {
932 device = "wlp6s0";
+1-1
nixos/modules/virtualisation/anbox.nix
···3536 image = mkOption {
37 default = pkgs.anbox.image;
38- example = literalExample "pkgs.anbox.image";
39 type = types.package;
40 description = ''
41 Base android image for Anbox.
···3536 image = mkOption {
37 default = pkgs.anbox.image;
38+ defaultText = literalExpression "pkgs.anbox.image";
39 type = types.package;
40 description = ''
41 Base android image for Anbox.
···20 options.virtualisation.digitalOcean.defaultConfigFile = mkOption {
21 type = types.path;
22 default = defaultConfigFile;
23- defaultText = ''
24 The default configuration imports user-data if applicable and
25 <literal>(modulesPath + "/virtualisation/digital-ocean-config.nix")</literal>.
26 '';
···20 options.virtualisation.digitalOcean.defaultConfigFile = mkOption {
21 type = types.path;
22 default = defaultConfigFile;
23+ defaultText = literalDocBook ''
24 The default configuration imports user-data if applicable and
25 <literal>(modulesPath + "/virtualisation/digital-ocean-config.nix")</literal>.
26 '';
+2-1
nixos/modules/virtualisation/docker.nix
···138139 package = mkOption {
140 default = pkgs.docker;
0141 type = types.package;
142- example = pkgs.docker-edge;
143 description = ''
144 Docker package to be used in the module.
145 '';
···138139 package = mkOption {
140 default = pkgs.docker;
141+ defaultText = literalExpression "pkgs.docker";
142 type = types.package;
143+ example = literalExpression "pkgs.docker-edge";
144 description = ''
145 Docker package to be used in the module.
146 '';
+1-1
nixos/modules/virtualisation/ecs-agent.nix
···12 type = types.path;
13 description = "The ECS agent package to use";
14 default = pkgs.ecs-agent;
15- defaultText = "pkgs.ecs-agent";
16 };
1718 extra-environment = mkOption {
···12 type = types.path;
13 description = "The ECS agent package to use";
14 default = pkgs.ecs-agent;
15+ defaultText = literalExpression "pkgs.ecs-agent";
16 };
1718 extra-environment = mkOption {
+2-1
nixos/modules/virtualisation/libvirtd.nix
···50 package = mkOption {
51 type = types.package;
52 default = pkgs.libvirt;
53- defaultText = "pkgs.libvirt";
54 description = ''
55 libvirt package to use.
56 '';
···59 qemuPackage = mkOption {
60 type = types.package;
61 default = pkgs.qemu;
062 description = ''
63 Qemu package to use with libvirt.
64 `pkgs.qemu` can emulate alien architectures (e.g. aarch64 on x86)
···50 package = mkOption {
51 type = types.package;
52 default = pkgs.libvirt;
53+ defaultText = literalExpression "pkgs.libvirt";
54 description = ''
55 libvirt package to use.
56 '';
···59 qemuPackage = mkOption {
60 type = types.package;
61 default = pkgs.qemu;
62+ defaultText = literalExpression "pkgs.qemu";
63 description = ''
64 Qemu package to use with libvirt.
65 `pkgs.qemu` can emulate alien architectures (e.g. aarch64 on x86)
+3-3
nixos/modules/virtualisation/lxd.nix
···35 package = mkOption {
36 type = types.package;
37 default = pkgs.lxd.override { nftablesSupport = config.networking.nftables.enable; };
38- defaultText = "pkgs.lxd";
39 description = ''
40 The LXD package to use.
41 '';
···44 lxcPackage = mkOption {
45 type = types.package;
46 default = pkgs.lxc;
47- defaultText = "pkgs.lxc";
48 description = ''
49 The LXC package to use with LXD (required for AppArmor profiles).
50 '';
···53 zfsSupport = mkOption {
54 type = types.bool;
55 default = config.boot.zfs.enabled;
56- defaultText = "config.boot.zfs.enabled";
57 description = ''
58 Enables lxd to use zfs as a storage for containers.
59
···35 package = mkOption {
36 type = types.package;
37 default = pkgs.lxd.override { nftablesSupport = config.networking.nftables.enable; };
38+ defaultText = literalExpression "pkgs.lxd";
39 description = ''
40 The LXD package to use.
41 '';
···44 lxcPackage = mkOption {
45 type = types.package;
46 default = pkgs.lxc;
47+ defaultText = literalExpression "pkgs.lxc";
48 description = ''
49 The LXC package to use with LXD (required for AppArmor profiles).
50 '';
···53 zfsSupport = mkOption {
54 type = types.bool;
55 default = config.boot.zfs.enabled;
56+ defaultText = literalExpression "config.boot.zfs.enabled";
57 description = ''
58 Enables lxd to use zfs as a storage for containers.
59
+3-3
nixos/modules/virtualisation/nixos-containers.nix
···530 nixpkgs = mkOption {
531 type = types.path;
532 default = pkgs.path;
533- defaultText = "pkgs.path";
534 description = ''
535 A path to the nixpkgs that provide the modules, pkgs and lib for evaluating the container.
536···636 bindMounts = mkOption {
637 type = with types; attrsOf (submodule bindMountOpts);
638 default = {};
639- example = literalExample ''
640 { "/home" = { hostPath = "/home/alice";
641 isReadOnly = false; };
642 }
···707 }));
708709 default = {};
710- example = literalExample
711 ''
712 { webserver =
713 { path = "/nix/var/nix/profiles/webserver";
···530 nixpkgs = mkOption {
531 type = types.path;
532 default = pkgs.path;
533+ defaultText = literalExpression "pkgs.path";
534 description = ''
535 A path to the nixpkgs that provide the modules, pkgs and lib for evaluating the container.
536···636 bindMounts = mkOption {
637 type = with types; attrsOf (submodule bindMountOpts);
638 default = {};
639+ example = literalExpression ''
640 { "/home" = { hostPath = "/home/alice";
641 isReadOnly = false; };
642 }
···707 }));
708709 default = {};
710+ example = literalExpression
711 ''
712 { webserver =
713 { path = "/nix/var/nix/profiles/webserver";
+8-8
nixos/modules/virtualisation/oci-containers.nix
···28 You still need to set the <literal>image</literal> attribute, as it
29 will be used as the image name for docker to start a container.
30 '';
31- example = literalExample "pkgs.dockerTools.buildDockerImage {...};";
32 };
3334 login = {
···59 type = with types; listOf str;
60 default = [];
61 description = "Commandline arguments to pass to the image's entrypoint.";
62- example = literalExample ''
63 ["--port=9000"]
64 '';
65 };
···75 type = with types; attrsOf str;
76 default = {};
77 description = "Environment variables to set for this container.";
78- example = literalExample ''
79 {
80 DATABASE_HOST = "db.example.com";
81 DATABASE_PORT = "3306";
···87 type = with types; listOf path;
88 default = [];
89 description = "Environment files for this container.";
90- example = literalExample ''
91 [
92 /path/to/.env
93 /path/to/.env.secret
···160 <link xlink:href="https://docs.docker.com/engine/reference/run/#expose-incoming-ports">
161 Docker engine documentation</link> for full details.
162 '';
163- example = literalExample ''
164 [
165 "8080:9000"
166 ]
···191 <link xlink:href="https://docs.docker.com/engine/reference/run/#volume-shared-filesystems">
192 docker engine documentation</link> for details.
193 '';
194- example = literalExample ''
195 [
196 "volume_name:/path/inside/container"
197 "/path/on/host:/path/inside/container"
···214215 Use the same name as the attribute under <literal>virtualisation.oci-containers.containers</literal>.
216 '';
217- example = literalExample ''
218 virtualisation.oci-containers.containers = {
219 node1 = {};
220 node2 = {
···228 type = with types; listOf str;
229 default = [];
230 description = "Extra options for <command>${defaultBackend} run</command>.";
231- example = literalExample ''
232 ["--network=host"]
233 '';
234 };
···28 You still need to set the <literal>image</literal> attribute, as it
29 will be used as the image name for docker to start a container.
30 '';
31+ example = literalExpression "pkgs.dockerTools.buildDockerImage {...};";
32 };
3334 login = {
···59 type = with types; listOf str;
60 default = [];
61 description = "Commandline arguments to pass to the image's entrypoint.";
62+ example = literalExpression ''
63 ["--port=9000"]
64 '';
65 };
···75 type = with types; attrsOf str;
76 default = {};
77 description = "Environment variables to set for this container.";
78+ example = literalExpression ''
79 {
80 DATABASE_HOST = "db.example.com";
81 DATABASE_PORT = "3306";
···87 type = with types; listOf path;
88 default = [];
89 description = "Environment files for this container.";
90+ example = literalExpression ''
91 [
92 /path/to/.env
93 /path/to/.env.secret
···160 <link xlink:href="https://docs.docker.com/engine/reference/run/#expose-incoming-ports">
161 Docker engine documentation</link> for full details.
162 '';
163+ example = literalExpression ''
164 [
165 "8080:9000"
166 ]
···191 <link xlink:href="https://docs.docker.com/engine/reference/run/#volume-shared-filesystems">
192 docker engine documentation</link> for details.
193 '';
194+ example = literalExpression ''
195 [
196 "volume_name:/path/inside/container"
197 "/path/on/host:/path/inside/container"
···214215 Use the same name as the attribute under <literal>virtualisation.oci-containers.containers</literal>.
216 '';
217+ example = literalExpression ''
218 virtualisation.oci-containers.containers = {
219 node1 = {};
220 node2 = {
···228 type = with types; listOf str;
229 default = [];
230 description = "Extra options for <command>${defaultBackend} run</command>.";
231+ example = literalExpression ''
232 ["--network=host"]
233 '';
234 };
+1-1
nixos/modules/virtualisation/openvswitch.nix
···31 package = mkOption {
32 type = types.package;
33 default = pkgs.openvswitch;
34- defaultText = "pkgs.openvswitch";
35 description = ''
36 Open vSwitch package to use.
37 '';
···31 package = mkOption {
32 type = types.package;
33 default = pkgs.openvswitch;
34+ defaultText = literalExpression "pkgs.openvswitch";
35 description = ''
36 Open vSwitch package to use.
37 '';
+1-2
nixos/modules/virtualisation/parallels-guest.nix
···34 package = mkOption {
35 type = types.nullOr types.package;
36 default = config.boot.kernelPackages.prl-tools;
37- defaultText = "config.boot.kernelPackages.prl-tools";
38- example = literalExample "config.boot.kernelPackages.prl-tools";
39 description = ''
40 Defines which package to use for prl-tools. Override to change the version.
41 '';
···34 package = mkOption {
35 type = types.nullOr types.package;
36 default = config.boot.kernelPackages.prl-tools;
37+ defaultText = literalExpression "config.boot.kernelPackages.prl-tools";
038 description = ''
39 Defines which package to use for prl-tools. Override to change the version.
40 '';
+1-1
nixos/modules/virtualisation/podman.nix
···95 extraPackages = mkOption {
96 type = with types; listOf package;
97 default = [ ];
98- example = lib.literalExample ''
99 [
100 pkgs.gvisor
101 ]
···95 extraPackages = mkOption {
96 type = with types; listOf package;
97 default = [ ];
98+ example = lib.literalExpression ''
99 [
100 pkgs.gvisor
101 ]
···455 };
456 });
457 default = [];
458- example = lib.literalExample
459 ''
460 [ # forward local port 2222 -> 22, to ssh into the VM
461 { from = "host"; host.port = 2222; guest.port = 22; }
···455 };
456 });
457 default = [];
458+ example = lib.literalExpression
459 ''
460 [ # forward local port 2222 -> 22, to ssh into the VM
461 { from = "host"; host.port = 2222; guest.port = 22; }
+3-4
nixos/modules/virtualisation/railcar.nix
···41 description = "Source for the in-container mount";
42 };
43 options = mkOption {
44- type = attrsOf (str);
45 default = [ "bind" ];
46 description = ''
47 Mount options of the filesystem to be used.
···77 The defaults have been chosen for simple bindmounts, meaning
78 that you only need to provide the "source" parameter.
79 '';
80- example = ''
81- { "/data" = { source = "/var/lib/data"; }; }
82- '';
83 };
8485 runType = mkOption {
···112 package = mkOption {
113 type = types.package;
114 default = pkgs.railcar;
0115 description = "Railcar package to use";
116 };
117 };
···41 description = "Source for the in-container mount";
42 };
43 options = mkOption {
44+ type = listOf str;
45 default = [ "bind" ];
46 description = ''
47 Mount options of the filesystem to be used.
···77 The defaults have been chosen for simple bindmounts, meaning
78 that you only need to provide the "source" parameter.
79 '';
80+ example = { "/data" = { source = "/var/lib/data"; }; };
0081 };
8283 runType = mkOption {
···110 package = mkOption {
111 type = types.package;
112 default = pkgs.railcar;
113+ defaultText = literalExpression "pkgs.railcar";
114 description = "Railcar package to use";
115 };
116 };
+1-1
nixos/modules/virtualisation/virtualbox-host.nix
···43 package = mkOption {
44 type = types.package;
45 default = pkgs.virtualbox;
46- defaultText = "pkgs.virtualbox";
47 description = ''
48 Which VirtualBox package to use.
49 '';
···43 package = mkOption {
44 type = types.package;
45 default = pkgs.virtualbox;
46+ defaultText = literalExpression "pkgs.virtualbox";
47 description = ''
48 Which VirtualBox package to use.
49 '';
+4-4
nixos/modules/virtualisation/xen-dom0.nix
···3536 virtualisation.xen.package = mkOption {
37 type = types.package;
38- defaultText = "pkgs.xen";
39- example = literalExample "pkgs.xen-light";
40 description = ''
41 The package used for Xen binary.
42 '';
···4546 virtualisation.xen.package-qemu = mkOption {
47 type = types.package;
48- defaultText = "pkgs.xen";
49- example = literalExample "pkgs.qemu_xen-light";
50 description = ''
51 The package with qemu binaries for dom0 qemu and xendomains.
52 '';
···3536 virtualisation.xen.package = mkOption {
37 type = types.package;
38+ defaultText = literalExpression "pkgs.xen";
39+ example = literalExpression "pkgs.xen-light";
40 description = ''
41 The package used for Xen binary.
42 '';
···4546 virtualisation.xen.package-qemu = mkOption {
47 type = types.package;
48+ defaultText = literalExpression "pkgs.xen";
49+ example = literalExpression "pkgs.qemu_xen-light";
50 description = ''
51 The package with qemu binaries for dom0 qemu and xendomains.
52 '';