Merge pull request #136909 from ncfavier/cleanup-defaults-examples

nixos/doc: clean up defaults and examples

Changed files
+1661 -1579
lib
nixos
doc
manual
lib
make-options-doc
maintainers
scripts
modules
config
hardware
i18n
installer
misc
programs
security
services
admin
amqp
audio
backup
blockchain
ethereum
cluster
computing
boinc
foldingathome
slurm
continuous-integration
databases
desktops
development
display-managers
editors
games
hardware
logging
mail
misc
monitoring
network-filesystems
networking
hylafax
icecream
ircd-hybrid
iscsi
keepalived
ntp
strongswan-swanctl
znc
printing
scheduling
search
security
system
torrent
ttys
video
wayland
web-apps
web-servers
x11
system
tasks
virtualisation
+2 -2
lib/default.nix
···
inherit (self.options) isOption mkEnableOption mkSinkUndeclaredOptions
mergeDefaultOption mergeOneOption mergeEqualOption getValues
getFiles optionAttrSetToDocList optionAttrSetToDocList'
-
scrubOptionValue literalExample showOption showFiles
-
unknownModule mkOption;
+
scrubOptionValue literalExpression literalExample literalDocBook
+
showOption showFiles unknownModule mkOption;
inherit (self.types) isType setType defaultTypeMerge defaultFunctor
isOptionType mkOptionType;
inherit (self.asserts)
+19 -5
lib/options.nix
···
Example:
mkOption { } // => { _type = "option"; }
-
mkOption { defaultText = "foo"; } // => { _type = "option"; defaultText = "foo"; }
+
mkOption { default = "foo"; } // => { _type = "option"; default = "foo"; }
*/
mkOption =
{
···
else x;
-
/* For use in the `example` option attribute. It causes the given
-
text to be included verbatim in documentation. This is necessary
-
for example values that are not simple values, e.g., functions.
+
/* For use in the `defaultText` and `example` option attributes. Causes the
+
given string to be rendered verbatim in the documentation as Nix code. This
+
is necessary for complex values, e.g. functions, or values that depend on
+
other values or packages.
*/
-
literalExample = text: { _type = "literalExample"; inherit text; };
+
literalExpression = text:
+
if ! isString text then throw "literalExpression expects a string."
+
else { _type = "literalExpression"; inherit text; };
+
+
literalExample = lib.warn "literalExample is deprecated, use literalExpression instead, or use literalDocBook for a non-Nix description." literalExpression;
+
+
+
/* For use in the `defaultText` and `example` option attributes. Causes the
+
given DocBook text to be inserted verbatim in the documentation, for when
+
a `literalExpression` would be too hard to read.
+
*/
+
literalDocBook = text:
+
if ! isString text then throw "literalDocBook expects a string."
+
else { _type = "literalDocBook"; inherit text; };
# Helper functions.
+10
nixos/doc/manual/development/option-declarations.section.md
···
of the module will have to define the value of the option, otherwise
an error will be thrown.
+
`defaultText`
+
+
: A textual representation of the default value to be rendered verbatim in
+
the manual. Useful if the default value is a complex expression or depends
+
on other values or packages.
+
Use `lib.literalExpression` for a Nix expression, `lib.literalDocBook` for
+
a plain English description in DocBook format.
+
`example`
: An example value that will be shown in the NixOS manual.
+
You can use `lib.literalExpression` and `lib.literalDocBook` in the same way
+
as in `defaultText`.
`description`
+19 -1
nixos/doc/manual/from_md/development/option-declarations.section.xml
···
</varlistentry>
<varlistentry>
<term>
+
<literal>defaultText</literal>
+
</term>
+
<listitem>
+
<para>
+
A textual representation of the default value to be rendered
+
verbatim in the manual. Useful if the default value is a
+
complex expression or depends on other values or packages. Use
+
<literal>lib.literalExpression</literal> for a Nix expression,
+
<literal>lib.literalDocBook</literal> for a plain English
+
description in DocBook format.
+
</para>
+
</listitem>
+
</varlistentry>
+
<varlistentry>
+
<term>
<literal>example</literal>
</term>
<listitem>
<para>
-
An example value that will be shown in the NixOS manual.
+
An example value that will be shown in the NixOS manual. You
+
can use <literal>lib.literalExpression</literal> and
+
<literal>lib.literalDocBook</literal> in the same way as in
+
<literal>defaultText</literal>.
</para>
</listitem>
</varlistentry>
+28 -18
nixos/lib/make-options-doc/options-to-docbook.xsl
···
<para>
<emphasis>Default:</emphasis>
<xsl:text> </xsl:text>
-
<xsl:apply-templates select="attr[@name = 'default']" mode="top" />
+
<xsl:apply-templates select="attr[@name = 'default']/*" mode="top" />
</para>
</xsl:if>
···
<para>
<emphasis>Example:</emphasis>
<xsl:text> </xsl:text>
-
<xsl:choose>
-
<xsl:when test="attr[@name = 'example']/attrs[attr[@name = '_type' and string[@value = 'literalExample']]]">
-
<programlisting><xsl:value-of select="attr[@name = 'example']/attrs/attr[@name = 'text']/string/@value" /></programlisting>
-
</xsl:when>
-
<xsl:otherwise>
-
<xsl:apply-templates select="attr[@name = 'example']" mode="top" />
-
</xsl:otherwise>
-
</xsl:choose>
+
<xsl:apply-templates select="attr[@name = 'example']/*" mode="top" />
</para>
</xsl:if>
···
</xsl:template>
-
<xsl:template match="*" mode="top">
+
<xsl:template match="attrs[attr[@name = '_type' and string[@value = 'literalExpression']]]" mode = "top">
<xsl:choose>
-
<xsl:when test="string[contains(@value, '&#010;')]">
-
<programlisting>
-
<xsl:text>''
-
</xsl:text><xsl:value-of select='str:replace(string/@value, "${", "&apos;&apos;${")' /><xsl:text>''</xsl:text></programlisting>
+
<xsl:when test="contains(attr[@name = 'text']/string/@value, '&#010;')">
+
<programlisting><xsl:value-of select="attr[@name = 'text']/string/@value" /></programlisting>
</xsl:when>
<xsl:otherwise>
-
<literal><xsl:apply-templates /></literal>
+
<literal><xsl:value-of select="attr[@name = 'text']/string/@value" /></literal>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+
<xsl:template match="attrs[attr[@name = '_type' and string[@value = 'literalDocBook']]]" mode = "top">
+
<xsl:value-of disable-output-escaping="yes" select="attr[@name = 'text']/string/@value" />
+
</xsl:template>
+
+
+
<xsl:template match="string[contains(@value, '&#010;')]" mode="top">
+
<programlisting>
+
<xsl:text>''&#010;</xsl:text>
+
<xsl:value-of select='str:replace(str:replace(@value, "&apos;&apos;", "&apos;&apos;&apos;"), "${", "&apos;&apos;${")' />
+
<xsl:text>''</xsl:text>
+
</programlisting>
+
</xsl:template>
+
+
+
<xsl:template match="*" mode="top">
+
<literal><xsl:apply-templates select="." /></literal>
+
</xsl:template>
+
+
<xsl:template match="null">
<xsl:text>null</xsl:text>
</xsl:template>
···
<xsl:template match="string">
<xsl:choose>
<xsl:when test="(contains(@value, '&quot;') or contains(@value, '\')) and not(contains(@value, '&#010;'))">
-
<xsl:text>''</xsl:text><xsl:value-of select='str:replace(@value, "${", "&apos;&apos;${")' /><xsl:text>''</xsl:text>
+
<xsl:text>''</xsl:text><xsl:value-of select='str:replace(str:replace(@value, "&apos;&apos;", "&apos;&apos;&apos;"), "${", "&apos;&apos;${")' /><xsl:text>''</xsl:text>
</xsl:when>
<xsl:otherwise>
-
<xsl:text>"</xsl:text><xsl:value-of select="str:replace(str:replace(str:replace(str:replace(@value, '\', '\\'), '&quot;', '\&quot;'), '&#010;', '\n'), '$', '\$')" /><xsl:text>"</xsl:text>
+
<xsl:text>"</xsl:text><xsl:value-of select="str:replace(str:replace(str:replace(str:replace(@value, '\', '\\'), '&quot;', '\&quot;'), '&#010;', '\n'), '${', '\${')" /><xsl:text>"</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
···
</xsl:template>
-
<xsl:template match="attrs[attr[@name = '_type' and string[@value = 'literalExample']]]">
+
<xsl:template match="attrs[attr[@name = '_type' and string[@value = 'literalExpression']]]">
<xsl:value-of select="attr[@name = 'text']/string/@value" />
</xsl:template>
+1 -1
nixos/maintainers/scripts/ec2/amazon-image.nix
···
};
contents = mkOption {
-
example = literalExample ''
+
example = literalExpression ''
[ { source = pkgs.memtest86 + "/memtest.bin";
target = "boot/memtest.bin";
}
+1 -1
nixos/modules/config/fonts/fonts.nix
···
fonts = mkOption {
type = types.listOf types.path;
default = [];
-
example = literalExample "[ pkgs.dejavu_fonts ]";
+
example = literalExpression "[ pkgs.dejavu_fonts ]";
description = "List of primary font paths.";
};
+1 -1
nixos/modules/config/i18n.nix
···
allLocales = any (x: x == "all") config.i18n.supportedLocales;
locales = config.i18n.supportedLocales;
};
-
example = literalExample "pkgs.glibcLocales";
+
example = literalExpression "pkgs.glibcLocales";
description = ''
Customized pkg.glibcLocales package.
+8 -8
nixos/modules/config/krb5/default.nix
···
kerberos = mkOption {
type = types.package;
default = pkgs.krb5Full;
-
defaultText = "pkgs.krb5Full";
-
example = literalExample "pkgs.heimdal";
+
defaultText = literalExpression "pkgs.krb5Full";
+
example = literalExpression "pkgs.heimdal";
description = ''
The Kerberos implementation that will be present in
<literal>environment.systemPackages</literal> after enabling this
···
type = with types; either attrs lines;
default = {};
apply = attrs: filterEmbeddedMetadata attrs;
-
example = literalExample ''
+
example = literalExpression ''
{
default_realm = "ATHENA.MIT.EDU";
};
···
realms = mkOption {
type = with types; either attrs lines;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"ATHENA.MIT.EDU" = {
admin_server = "athena.mit.edu";
···
domain_realm = mkOption {
type = with types; either attrs lines;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"example.com" = "EXAMPLE.COM";
".example.com" = "EXAMPLE.COM";
···
capaths = mkOption {
type = with types; either attrs lines;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"ATHENA.MIT.EDU" = {
"EXAMPLE.COM" = ".";
···
appdefaults = mkOption {
type = with types; either attrs lines;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
pam = {
debug = false;
···
plugins = mkOption {
type = with types; either attrs lines;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
ccselect = {
disable = "k5identity";
+3 -3
nixos/modules/config/networking.nix
···
networking.hosts = lib.mkOption {
type = types.attrsOf (types.listOf types.str);
-
example = literalExample ''
+
example = literalExpression ''
{
"127.0.0.1" = [ "foo.bar.baz" ];
"192.168.0.2" = [ "fileserver.local" "nameserver.local" ];
···
networking.hostFiles = lib.mkOption {
type = types.listOf types.path;
-
defaultText = lib.literalExample "Hosts from `networking.hosts` and `networking.extraHosts`";
-
example = lib.literalExample ''[ "''${pkgs.my-blocklist-package}/share/my-blocklist/hosts" ]'';
+
defaultText = literalDocBook "Hosts from <option>networking.hosts</option> and <option>networking.extraHosts</option>";
+
example = literalExpression ''[ "''${pkgs.my-blocklist-package}/share/my-blocklist/hosts" ]'';
description = ''
Files that should be concatenated together to form <filename>/etc/hosts</filename>.
'';
+2 -2
nixos/modules/config/power-management.nix
···
powerUpCommands = mkOption {
type = types.lines;
default = "";
-
example = literalExample ''
+
example = literalExpression ''
"''${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda"
'';
description =
···
powerDownCommands = mkOption {
type = types.lines;
default = "";
-
example = literalExample ''
+
example = literalExpression ''
"''${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda"
'';
description =
+5 -5
nixos/modules/config/pulseaudio.nix
···
default = if config.services.jack.jackd.enable
then pkgs.pulseaudioFull
else pkgs.pulseaudio;
-
defaultText = "pkgs.pulseaudio";
-
example = literalExample "pkgs.pulseaudioFull";
+
defaultText = literalExpression "pkgs.pulseaudio";
+
example = literalExpression "pkgs.pulseaudioFull";
description = ''
The PulseAudio derivation to use. This can be used to enable
features (such as JACK support, Bluetooth) via the
···
extraModules = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "[ pkgs.pulseaudio-modules-bt ]";
+
example = literalExpression "[ pkgs.pulseaudio-modules-bt ]";
description = ''
Extra pulseaudio modules to use. This is intended for out-of-tree
pulseaudio modules like extra bluetooth codecs.
···
type = types.attrsOf types.unspecified;
default = {};
description = "Config of the pulse daemon. See <literal>man pulse-daemon.conf</literal>.";
-
example = literalExample ''{ realtime-scheduling = "yes"; }'';
+
example = literalExpression ''{ realtime-scheduling = "yes"; }'';
};
};
···
allowedIpRanges = mkOption {
type = types.listOf types.str;
default = [];
-
example = literalExample ''[ "127.0.0.1" "192.168.1.0/24" ]'';
+
example = literalExpression ''[ "127.0.0.1" "192.168.1.0/24" ]'';
description = ''
A list of IP subnets that are allowed to stream to the server.
'';
+3 -5
nixos/modules/config/shells-environment.nix
···
environment.binsh = mkOption {
default = "${config.system.build.binsh}/bin/sh";
-
defaultText = "\${config.system.build.binsh}/bin/sh";
-
example = literalExample ''
-
"''${pkgs.dash}/bin/dash"
-
'';
+
defaultText = literalExpression ''"''${config.system.build.binsh}/bin/sh"'';
+
example = literalExpression ''"''${pkgs.dash}/bin/dash"'';
type = types.path;
visible = false;
description = ''
···
environment.shells = mkOption {
default = [];
-
example = literalExample "[ pkgs.bashInteractive pkgs.zsh ]";
+
example = literalExpression "[ pkgs.bashInteractive pkgs.zsh ]";
description = ''
A list of permissible login shells for user accounts.
No need to mention <literal>/bin/sh</literal>
+1 -1
nixos/modules/config/sysctl.nix
···
boot.kernel.sysctl = mkOption {
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{ "net.ipv4.tcp_syncookies" = false; "vm.swappiness" = 60; }
'';
type = types.attrsOf sysctlOption;
+3 -3
nixos/modules/config/system-path.nix
···
systemPackages = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "[ pkgs.firefox pkgs.thunderbird ]";
+
example = literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
description = ''
The set of packages that appear in
/run/current-system/sw. These packages are
···
defaultPackages = mkOption {
type = types.listOf types.package;
default = defaultPackages;
-
example = literalExample "[]";
+
example = [];
description = ''
-
Set of default packages that aren't strictly neccessary
+
Set of default packages that aren't strictly necessary
for a running system, entries can be removed for a more
minimal NixOS installation.
+1 -1
nixos/modules/config/unix-odbc-drivers.nix
···
environment.unixODBCDrivers = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "with pkgs.unixODBCDrivers; [ sqlite psql ]";
+
example = literalExpression "with pkgs.unixODBCDrivers; [ sqlite psql ]";
description = ''
Specifies Unix ODBC drivers to be registered in
<filename>/etc/odbcinst.ini</filename>. You may also want to
+3 -3
nixos/modules/config/users-groups.nix
···
shell = mkOption {
type = types.nullOr (types.either types.shellPackage (passwdEntry types.path));
default = pkgs.shadow;
-
defaultText = "pkgs.shadow";
-
example = literalExample "pkgs.bashInteractive";
+
defaultText = literalExpression "pkgs.shadow";
+
example = literalExpression "pkgs.bashInteractive";
description = ''
The path to the user's shell. Can use shell derivations,
like <literal>pkgs.bashInteractive</literal>. Don’t
···
packages = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "[ pkgs.firefox pkgs.thunderbird ]";
+
example = literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
description = ''
The set of packages that should be made available to the user.
This is in contrast to <option>environment.systemPackages</option>,
+1 -1
nixos/modules/config/xdg/portals/wlr.nix
···
default = { };
# Example taken from the manpage
-
example = literalExample ''
+
example = literalExpression ''
{
screencast = {
output_name = "HDMI-A-1";
+1 -1
nixos/modules/hardware/ckb-next.nix
···
package = mkOption {
type = types.package;
default = pkgs.ckb-next;
-
defaultText = "pkgs.ckb-next";
+
defaultText = literalExpression "pkgs.ckb-next";
description = ''
The package implementing the Corsair keyboard/mouse driver.
'';
+5 -5
nixos/modules/hardware/device-tree.nix
···
each .dtb file matching "compatible" of the overlay.
'';
default = null;
-
example = literalExample "./dts/overlays.dts";
+
example = literalExpression "./dts/overlays.dts";
};
dtsText = mkOption {
···
Literal DTS contents, overlay is applied to
each .dtb file matching "compatible" of the overlay.
'';
-
example = literalExample ''
+
example = ''
/dts-v1/;
/plugin/;
/ {
···
kernelPackage = mkOption {
default = config.boot.kernelPackages.kernel;
-
defaultText = "config.boot.kernelPackages.kernel";
-
example = literalExample "pkgs.linux_latest";
+
defaultText = literalExpression "config.boot.kernelPackages.kernel";
+
example = literalExpression "pkgs.linux_latest";
type = types.path;
description = ''
Kernel package containing the base device-tree (.dtb) to boot. Uses
···
overlays = mkOption {
default = [];
-
example = literalExample ''
+
example = literalExpression ''
[
{ name = "pps"; dtsFile = ./dts/pps.dts; }
{ name = "spi";
+1 -1
nixos/modules/hardware/digitalbitbox.nix
···
package = mkOption {
type = types.package;
default = pkgs.digitalbitbox;
-
defaultText = "pkgs.digitalbitbox";
+
defaultText = literalExpression "pkgs.digitalbitbox";
description = "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
};
};
+2 -2
nixos/modules/hardware/opengl.nix
···
extraPackages = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau intel-ocl ]";
+
example = literalExpression "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau intel-ocl ]";
description = ''
Additional packages to add to OpenGL drivers. This can be used
to add OpenCL drivers, VA-API/VDPAU drivers etc.
···
extraPackages32 = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "with pkgs.pkgsi686Linux; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]";
+
example = literalExpression "with pkgs.pkgsi686Linux; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]";
description = ''
Additional packages to add to 32-bit OpenGL drivers on
64-bit systems. Used when <option>driSupport32Bit</option> is
+1 -1
nixos/modules/hardware/opentabletdriver.nix
···
package = mkOption {
type = types.package;
default = pkgs.opentabletdriver;
-
defaultText = "pkgs.opentabletdriver";
+
defaultText = literalExpression "pkgs.opentabletdriver";
description = ''
OpenTabletDriver derivation to use.
'';
+4 -4
nixos/modules/hardware/printers.nix
···
};
deviceUri = mkOption {
type = types.str;
-
example = [
+
example = literalExpression ''
"ipp://printserver.local/printers/BrotherHL_Workroom"
"usb://HP/DESKJET%20940C?serial=CN16E6C364BH"
-
];
+
'';
description = ''
How to reach the printer.
<command>lpinfo -v</command> shows a list of supported device URIs and schemes.
···
};
model = mkOption {
type = types.str;
-
example = literalExample ''
-
gutenprint.''${lib.versions.majorMinor (lib.getVersion pkgs.gutenprint)}://brother-hl-5140/expert
+
example = literalExpression ''
+
"gutenprint.''${lib.versions.majorMinor (lib.getVersion pkgs.gutenprint)}://brother-hl-5140/expert"
'';
description = ''
Location of the ppd driver file for the printer.
+1 -1
nixos/modules/hardware/sata.nix
···
enable = mkEnableOption "SATA drive timeouts";
deciSeconds = mkOption {
-
example = "70";
+
example = 70;
type = types.int;
description = ''
Set SCT Error Recovery Control timeout in deciseconds for use in RAID configurations.
+2 -2
nixos/modules/hardware/video/nvidia.nix
···
hardware.nvidia.package = lib.mkOption {
type = lib.types.package;
default = config.boot.kernelPackages.nvidiaPackages.stable;
-
defaultText = "config.boot.kernelPackages.nvidiaPackages.stable";
+
defaultText = literalExpression "config.boot.kernelPackages.nvidiaPackages.stable";
description = ''
The NVIDIA X11 derivation to use.
'';
-
example = "config.boot.kernelPackages.nvidiaPackages.legacy_340";
+
example = literalExpression "config.boot.kernelPackages.nvidiaPackages.legacy_340";
};
};
+1 -1
nixos/modules/hardware/video/uvcvideo/default.nix
···
packages = mkOption {
type = types.listOf types.path;
-
example = literalExample "[ pkgs.tiscamera ]";
+
example = literalExpression "[ pkgs.tiscamera ]";
description = ''
List of packages containing <command>uvcvideo</command> dynamic controls
rules. All files found in
+1 -1
nixos/modules/i18n/input-method/fcitx.nix
···
engines = mkOption {
type = with types; listOf fcitxEngine;
default = [];
-
example = literalExample "with pkgs.fcitx-engines; [ mozc hangul ]";
+
example = literalExpression "with pkgs.fcitx-engines; [ mozc hangul ]";
description =
let
enginesDrv = filterAttrs (const isDerivation) pkgs.fcitx-engines;
+1 -1
nixos/modules/i18n/input-method/fcitx5.nix
···
addons = mkOption {
type = with types; listOf package;
default = [];
-
example = with pkgs; [ fcitx5-rime ];
+
example = literalExpression "with pkgs; [ fcitx5-rime ]";
description = ''
Enabled Fcitx5 addons.
'';
+2 -2
nixos/modules/i18n/input-method/ibus.nix
···
engines = mkOption {
type = with types; listOf ibusEngine;
default = [];
-
example = literalExample "with pkgs.ibus-engines; [ mozc hangul ]";
+
example = literalExpression "with pkgs.ibus-engines; [ mozc hangul ]";
description =
let
enginesDrv = filterAttrs (const isDerivation) pkgs.ibus-engines;
···
panel = mkOption {
type = with types; nullOr path;
default = null;
-
example = literalExample "''${pkgs.plasma5Packages.plasma-desktop}/lib/libexec/kimpanel-ibus-panel";
+
example = literalExpression ''"''${pkgs.plasma5Packages.plasma-desktop}/lib/libexec/kimpanel-ibus-panel"'';
description = "Replace the IBus panel with another panel.";
};
};
+1 -1
nixos/modules/i18n/input-method/kime.nix
···
config = mkOption {
type = yamlFormat.type;
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
daemon = {
modules = ["Xim" "Indicator"];
+2 -2
nixos/modules/installer/cd-dvd/iso-image.nix
···
};
isoImage.contents = mkOption {
-
example = literalExample ''
+
example = literalExpression ''
[ { source = pkgs.memtest86 + "/memtest.bin";
target = "boot/memtest.bin";
}
···
};
isoImage.storeContents = mkOption {
-
example = literalExample "[ pkgs.stdenv ]";
+
example = literalExpression "[ pkgs.stdenv ]";
description = ''
This option lists additional derivations to be included in the
Nix store in the generated ISO image.
+2 -2
nixos/modules/installer/cd-dvd/system-tarball.nix
···
{
options = {
tarball.contents = mkOption {
-
example = literalExample ''
+
example = literalExpression ''
[ { source = pkgs.memtest86 + "/memtest.bin";
target = "boot/memtest.bin";
}
···
};
tarball.storeContents = mkOption {
-
example = literalExample "[ pkgs.stdenv ]";
+
example = literalExpression "[ pkgs.stdenv ]";
description = ''
This option lists additional derivations to be included in the
Nix store in the generated ISO image.
+1 -1
nixos/modules/installer/netboot/netboot.nix
···
options = {
netboot.storeContents = mkOption {
-
example = literalExample "[ pkgs.stdenv ]";
+
example = literalExpression "[ pkgs.stdenv ]";
description = ''
This option lists additional derivations to be included in the
Nix store in the generated netboot image.
+4 -4
nixos/modules/installer/sd-card/sd-image.nix
···
storePaths = mkOption {
type = with types; listOf package;
-
example = literalExample "[ pkgs.stdenv ]";
+
example = literalExpression "[ pkgs.stdenv ]";
description = ''
Derivations to be included in the Nix store in the generated SD image.
'';
···
};
populateFirmwareCommands = mkOption {
-
example = literalExample "'' cp \${pkgs.myBootLoader}/u-boot.bin firmware/ ''";
+
example = literalExpression "'' cp \${pkgs.myBootLoader}/u-boot.bin firmware/ ''";
description = ''
Shell commands to populate the ./firmware directory.
All files in that directory are copied to the
···
};
populateRootCommands = mkOption {
-
example = literalExample "''\${config.boot.loader.generic-extlinux-compatible.populateCmd} -c \${config.system.build.toplevel} -d ./files/boot''";
+
example = literalExpression "''\${config.boot.loader.generic-extlinux-compatible.populateCmd} -c \${config.system.build.toplevel} -d ./files/boot''";
description = ''
Shell commands to populate the ./files directory.
All files in that directory are copied to the
···
};
postBuildCommands = mkOption {
-
example = literalExample "'' dd if=\${pkgs.myBootLoader}/SPL of=$img bs=1024 seek=1 conv=notrunc ''";
+
example = literalExpression "'' dd if=\${pkgs.myBootLoader}/SPL of=$img bs=1024 seek=1 conv=notrunc ''";
default = "";
description = ''
Shell commands to run after the image is built.
+2 -2
nixos/modules/misc/documentation.nix
···
extraOutputsToInstall = ["man"];
ignoreCollisions = true;
};
-
defaultText = "all man pages in config.environment.systemPackages";
+
defaultText = literalDocBook "all man pages in <option>config.environment.systemPackages</option>";
description = ''
The manual pages to generate caches for if <option>generateCaches</option>
is enabled. Must be a path to a directory with man pages under
···
Which extra NixOS module paths the generated NixOS's documentation should strip
from options.
'';
-
example = literalExample ''
+
example = literalExpression ''
# e.g. with options from modules in ''${pkgs.customModules}/nix:
[ pkgs.customModules ]
'';
+2 -2
nixos/modules/misc/locate.nix
···
locate = mkOption {
type = package;
default = pkgs.findutils;
-
defaultText = "pkgs.findutils";
-
example = "pkgs.mlocate";
+
defaultText = literalExpression "pkgs.findutils";
+
example = literalExpression "pkgs.mlocate";
description = ''
The locate implementation to use
'';
+9 -9
nixos/modules/misc/nixpkgs.nix
···
options.nixpkgs = {
pkgs = mkOption {
-
defaultText = literalExample
-
''import "''${nixos}/.." {
-
inherit (cfg) config overlays localSystem crossSystem;
-
}
-
'';
+
defaultText = literalExpression ''
+
import "''${nixos}/.." {
+
inherit (cfg) config overlays localSystem crossSystem;
+
}
+
'';
type = pkgsType;
-
example = literalExample "import <nixpkgs> {}";
+
example = literalExpression "import <nixpkgs> {}";
description = ''
If set, the pkgs argument to all NixOS modules is the value of
this option, extended with <code>nixpkgs.overlays</code>, if
···
config = mkOption {
default = {};
-
example = literalExample
+
example = literalExpression
''
{ allowBroken = true; allowUnfree = true; }
'';
···
overlays = mkOption {
default = [];
-
example = literalExample
+
example = literalExpression
''
[
(self: super: {
···
# Make sure that the final value has all fields for sake of other modules
# referring to this. TODO make `lib.systems` itself use the module system.
apply = lib.systems.elaborate;
-
defaultText = literalExample
+
defaultText = literalExpression
''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
description = ''
Specifies the platform on which NixOS should be built. When
+2 -2
nixos/modules/programs/atop.nix
···
package = mkOption {
type = types.package;
default = pkgs.atop;
-
defaultText = "pkgs.atop";
+
defaultText = literalExpression "pkgs.atop";
description = ''
Which package to use for Atop.
'';
···
package = mkOption {
type = types.package;
default = config.boot.kernelPackages.netatop;
-
defaultText = "config.boot.kernelPackages.netatop";
+
defaultText = literalExpression "config.boot.kernelPackages.netatop";
description = ''
Which package to use for netatop.
'';
+1 -1
nixos/modules/programs/captive-browser.nix
···
package = mkOption {
type = types.package;
default = pkgs.captive-browser;
-
defaultText = "pkgs.captive-browser";
+
defaultText = literalExpression "pkgs.captive-browser";
description = "Which package to use for captive-browser";
};
+2 -2
nixos/modules/programs/chromium.nix
···
for additional details.
'';
default = [];
-
example = literalExample ''
+
example = literalExpression ''
[
"chlffgpmiacpedhhbkiomidkjlcfhogd" # pushbullet
"mbniclmhobmnbdlbpiphghaielnnpgdp" # lightshot
···
Make sure the selected policy is supported on Linux and your browser version.
'';
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"BrowserSignin" = 0;
"SyncDisabled" = true;
+1 -1
nixos/modules/programs/digitalbitbox/default.nix
···
package = mkOption {
type = types.package;
default = pkgs.digitalbitbox;
-
defaultText = "pkgs.digitalbitbox";
+
defaultText = literalExpression "pkgs.digitalbitbox";
description = "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
};
};
+1 -1
nixos/modules/programs/dmrconfig.nix
···
package = mkOption {
default = pkgs.dmrconfig;
type = types.package;
-
defaultText = "pkgs.dmrconfig";
+
defaultText = literalExpression "pkgs.dmrconfig";
description = "dmrconfig derivation to use";
};
};
+1
nixos/modules/programs/feedbackd.nix
···
'';
type = types.package;
default = pkgs.feedbackd;
+
defaultText = literalExpression "pkgs.feedbackd";
};
};
};
+3 -3
nixos/modules/programs/firejail.nix
···
executable = mkOption {
type = types.path;
description = "Executable to run sandboxed";
-
example = literalExample "''${lib.getBin pkgs.firefox}/bin/firefox";
+
example = literalExpression ''"''${lib.getBin pkgs.firefox}/bin/firefox"'';
};
profile = mkOption {
type = types.nullOr types.path;
default = null;
description = "Profile to use";
-
example = literalExample "''${pkgs.firejail}/etc/firejail/firefox.profile";
+
example = literalExpression ''"''${pkgs.firejail}/etc/firejail/firefox.profile"'';
};
extraArgs = mkOption {
type = types.listOf types.str;
···
};
}));
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
firefox = {
executable = "''${lib.getBin pkgs.firefox}/bin/firefox";
+1 -1
nixos/modules/programs/flexoptix-app.nix
···
description = "FLEXOPTIX app package to use";
type = types.package;
default = pkgs.flexoptix-app;
-
defaultText = "\${pkgs.flexoptix-app}";
+
defaultText = literalExpression "pkgs.flexoptix-app";
};
};
};
+1 -1
nixos/modules/programs/freetds.nix
···
environment.freetds = mkOption {
type = types.attrsOf types.str;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{ MYDATABASE = '''
host = 10.0.2.100
port = 1433
+1 -1
nixos/modules/programs/gamemode.nix
···
System-wide configuration for GameMode (/etc/gamemode.ini).
See gamemoded(8) man page for available settings.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
general = {
renice = 10;
+2 -2
nixos/modules/programs/git.nix
···
package = mkOption {
type = types.package;
default = pkgs.git;
-
defaultText = "pkgs.git";
-
example = literalExample "pkgs.gitFull";
+
defaultText = literalExpression "pkgs.git";
+
example = literalExpression "pkgs.gitFull";
description = "The git package to use";
};
+1 -1
nixos/modules/programs/gnupg.nix
···
package = mkOption {
type = types.package;
default = pkgs.gnupg;
-
defaultText = "pkgs.gnupg";
+
defaultText = literalExpression "pkgs.gnupg";
description = ''
The gpg package that should be used.
'';
+1 -1
nixos/modules/programs/java.nix
···
package = mkOption {
default = pkgs.jdk;
-
defaultText = "pkgs.jdk";
+
defaultText = literalExpression "pkgs.jdk";
description = ''
Java package to install. Typical values are pkgs.jdk or pkgs.jre.
'';
+2 -2
nixos/modules/programs/kdeconnect.nix
···
'';
package = mkOption {
default = pkgs.kdeconnect;
-
defaultText = "pkgs.kdeconnect";
+
defaultText = literalExpression "pkgs.kdeconnect";
type = types.package;
-
example = literalExample "pkgs.gnomeExtensions.gsconnect";
+
example = literalExpression "pkgs.gnomeExtensions.gsconnect";
description = ''
The package providing the implementation for kdeconnect.
'';
+2 -1
nixos/modules/programs/less.nix
···
configFile = mkOption {
type = types.nullOr types.path;
default = null;
-
example = literalExample "\${pkgs.my-configs}/lesskey";
+
example = literalExpression ''"''${pkgs.my-configs}/lesskey"'';
description = ''
Path to lesskey configuration file.
···
lessopen = mkOption {
type = types.nullOr types.str;
default = "|${pkgs.lesspipe}/bin/lesspipe.sh %s";
+
defaultText = literalExpression ''"|''${pkgs.lesspipe}/bin/lesspipe.sh %s"'';
description = ''
Before less opens a file, it first gives your input preprocessor a chance to modify the way the contents of the file are displayed.
'';
+1
nixos/modules/programs/mtr.nix
···
package = mkOption {
type = types.package;
default = pkgs.mtr;
+
defaultText = literalExpression "pkgs.mtr";
description = ''
The package to use.
'';
+13 -13
nixos/modules/programs/neovim.nix
···
configure = mkOption {
type = types.attrs;
default = {};
-
example = literalExample ''
-
configure = {
-
customRC = $''''
+
example = literalExpression ''
+
{
+
customRC = '''
" here your custom configuration goes!
-
$'''';
-
packages.myVimPackage = with pkgs.vimPlugins; {
-
# loaded on launch
-
start = [ fugitive ];
-
# manually loadable by calling `:packadd $plugin-name`
-
opt = [ ];
-
};
+
''';
+
packages.myVimPackage = with pkgs.vimPlugins; {
+
# loaded on launch
+
start = [ fugitive ];
+
# manually loadable by calling `:packadd $plugin-name`
+
opt = [ ];
};
+
}
'';
description = ''
Generate your init file from your list of plugins and custom commands.
···
package = mkOption {
type = types.package;
default = pkgs.neovim-unwrapped;
-
defaultText = literalExample "pkgs.neovim-unwrapped";
+
defaultText = literalExpression "pkgs.neovim-unwrapped";
description = "The package to use for the neovim binary.";
};
···
runtime = mkOption {
default = {};
-
example = literalExample ''
-
runtime."ftplugin/c.vim".text = "setlocal omnifunc=v:lua.vim.lsp.omnifunc";
+
example = literalExpression ''
+
{ "ftplugin/c.vim".text = "setlocal omnifunc=v:lua.vim.lsp.omnifunc"; }
'';
description = ''
Set of files that have to be linked in <filename>runtime</filename>.
+1
nixos/modules/programs/noisetorch.nix
···
package = mkOption {
type = types.package;
default = pkgs.noisetorch;
+
defaultText = literalExpression "pkgs.noisetorch";
description = ''
The noisetorch package to use.
'';
+3 -2
nixos/modules/programs/npm.nix
···
enable = mkEnableOption "<command>npm</command> global config";
package = mkOption {
-
type = types.path;
+
type = types.package;
description = "The npm package version / flavor to use";
default = pkgs.nodePackages.npm;
-
example = literalExample "pkgs.nodePackages_13_x.npm";
+
defaultText = literalExpression "pkgs.nodePackages.npm";
+
example = literalExpression "pkgs.nodePackages_13_x.npm";
};
npmrc = mkOption {
+1 -1
nixos/modules/programs/proxychains.nix
···
Proxies to be used by proxychains.
'';
-
example = literalExample ''
+
example = literalExpression ''
{ myproxy =
{ type = "socks4";
host = "127.0.0.1";
+1 -1
nixos/modules/programs/shadow.nix
···
This must not be a store path, since the path is
used outside the store (in particular in /etc/passwd).
'';
-
example = literalExample "pkgs.zsh";
+
example = literalExpression "pkgs.zsh";
type = types.either types.path types.shellPackage;
};
+7 -5
nixos/modules/programs/spacefm.nix
···
terminal_su = "${pkgs.sudo}/bin/sudo";
graphical_su = "${pkgs.gksu}/bin/gksu";
};
-
example = literalExample ''{
-
tmp_dir = "/tmp";
-
terminal_su = "''${pkgs.sudo}/bin/sudo";
-
graphical_su = "''${pkgs.gksu}/bin/gksu";
-
}'';
+
defaultText = literalExpression ''
+
{
+
tmp_dir = "/tmp";
+
terminal_su = "''${pkgs.sudo}/bin/sudo";
+
graphical_su = "''${pkgs.gksu}/bin/gksu";
+
}
+
'';
description = ''
The system-wide spacefm configuration.
Parameters to be written to <filename>/etc/spacefm/spacefm.conf</filename>.
+4 -3
nixos/modules/programs/ssh.nix
···
askPassword = mkOption {
type = types.str;
default = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
+
defaultText = literalExpression ''"''${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass"'';
description = "Program used by SSH to ask for passwords.";
};
···
agentPKCS11Whitelist = mkOption {
type = types.nullOr types.str;
default = null;
-
example = "\${pkgs.opensc}/lib/opensc-pkcs11.so";
+
example = literalExpression ''"''${pkgs.opensc}/lib/opensc-pkcs11.so"'';
description = ''
A pattern-list of acceptable paths for PKCS#11 shared libraries
that may be used with the -s option to ssh-add.
···
package = mkOption {
type = types.package;
default = pkgs.openssh;
-
defaultText = "pkgs.openssh";
+
defaultText = literalExpression "pkgs.openssh";
description = ''
The package used for the openssh client and daemon.
'';
···
description = ''
The set of system-wide known SSH hosts.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
myhost = {
hostNames = [ "myhost" "myhost.mydomain.com" "10.10.1.4" ];
+1 -1
nixos/modules/programs/ssmtp.nix
···
<citerefentry><refentrytitle>ssmtp</refentrytitle><manvolnum>5</manvolnum></citerefentry> configuration. Refer
to <link xlink:href="https://linux.die.net/man/5/ssmtp.conf"/> for details on supported values.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
Debug = true;
FromLineOverride = false;
+2 -2
nixos/modules/programs/sway.nix
···
default = with pkgs; [
swaylock swayidle alacritty dmenu
];
-
defaultText = literalExample ''
+
defaultText = literalExpression ''
with pkgs; [ swaylock swayidle alacritty dmenu ];
'';
-
example = literalExample ''
+
example = literalExpression ''
with pkgs; [
i3status i3status-rust
termite rofi light
+4 -4
nixos/modules/programs/tsm-client.nix
···
inherit (builtins) length map;
inherit (lib.attrsets) attrNames filterAttrs hasAttr mapAttrs mapAttrsToList optionalAttrs;
inherit (lib.modules) mkDefault mkIf;
-
inherit (lib.options) literalExample mkEnableOption mkOption;
+
inherit (lib.options) literalExpression mkEnableOption mkOption;
inherit (lib.strings) concatStringsSep optionalString toLower;
inherit (lib.types) addCheck attrsOf lines nullOr package path port str strMatching submodule;
···
};
options.text = mkOption {
type = lines;
-
example = literalExample
+
example = literalExpression
''lib.modules.mkAfter "compression no"'';
description = ''
Additional text lines for the server stanza.
···
package = mkOption {
type = package;
default = pkgs.tsm-client;
-
defaultText = "pkgs.tsm-client";
-
example = literalExample "pkgs.tsm-client-withGui";
+
defaultText = literalExpression "pkgs.tsm-client";
+
example = literalExpression "pkgs.tsm-client-withGui";
description = ''
The TSM client derivation to be
added to the system environment.
+2 -2
nixos/modules/programs/vim.nix
···
package = mkOption {
type = types.package;
default = pkgs.vim;
-
defaultText = "pkgs.vim";
-
example = "pkgs.vimHugeX";
+
defaultText = literalExpression "pkgs.vim";
+
example = literalExpression "pkgs.vimHugeX";
description = ''
vim package to use.
'';
+1 -1
nixos/modules/programs/wireshark.nix
···
package = mkOption {
type = types.package;
default = pkgs.wireshark-cli;
-
defaultText = "pkgs.wireshark-cli";
+
defaultText = literalExpression "pkgs.wireshark-cli";
description = ''
Which Wireshark package to install in the global environment.
'';
+2 -1
nixos/modules/programs/xonsh.nix
···
package = mkOption {
type = types.package;
default = pkgs.xonsh;
-
example = literalExample "pkgs.xonsh.override { configFile = \"/path/to/xonshrc\"; }";
+
defaultText = literalExpression "pkgs.xonsh";
+
example = literalExpression "pkgs.xonsh.override { configFile = \"/path/to/xonshrc\"; }";
description = ''
xonsh package to use.
'';
+2 -1
nixos/modules/programs/xss-lock.nix
···
lockerCommand = mkOption {
default = "${pkgs.i3lock}/bin/i3lock";
-
example = literalExample "\${pkgs.i3lock-fancy}/bin/i3lock-fancy";
+
defaultText = literalExpression ''"''${pkgs.i3lock}/bin/i3lock"'';
+
example = literalExpression ''"''${pkgs.i3lock-fancy}/bin/i3lock-fancy"'';
type = types.separatedString " ";
description = "Locker to be used with xsslock";
};
+4 -5
nixos/modules/programs/xwayland.nix
···
type = types.str;
default = optionalString config.fonts.fontDir.enable
"/run/current-system/sw/share/X11/fonts";
-
defaultText = literalExample ''
-
optionalString config.fonts.fontDir.enable
-
"/run/current-system/sw/share/X11/fonts";
+
defaultText = literalExpression ''
+
optionalString config.fonts.fontDir.enable "/run/current-system/sw/share/X11/fonts"
'';
description = ''
Default font path. Setting this option causes Xwayland to be rebuilt.
···
default = pkgs.xwayland.override (oldArgs: {
inherit (cfg) defaultFontPath;
});
-
defaultText = literalExample ''
+
defaultText = literalExpression ''
pkgs.xwayland.override (oldArgs: {
inherit (config.programs.xwayland) defaultFontPath;
-
});
+
})
'';
description = "The Xwayland package to use.";
};
+2 -1
nixos/modules/programs/yabar.nix
···
package = mkOption {
default = pkgs.yabar-unstable;
-
example = literalExample "pkgs.yabar";
+
defaultText = literalExpression "pkgs.yabar-unstable";
+
example = literalExpression "pkgs.yabar";
type = types.package;
# `yabar-stable` segfaults under certain conditions.
+1 -1
nixos/modules/programs/zsh/oh-my-zsh.nix
···
package = mkOption {
default = pkgs.oh-my-zsh;
-
defaultText = "pkgs.oh-my-zsh";
+
defaultText = literalExpression "pkgs.oh-my-zsh";
description = ''
Package to install for `oh-my-zsh` usage.
'';
+1 -1
nixos/modules/programs/zsh/zsh-autoenv.nix
···
enable = mkEnableOption "zsh-autoenv";
package = mkOption {
default = pkgs.zsh-autoenv;
-
defaultText = "pkgs.zsh-autoenv";
+
defaultText = literalExpression "pkgs.zsh-autoenv";
description = ''
Package to install for `zsh-autoenv` usage.
'';
+1 -1
nixos/modules/programs/zsh/zsh-autosuggestions.nix
···
type = with types; attrsOf str;
default = {};
description = "Attribute set with additional configuration values";
-
example = literalExample ''
+
example = literalExpression ''
{
"ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE" = "20";
}
+2 -2
nixos/modules/programs/zsh/zsh-syntax-highlighting.nix
···
default = {};
type = types.attrsOf types.str;
-
example = literalExample ''
+
example = literalExpression ''
{
"rm -rf *" = "fg=white,bold,bg=red";
}
···
default = {};
type = types.attrsOf types.str;
-
example = literalExample ''
+
example = literalExpression ''
{
"alias" = "fg=magenta,bold";
}
+2 -2
nixos/modules/security/acme.nix
···
extraDomainNames = mkOption {
type = types.listOf types.str;
default = [];
-
example = literalExample ''
+
example = literalExpression ''
[
"example.org"
"mydomain.org"
···
to those units if they rely on the certificates being present,
or trigger restarts of the service if certificates get renewed.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
"example.com" = {
webroot = "/var/lib/acme/acme-challenge/";
+2 -2
nixos/modules/security/ca.nix
···
security.pki.certificateFiles = mkOption {
type = types.listOf types.path;
default = [];
-
example = literalExample "[ \"\${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt\" ]";
+
example = literalExpression ''[ "''${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" ]'';
description = ''
A list of files containing trusted root certificates in PEM
format. These are concatenated to form
···
security.pki.certificates = mkOption {
type = types.listOf types.str;
default = [];
-
example = literalExample ''
+
example = literalExpression ''
[ '''
NixOS.org
=========
+1 -1
nixos/modules/security/dhparams.nix
···
coerce = bits: { inherit bits; };
in attrsOf (coercedTo int coerce (submodule paramsSubmodule));
default = {};
-
example = lib.literalExample "{ nginx.bits = 3072; }";
+
example = lib.literalExpression "{ nginx.bits = 3072; }";
description = ''
Diffie-Hellman parameters to generate.
+1 -1
nixos/modules/security/doas.nix
···
You can use <code>mkBefore</code> and/or <code>mkAfter</code> to ensure
this is the case when configuration options are merged.
'';
-
example = literalExample ''
+
example = literalExpression ''
[
# Allow execution of any command by any user in group doas, requiring
# a password and keeping any previously-defined environment variables.
+1 -1
nixos/modules/security/pam.nix
···
};
security.pam.services = mkOption {
-
default = [];
+
default = {};
type = with types; attrsOf (submodule pamOpts);
description =
''
+2 -2
nixos/modules/security/pam_mount.nix
···
additionalSearchPaths = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "[ pkgs.bindfs ]";
+
example = literalExpression "[ pkgs.bindfs ]";
description = ''
Additional programs to include in the search path of pam_mount.
Useful for example if you want to use some FUSE filesystems like bindfs.
···
fuseMountOptions = mkOption {
type = types.listOf types.str;
default = [];
-
example = literalExample ''
+
example = literalExpression ''
[ "nodev" "nosuid" "force-user=%(USER)" "gid=%(USERGID)" "perms=0700" "chmod-deny" "chown-deny" "chgrp-deny" ]
'';
description = ''
+2 -2
nixos/modules/security/sudo.nix
···
security.sudo.package = mkOption {
type = types.package;
default = pkgs.sudo;
-
defaultText = "pkgs.sudo";
+
defaultText = literalExpression "pkgs.sudo";
description = ''
Which package to use for `sudo`.
'';
···
this is the case when configuration options are merged.
'';
default = [];
-
example = literalExample ''
+
example = literalExpression ''
[
# Allow execution of any command by all users in group sudo,
# requiring a password.
+2 -2
nixos/modules/security/systemd-confinement.nix
···
options.confinement.binSh = lib.mkOption {
type = types.nullOr types.path;
default = toplevelConfig.environment.binsh;
-
defaultText = "config.environment.binsh";
-
example = lib.literalExample "\${pkgs.dash}/bin/dash";
+
defaultText = lib.literalExpression "config.environment.binsh";
+
example = lib.literalExpression ''"''${pkgs.dash}/bin/dash"'';
description = ''
The program to make available as <filename>/bin/sh</filename> inside
the chroot. If this is set to <literal>null</literal>, no
+3 -4
nixos/modules/security/tpm2.nix
···
'';
type = lib.types.nullOr lib.types.str;
default = if cfg.abrmd.enable then "tss" else "root";
-
defaultText = ''"tss" when using the userspace resource manager,'' +
-
''"root" otherwise'';
+
defaultText = lib.literalExpression ''if config.security.tpm2.abrmd.enable then "tss" else "root"'';
};
tssGroup = lib.mkOption {
···
description = "tpm2-abrmd package to use";
type = lib.types.package;
default = pkgs.tpm2-abrmd;
-
defaultText = "pkgs.tpm2-abrmd";
+
defaultText = lib.literalExpression "pkgs.tpm2-abrmd";
};
};
···
description = "tpm2-pkcs11 package to use";
type = lib.types.package;
default = pkgs.tpm2-pkcs11;
-
defaultText = "pkgs.tpm2-pkcs11";
+
defaultText = lib.literalExpression "pkgs.tpm2-pkcs11";
};
};
+1 -1
nixos/modules/security/wrappers/default.nix
···
security.wrappers = lib.mkOption {
type = lib.types.attrsOf wrapperType;
default = {};
-
example = lib.literalExample
+
example = lib.literalExpression
''
{
# a setuid root program
+1 -1
nixos/modules/services/admin/meshcentral.nix
···
description = "MeshCentral package to use. Replacing this may be necessary to add dependencies for extra functionality.";
type = types.package;
default = pkgs.meshcentral;
-
defaultText = "pkgs.meshcentral";
+
defaultText = literalExpression "pkgs.meshcentral";
};
settings = mkOption {
description = ''
+2 -2
nixos/modules/services/admin/oxidized.nix
···
configFile = mkOption {
type = types.path;
-
example = literalExample ''
+
example = literalExpression ''
pkgs.writeText "oxidized-config.yml" '''
---
debug: true
···
routerDB = mkOption {
type = types.path;
-
example = literalExample ''
+
example = literalExpression ''
pkgs.writeText "oxidized-router.db" '''
hostname-sw1:powerconnect:username1:password2
hostname-sw2:procurve:username2:password2
+2 -1
nixos/modules/services/amqp/activemq/default.nix
···
};
configurationDir = mkOption {
default = "${activemq}/conf";
+
defaultText = literalExpression ''"''${pkgs.activemq}/conf"'';
type = types.str;
description = ''
The base directory for ActiveMQ's configuration.
···
javaProperties = mkOption {
type = types.attrs;
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
"java.net.preferIPv4Stack" = "true";
}
+2 -2
nixos/modules/services/amqp/rabbitmq.nix
···
package = mkOption {
default = pkgs.rabbitmq-server;
type = types.package;
-
defaultText = "pkgs.rabbitmq-server";
+
defaultText = literalExpression "pkgs.rabbitmq-server";
description = ''
Which rabbitmq package to use.
'';
···
configItems = mkOption {
default = { };
type = types.attrsOf types.str;
-
example = literalExample ''
+
example = literalExpression ''
{
"auth_backends.1.authn" = "rabbit_auth_backend_ldap";
"auth_backends.1.authz" = "rabbit_auth_backend_internal";
+1
nixos/modules/services/audio/botamusique.nix
···
package = mkOption {
type = types.package;
default = pkgs.botamusique;
+
defaultText = literalExpression "pkgs.botamusique";
description = "The botamusique package to use.";
};
+3 -3
nixos/modules/services/audio/jack.nix
···
internal = true;
type = types.package;
default = pkgs.jack2;
-
defaultText = "pkgs.jack2";
-
example = literalExample "pkgs.jack1";
+
defaultText = literalExpression "pkgs.jack2";
+
example = literalExpression "pkgs.jack1";
description = ''
The JACK package to use.
'';
···
default = [
"-dalsa"
];
-
example = literalExample ''
+
example = literalExpression ''
[ "-dalsa" "--device" "hw:1" ];
'';
description = ''
+3 -3
nixos/modules/services/audio/liquidsoap.nix
···
default = {};
example = {
-
myStream1 = literalExample "\"/etc/liquidsoap/myStream1.liq\"";
-
myStream2 = literalExample "./myStream2.liq";
-
myStream3 = literalExample "\"out(playlist(\\\"/srv/music/\\\"))\"";
+
myStream1 = "/etc/liquidsoap/myStream1.liq";
+
myStream2 = literalExpression "./myStream2.liq";
+
myStream3 = "out(playlist(\"/srv/music/\"))";
};
type = types.attrsOf (types.either types.path types.str);
+1 -1
nixos/modules/services/audio/mopidy.nix
···
extensionPackages = mkOption {
default = [];
type = types.listOf types.package;
-
example = literalExample "[ pkgs.mopidy-spotify ]";
+
example = literalExpression "[ pkgs.mopidy-spotify ]";
description = ''
Mopidy extensions that should be loaded by the service.
'';
+3 -3
nixos/modules/services/audio/mpd.nix
···
musicDirectory = mkOption {
type = with types; either path (strMatching "(http|https|nfs|smb)://.+");
default = "${cfg.dataDir}/music";
-
defaultText = "\${dataDir}/music";
+
defaultText = literalExpression ''"''${dataDir}/music"'';
description = ''
The directory or NFS/SMB network share where MPD reads music from. If left
as the default value this directory will automatically be created before
···
playlistDirectory = mkOption {
type = types.path;
default = "${cfg.dataDir}/playlists";
-
defaultText = "\${dataDir}/playlists";
+
defaultText = literalExpression ''"''${dataDir}/playlists"'';
description = ''
The directory where MPD stores playlists. If left as the default value
this directory will automatically be created before the MPD server starts,
···
dbFile = mkOption {
type = types.nullOr types.str;
default = "${cfg.dataDir}/tag_cache";
-
defaultText = "\${dataDir}/tag_cache";
+
defaultText = literalExpression ''"''${dataDir}/tag_cache"'';
description = ''
The path to MPD's database. If set to <literal>null</literal> the
parameter is omitted from the configuration.
+1 -1
nixos/modules/services/audio/slimserver.nix
···
package = mkOption {
type = types.package;
default = pkgs.slimserver;
-
defaultText = "pkgs.slimserver";
+
defaultText = literalExpression "pkgs.slimserver";
description = "Slimserver package to use.";
};
+3 -3
nixos/modules/services/audio/snapserver.nix
···
For type <literal>meta</literal>, a list of stream names in the form <literal>/one/two/...</literal>. Don't forget the leading slash.
For type <literal>alsa</literal>, use an empty string.
'';
-
example = literalExample ''
+
example = literalExpression ''
"/path/to/pipe"
"/path/to/librespot"
"192.168.1.2:4444"
···
description = ''
Key-value pairs that convey additional parameters about a stream.
'';
-
example = literalExample ''
+
example = literalExpression ''
# for type == "pipe":
{
mode = "create";
···
description = ''
The definition for an input source.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
mpd = {
type = "pipe";
-1
nixos/modules/services/audio/ympd.nix
···
type = types.str;
default = "localhost";
description = "The host where MPD is listening.";
-
example = "localhost";
};
port = mkOption {
+2 -2
nixos/modules/services/backup/automysqlbackup.nix
···
let
-
inherit (lib) concatMapStringsSep concatStringsSep isInt isList literalExample;
+
inherit (lib) concatMapStringsSep concatStringsSep isInt isList literalExpression;
inherit (lib) mapAttrs mapAttrsToList mkDefault mkEnableOption mkIf mkOption optional types;
cfg = config.services.automysqlbackup;
···
<filename>''${pkgs.automysqlbackup}/etc/automysqlbackup.conf</filename>
for details on supported values.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
db_names = [ "nextcloud" "matomo" ];
table_exclude = [ "nextcloud.oc_users" "nextcloud.oc_whats_new" ];
+5 -8
nixos/modules/services/backup/borgbackup.nix
···
See also the chapter about BorgBackup in the NixOS manual.
'';
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{ # for a local backup
rootBackup = {
paths = "/";
···
archiveBaseName = mkOption {
type = types.strMatching "[^/{}]+";
default = "${globalConfig.networking.hostName}-${name}";
-
defaultText = "\${config.networking.hostName}-<name>";
+
defaultText = literalExpression ''"''${config.networking.hostName}-<name>"'';
description = ''
How to name the created archives. A timestamp, whose format is
determined by <option>dateFormat</option>, will be appended. The full
···
you to specify a <option>passCommand</option>
or a <option>passphrase</option>.
'';
-
example = ''
-
encryption.mode = "repokey-blake2" ;
-
encryption.passphrase = "mySecretPassphrase" ;
-
'';
+
example = "repokey-blake2";
};
encryption.passCommand = mkOption {
···
for the available options.
'';
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
within = "1d"; # Keep all archives from the last day
daily = 7;
···
Use <literal>""</literal> to consider all archives.
'';
default = config.archiveBaseName;
-
defaultText = "\${archiveBaseName}";
+
defaultText = literalExpression "archiveBaseName";
};
environment = mkOption {
+1 -1
nixos/modules/services/backup/btrbk.nix
···
description = "Extra packages for btrbk, like compression utilities for <literal>stream_compress</literal>";
type = lib.types.listOf lib.types.package;
default = [ ];
-
example = lib.literalExample "[ pkgs.xz ]";
+
example = lib.literalExpression "[ pkgs.xz ]";
};
niceness = lib.mkOption {
description = "Niceness for local instances of btrbk. Also applies to remote ones connecting via ssh when positive.";
+1 -1
nixos/modules/services/backup/postgresql-backup.nix
···
backupAll = mkOption {
default = cfg.databases == [];
-
defaultText = "services.postgresqlBackup.databases == []";
+
defaultText = literalExpression "services.postgresqlBackup.databases == []";
type = lib.types.bool;
description = ''
Backup all databases using pg_dumpall.
+5 -5
nixos/modules/services/backup/postgresql-wal-receiver.nix
···
options = {
postgresqlPackage = mkOption {
type = types.package;
-
example = literalExample "pkgs.postgresql_11";
+
example = literalExpression "pkgs.postgresql_11";
description = ''
PostgreSQL package to use.
'';
···
directory = mkOption {
type = types.path;
-
example = literalExample "/mnt/pg_wal/main/";
+
example = literalExpression "/mnt/pg_wal/main/";
description = ''
Directory to write the output to.
'';
···
extraArgs = mkOption {
type = with types; listOf str;
default = [ ];
-
example = literalExample ''
+
example = literalExpression ''
[
"--no-sync"
]
···
environment = mkOption {
type = with types; attrsOf str;
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
PGPASSFILE = "/private/passfile";
PGSSLMODE = "require";
···
receivers = mkOption {
type = with types; attrsOf (submodule receiverSubmodule);
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
main = {
postgresqlPackage = pkgs.postgresql_11;
+1 -1
nixos/modules/services/backup/restic-rest-server.nix
···
package = mkOption {
default = pkgs.restic-rest-server;
-
defaultText = "pkgs.restic-rest-server";
+
defaultText = literalExpression "pkgs.restic-rest-server";
type = types.package;
description = "Restic REST server package to use.";
};
+1 -1
nixos/modules/services/backup/syncoid.nix
···
};
}));
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
"pool/test".target = "root@target:pool/test";
}
+3 -3
nixos/modules/services/backup/tarsnap.nix
···
maxbwRateUp = mkOption {
type = types.nullOr types.int;
default = null;
-
example = literalExample "25 * 1000";
+
example = literalExpression "25 * 1000";
description = ''
Upload bandwidth rate limit in bytes.
'';
···
maxbwRateDown = mkOption {
type = types.nullOr types.int;
default = null;
-
example = literalExample "50 * 1000";
+
example = literalExpression "50 * 1000";
description = ''
Download bandwidth rate limit in bytes.
'';
···
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
nixos =
{ directories = [ "/home" "/root/ssl" ];
+6 -6
nixos/modules/services/backup/znapzend.nix
···
<option>postsnap</option>.
'';
default = null;
-
example = literalExample ''
-
''${pkgs.mariadb}/bin/mysql -e "set autocommit=0;flush tables with read lock;\\! ''${pkgs.coreutils}/bin/sleep 600" & ''${pkgs.coreutils}/bin/echo $! > /tmp/mariadblock.pid ; sleep 10
+
example = literalExpression ''
+
'''''${pkgs.mariadb}/bin/mysql -e "set autocommit=0;flush tables with read lock;\\! ''${pkgs.coreutils}/bin/sleep 600" & ''${pkgs.coreutils}/bin/echo $! > /tmp/mariadblock.pid ; sleep 10'''
'';
};
···
e.g. for database unlocking. See also <option>presnap</option>.
'';
default = null;
-
example = literalExample ''
-
''${pkgs.coreutils}/bin/kill `''${pkgs.coreutils}/bin/cat /tmp/mariadblock.pid`;''${pkgs.coreutils}/bin/rm /tmp/mariadblock.pid
+
example = literalExpression ''
+
"''${pkgs.coreutils}/bin/kill `''${pkgs.coreutils}/bin/cat /tmp/mariadblock.pid`;''${pkgs.coreutils}/bin/rm /tmp/mariadblock.pid"
'';
};
···
type = attrsOf (destType config);
description = "Additional destinations.";
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
local = {
dataset = "btank/backup";
···
type = attrsOf srcType;
description = "Znapzend configuration.";
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"tank/home" = {
# Make snapshots of tank/home every hour, keep those for 1 day,
+1
nixos/modules/services/blockchain/ethereum/geth.nix
···
package = mkOption {
default = pkgs.go-ethereum.geth;
+
defaultText = literalExpression "pkgs.go-ethereum.geth";
type = types.package;
description = "Package to use as Go Ethereum node.";
};
+5 -6
nixos/modules/services/cluster/hadoop/default.nix
···
coreSite = mkOption {
default = {};
type = types.attrsOf types.anything;
-
example = literalExample ''
+
example = literalExpression ''
{
"fs.defaultFS" = "hdfs://localhost";
}
···
hdfsSite = mkOption {
default = {};
type = types.attrsOf types.anything;
-
example = literalExample ''
+
example = literalExpression ''
{
"dfs.nameservices" = "namenode1";
}
···
mapredSite = mkOption {
default = {};
type = types.attrsOf types.anything;
-
example = literalExample ''
+
example = literalExpression ''
{
"mapreduce.map.cpu.vcores" = "1";
}
···
yarnSite = mkOption {
default = {};
type = types.attrsOf types.anything;
-
example = literalExample ''
+
example = literalExpression ''
{
"yarn.resourcemanager.ha.id" = "resourcemanager1";
}
···
package = mkOption {
type = types.package;
default = pkgs.hadoop;
-
defaultText = "pkgs.hadoop";
-
example = literalExample "pkgs.hadoop";
+
defaultText = literalExpression "pkgs.hadoop";
description = "";
};
};
+1 -2
nixos/modules/services/cluster/k3s/default.nix
···
package = mkOption {
type = types.package;
default = pkgs.k3s;
-
defaultText = "pkgs.k3s";
-
example = literalExample "pkgs.k3s";
+
defaultText = literalExpression "pkgs.k3s";
description = "Package that should be used for k3s";
};
+2 -2
nixos/modules/services/cluster/kubernetes/addon-manager.nix
···
'';
default = { };
type = attrsOf attrs;
-
example = literalExample ''
+
example = literalExpression ''
{
"my-service" = {
"apiVersion" = "v1";
···
description = "Kubernetes addons (any kind of Kubernetes resource can be an addon).";
default = { };
type = attrsOf (either attrs (listOf attrs));
-
example = literalExample ''
+
example = literalExpression ''
{
"my-service" = {
"apiVersion" = "v1";
+17 -14
nixos/modules/services/cluster/kubernetes/addons/dns.nix
···
reload
loadbalance
}'';
-
defaultText = ''
-
.:${toString ports.dns} {
-
errors
-
health :${toString ports.health}
-
kubernetes ''${config.services.kubernetes.addons.dns.clusterDomain} in-addr.arpa ip6.arpa {
-
pods insecure
-
fallthrough in-addr.arpa ip6.arpa
+
defaultText = literalExpression ''
+
'''
+
.:${toString ports.dns} {
+
errors
+
health :${toString ports.health}
+
kubernetes ''${config.services.kubernetes.addons.dns.clusterDomain} in-addr.arpa ip6.arpa {
+
pods insecure
+
fallthrough in-addr.arpa ip6.arpa
+
}
+
prometheus :${toString ports.metrics}
+
forward . /etc/resolv.conf
+
cache 30
+
loop
+
reload
+
loadbalance
}
-
prometheus :${toString ports.metrics}
-
forward . /etc/resolv.conf
-
cache 30
-
loop
-
reload
-
loadbalance
-
}'';
+
'''
+
'';
};
};
+1 -1
nixos/modules/services/cluster/kubernetes/default.nix
···
description = "Kubernetes package to use.";
type = types.package;
default = pkgs.kubernetes;
-
defaultText = "pkgs.kubernetes";
+
defaultText = literalExpression "pkgs.kubernetes";
};
kubeconfig = mkKubeConfigOptions "Default kubeconfig";
+1 -1
nixos/modules/services/cluster/kubernetes/kubelet.nix
···
description = "Kubernetes CNI configuration.";
type = listOf attrs;
default = [];
-
example = literalExample ''
+
example = literalExpression ''
[{
"cniVersion": "0.3.1",
"name": "mynet",
+3 -3
nixos/modules/services/cluster/spark/default.nix
···
type = types.path;
description = "Spark configuration directory. Spark will use the configuration files (spark-defaults.conf, spark-env.sh, log4j.properties, etc) from this directory.";
default = "${cfg.package}/lib/${cfg.package.untarDir}/conf";
-
defaultText = literalExample "\${cfg.package}/lib/\${cfg.package.untarDir}/conf";
+
defaultText = literalExpression ''"''${package}/lib/''${package.untarDir}/conf"'';
};
logDir = mkOption {
type = types.path;
···
type = types.package;
description = "Spark package.";
default = pkgs.spark;
-
defaultText = "pkgs.spark";
-
example = literalExample ''pkgs.spark.overrideAttrs (super: rec {
+
defaultText = literalExpression "pkgs.spark";
+
example = literalExpression ''pkgs.spark.overrideAttrs (super: rec {
pname = "spark";
version = "2.4.4";
+2 -2
nixos/modules/services/computing/boinc/client.nix
···
package = mkOption {
type = types.package;
default = pkgs.boinc;
-
defaultText = "pkgs.boinc";
+
defaultText = literalExpression "pkgs.boinc";
description = ''
Which BOINC package to use.
'';
···
extraEnvPackages = mkOption {
type = types.listOf types.package;
default = [];
-
example = "[ pkgs.virtualbox ]";
+
example = literalExpression "[ pkgs.virtualbox ]";
description = ''
Additional packages to make available in the environment in which
BOINC will run. Common choices are:
+1 -1
nixos/modules/services/computing/foldingathome/client.nix
···
package = mkOption {
type = types.package;
default = pkgs.fahclient;
-
defaultText = "pkgs.fahclient";
+
defaultText = literalExpression "pkgs.fahclient";
description = ''
Which Folding@home client to use.
'';
+4 -4
nixos/modules/services/computing/slurm/slurm.nix
···
package = mkOption {
type = types.package;
default = pkgs.slurm.override { enableX11 = ! cfg.enableSrunX11; };
-
defaultText = "pkgs.slurm";
-
example = literalExample "pkgs.slurm-full";
+
defaultText = literalExpression "pkgs.slurm";
+
example = literalExpression "pkgs.slurm-full";
description = ''
The package to use for slurm binaries.
'';
···
nodeName = mkOption {
type = types.listOf types.str;
default = [];
-
example = literalExample ''[ "linux[1-32] CPUs=1 State=UNKNOWN" ];'';
+
example = literalExpression ''[ "linux[1-32] CPUs=1 State=UNKNOWN" ];'';
description = ''
Name that SLURM uses to refer to a node (or base partition for BlueGene
systems). Typically this would be the string that "/bin/hostname -s"
···
partitionName = mkOption {
type = types.listOf types.str;
default = [];
-
example = literalExample ''[ "debug Nodes=linux[1-32] Default=YES MaxTime=INFINITE State=UP" ];'';
+
example = literalExpression ''[ "debug Nodes=linux[1-32] Default=YES MaxTime=INFINITE State=UP" ];'';
description = ''
Name by which the partition may be referenced. Note that now you have
to write the partition's parameters after the name.
+6 -5
nixos/modules/services/continuous-integration/buildbot/master.nix
···
type = types.path;
description = "Optionally pass master.cfg path. Other options in this configuration will be ignored.";
default = defaultMasterCfg;
+
defaultText = literalDocBook ''generated configuration file'';
example = "/etc/nixos/buildbot/master.cfg";
};
···
package = mkOption {
type = types.package;
default = pkgs.python3Packages.buildbot-full;
-
defaultText = "pkgs.python3Packages.buildbot-full";
+
defaultText = literalExpression "pkgs.python3Packages.buildbot-full";
description = "Package to use for buildbot.";
-
example = literalExample "pkgs.python3Packages.buildbot";
+
example = literalExpression "pkgs.python3Packages.buildbot";
};
packages = mkOption {
default = [ pkgs.git ];
-
example = literalExample "[ pkgs.git ]";
+
defaultText = literalExpression "[ pkgs.git ]";
type = types.listOf types.package;
description = "Packages to add to PATH for the buildbot process.";
};
···
pythonPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = pythonPackages: with pythonPackages; [ ];
-
defaultText = "pythonPackages: with pythonPackages; [ ]";
+
defaultText = literalExpression "pythonPackages: with pythonPackages; [ ]";
description = "Packages to add the to the PYTHONPATH of the buildbot process.";
-
example = literalExample "pythonPackages: with pythonPackages; [ requests ]";
+
example = literalExpression "pythonPackages: with pythonPackages; [ requests ]";
};
};
};
+3 -3
nixos/modules/services/continuous-integration/buildbot/worker.nix
···
package = mkOption {
type = types.package;
default = pkgs.python3Packages.buildbot-worker;
-
defaultText = "pkgs.python3Packages.buildbot-worker";
+
defaultText = literalExpression "pkgs.python3Packages.buildbot-worker";
description = "Package to use for buildbot worker.";
-
example = literalExample "pkgs.python2Packages.buildbot-worker";
+
example = literalExpression "pkgs.python2Packages.buildbot-worker";
};
packages = mkOption {
default = with pkgs; [ git ];
-
example = literalExample "[ pkgs.git ]";
+
defaultText = literalExpression "[ pkgs.git ]";
type = types.listOf types.package;
description = "Packages to add to PATH for the buildbot process.";
};
+4 -3
nixos/modules/services/continuous-integration/buildkite-agents.nix
···
package = mkOption {
default = pkgs.buildkite-agent;
-
defaultText = "pkgs.buildkite-agent";
+
defaultText = literalExpression "pkgs.buildkite-agent";
description = "Which buildkite-agent derivation to use";
type = types.package;
};
···
runtimePackages = mkOption {
default = [ pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix ];
-
defaultText = "[ pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix ]";
+
defaultText = literalExpression "[ pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix ]";
description = "Add programs to the buildkite-agent environment";
type = types.listOf types.package;
};
···
hooksPath = mkOption {
type = types.path;
default = hooksDir config;
-
defaultText = "generated from services.buildkite-agents.<name>.hooks";
+
defaultText = literalDocBook "generated from <option>services.buildkite-agents.&lt;name&gt;.hooks</option>";
description = ''
Path to the directory storing the hooks.
Consider using <option>services.buildkite-agents.&lt;name&gt;.hooks.&lt;name&gt;</option>
···
shell = mkOption {
type = types.str;
default = "${pkgs.bash}/bin/bash -e -c";
+
defaultText = literalExpression ''"''${pkgs.bash}/bin/bash -e -c"'';
description = ''
Command that buildkite-agent 3 will execute when it spawns a shell.
'';
+2 -1
nixos/modules/services/continuous-integration/github-runner.nix
···
Changing this option triggers a new runner registration.
'';
-
example = literalExample ''[ "nixos" ]'';
+
example = literalExpression ''[ "nixos" ]'';
default = [ ];
};
···
Which github-runner derivation to use.
'';
default = pkgs.github-runner;
+
defaultText = literalExpression "pkgs.github-runner";
};
};
+6 -6
nixos/modules/services/continuous-integration/gitlab-runner.nix
···
checkInterval = mkOption {
type = types.int;
default = 0;
-
example = literalExample "with lib; (length (attrNames config.services.gitlab-runner.services)) * 3";
+
example = literalExpression "with lib; (length (attrNames config.services.gitlab-runner.services)) * 3";
description = ''
Defines the interval length, in seconds, between new jobs check.
The default value is 3;
···
concurrent = mkOption {
type = types.int;
default = 1;
-
example = literalExample "config.nix.maxJobs";
+
example = literalExpression "config.nix.maxJobs";
description = ''
Limits how many jobs globally can be run concurrently.
The most upper limit of jobs using all defined runners.
···
};
};
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
listenAddress = "0.0.0.0:8093";
}
···
package = mkOption {
type = types.package;
default = pkgs.gitlab-runner;
-
defaultText = "pkgs.gitlab-runner";
-
example = literalExample "pkgs.gitlab-runner_1_11";
+
defaultText = literalExpression "pkgs.gitlab-runner";
+
example = literalExpression "pkgs.gitlab-runner_1_11";
description = "Gitlab Runner package to use.";
};
extraPackages = mkOption {
···
services = mkOption {
description = "GitLab Runner services.";
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
# runner for building in docker via host's nix-daemon
# nix store will be readable in runner, might be insecure
+1 -1
nixos/modules/services/continuous-integration/gocd-agent/default.nix
···
packages = mkOption {
default = [ pkgs.stdenv pkgs.jre pkgs.git config.programs.ssh.package pkgs.nix ];
-
defaultText = "[ pkgs.stdenv pkgs.jre pkgs.git config.programs.ssh.package pkgs.nix ]";
+
defaultText = literalExpression "[ pkgs.stdenv pkgs.jre pkgs.git config.programs.ssh.package pkgs.nix ]";
type = types.listOf types.package;
description = ''
Packages to add to PATH for the Go.CD agent process.
+1 -1
nixos/modules/services/continuous-integration/gocd-server/default.nix
···
packages = mkOption {
default = [ pkgs.stdenv pkgs.jre pkgs.git config.programs.ssh.package pkgs.nix ];
-
defaultText = "[ pkgs.stdenv pkgs.jre pkgs.git config.programs.ssh.package pkgs.nix ]";
+
defaultText = literalExpression "[ pkgs.stdenv pkgs.jre pkgs.git config.programs.ssh.package pkgs.nix ]";
type = types.listOf types.package;
description = ''
Packages to add to PATH for the Go.CD server's process.
+1 -1
nixos/modules/services/continuous-integration/hail.nix
···
package = mkOption {
type = types.package;
default = pkgs.haskellPackages.hail;
-
defaultText = "pkgs.haskellPackages.hail";
+
defaultText = literalExpression "pkgs.haskellPackages.hail";
description = "Hail package to use.";
};
};
+8 -7
nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix
···
let
inherit (lib)
filterAttrs
-
literalExample
+
literalDocBook
+
literalExpression
mkIf
mkOption
mkRemovedOptionModule
···
'';
type = types.path;
default = config.baseDirectory + "/work";
-
defaultText = literalExample ''baseDirectory + "/work"'';
+
defaultText = literalExpression ''baseDirectory + "/work"'';
};
staticSecretsDirectory = mkOption {
description = ''
···
'';
type = types.path;
default = config.baseDirectory + "/secrets";
-
defaultText = literalExample ''baseDirectory + "/secrets"'';
+
defaultText = literalExpression ''baseDirectory + "/secrets"'';
};
clusterJoinTokenPath = mkOption {
description = ''
···
'';
type = types.path;
default = config.staticSecretsDirectory + "/cluster-join-token.key";
-
defaultText = literalExample ''staticSecretsDirectory + "/cluster-join-token.key"'';
+
defaultText = literalExpression ''staticSecretsDirectory + "/cluster-join-token.key"'';
# internal: It's a bit too detailed to show by default in the docs,
# but useful to define explicitly to allow reuse by other modules.
internal = true;
···
'';
type = types.path;
default = config.staticSecretsDirectory + "/binary-caches.json";
-
defaultText = literalExample ''staticSecretsDirectory + "/binary-caches.json"'';
+
defaultText = literalExpression ''staticSecretsDirectory + "/binary-caches.json"'';
# internal: It's a bit too detailed to show by default in the docs,
# but useful to define explicitly to allow reuse by other modules.
internal = true;
···
'';
type = types.package;
default = pkgs.hercules-ci-agent;
-
defaultText = literalExample "pkgs.hercules-ci-agent";
+
defaultText = literalExpression "pkgs.hercules-ci-agent";
};
settings = mkOption {
description = ''
···
tomlFile = mkOption {
type = types.path;
internal = true;
-
defaultText = "generated hercules-ci-agent.toml";
+
defaultText = literalDocBook "generated <literal>hercules-ci-agent.toml</literal>";
description = ''
The fully assembled config file.
'';
+2 -2
nixos/modules/services/continuous-integration/hydra/default.nix
···
package = mkOption {
type = types.package;
default = pkgs.hydra-unstable;
-
defaultText = "pkgs.hydra-unstable";
+
defaultText = literalExpression "pkgs.hydra-unstable";
description = "The Hydra package.";
};
···
smtpHost = mkOption {
type = types.nullOr types.str;
default = null;
-
example = ["localhost"];
+
example = "localhost";
description = ''
Hostname of the SMTP server to use to send email.
'';
+3 -3
nixos/modules/services/continuous-integration/jenkins/default.nix
···
package = mkOption {
default = pkgs.jenkins;
-
defaultText = "pkgs.jenkins";
+
defaultText = literalExpression "pkgs.jenkins";
type = types.package;
description = "Jenkins package to use.";
};
packages = mkOption {
default = [ pkgs.stdenv pkgs.git pkgs.jdk11 config.programs.ssh.package pkgs.nix ];
-
defaultText = "[ pkgs.stdenv pkgs.git pkgs.jdk11 config.programs.ssh.package pkgs.nix ]";
+
defaultText = literalExpression "[ pkgs.stdenv pkgs.git pkgs.jdk11 config.programs.ssh.package pkgs.nix ]";
type = types.listOf types.package;
description = ''
Packages to add to PATH for the jenkins process.
···
<literal>null</literal>. You can generate this set with a
tool such as <literal>jenkinsPlugins2nix</literal>.
'';
-
example = literalExample ''
+
example = literalExpression ''
import path/to/jenkinsPlugins2nix-generated-plugins.nix { inherit (pkgs) fetchurl stdenv; }
'';
};
+2 -2
nixos/modules/services/continuous-integration/jenkins/job-builder.nix
···
jsonJobs = mkOption {
default = [ ];
type = types.listOf types.str;
-
example = literalExample ''
+
example = literalExpression ''
[
'''
[ { "job":
···
nixJobs = mkOption {
default = [ ];
type = types.listOf types.attrs;
-
example = literalExample ''
+
example = literalExpression ''
[ { job =
{ name = "jenkins-job-test-3";
builders = [
+1 -1
nixos/modules/services/databases/aerospike.nix
···
package = mkOption {
default = pkgs.aerospike;
-
defaultText = "pkgs.aerospike";
+
defaultText = literalExpression "pkgs.aerospike";
type = types.package;
description = "Which Aerospike derivation to use";
};
+6 -4
nixos/modules/services/databases/cassandra.nix
···
inherit (lib)
concatStringsSep
flip
-
literalExample
+
literalDocBook
+
literalExpression
optionalAttrs
optionals
recursiveUpdate
···
package = mkOption {
type = types.package;
default = pkgs.cassandra;
-
defaultText = "pkgs.cassandra";
-
example = literalExample "pkgs.cassandra_3_11";
+
defaultText = literalExpression "pkgs.cassandra";
+
example = literalExpression "pkgs.cassandra_3_11";
description = ''
The Apache Cassandra package to use.
'';
···
extraEnvSh = mkOption {
type = types.lines;
default = "";
-
example = "CLASSPATH=$CLASSPATH:\${extraJar}";
+
example = literalExpression ''"CLASSPATH=$CLASSPATH:''${extraJar}"'';
description = ''
Extra shell lines to be appended onto cassandra-env.sh.
'';
···
if versionAtLeast cfg.package.version "3.11"
then pkgs.writeText "jmx-roles-file" defaultJmxRolesFile
else null;
+
defaultText = literalDocBook ''generated configuration file if version is at least 3.11, otherwise <literal>null</literal>'';
example = "/var/lib/cassandra/jmx.password";
description = ''
Specify your own jmx roles file.
+1 -1
nixos/modules/services/databases/cockroachdb.nix
···
package = mkOption {
type = types.package;
default = pkgs.cockroachdb;
-
defaultText = "pkgs.cockroachdb";
+
defaultText = literalExpression "pkgs.cockroachdb";
description = ''
The CockroachDB derivation to use for running the service.
+1 -2
nixos/modules/services/databases/couchdb.nix
···
package = mkOption {
type = types.package;
default = pkgs.couchdb;
-
defaultText = "pkgs.couchdb";
-
example = literalExample "pkgs.couchdb";
+
defaultText = literalExpression "pkgs.couchdb";
description = ''
CouchDB package to use.
'';
+3 -5
nixos/modules/services/databases/firebird.nix
···
package = mkOption {
default = pkgs.firebird;
-
defaultText = "pkgs.firebird";
+
defaultText = literalExpression "pkgs.firebird";
type = types.package;
-
example = ''
-
<code>package = pkgs.firebird_3;</code>
-
'';
+
example = literalExpression "pkgs.firebird_3";
description = ''
Which Firebird package to be installed: <code>pkgs.firebird_3</code>
For SuperServer use override: <code>pkgs.firebird_3.override { superServer = true; };</code>
···
};
port = mkOption {
-
default = "3050";
+
default = 3050;
type = types.port;
description = ''
Port Firebird uses.
+1 -2
nixos/modules/services/databases/hbase.nix
···
package = mkOption {
type = types.package;
default = pkgs.hbase;
-
defaultText = "pkgs.hbase";
-
example = literalExample "pkgs.hbase";
+
defaultText = literalExpression "pkgs.hbase";
description = ''
HBase package to use.
'';
+1 -1
nixos/modules/services/databases/influxdb.nix
···
package = mkOption {
default = pkgs.influxdb;
-
defaultText = "pkgs.influxdb";
+
defaultText = literalExpression "pkgs.influxdb";
description = "Which influxdb derivation to use";
type = types.package;
};
+1 -1
nixos/modules/services/databases/influxdb2.nix
···
enable = mkEnableOption "the influxdb2 server";
package = mkOption {
default = pkgs.influxdb2;
-
defaultText = "pkgs.influxdb2";
+
defaultText = literalExpression "pkgs.influxdb2";
description = "influxdb2 derivation to use.";
type = types.package;
};
+1 -1
nixos/modules/services/databases/monetdb.nix
···
package = mkOption {
type = types.package;
default = pkgs.monetdb;
-
defaultText = "pkgs.monetdb";
+
defaultText = literalExpression "pkgs.monetdb";
description = "MonetDB package to use.";
};
+1 -1
nixos/modules/services/databases/mongodb.nix
···
package = mkOption {
default = pkgs.mongodb;
-
defaultText = "pkgs.mongodb";
+
defaultText = literalExpression "pkgs.mongodb";
type = types.package;
description = "
Which MongoDB derivation to use.
+8 -8
nixos/modules/services/databases/mysql.nix
···
package = mkOption {
type = types.package;
-
example = literalExample "pkgs.mariadb";
+
example = literalExpression "pkgs.mariadb";
description = "
Which MySQL derivation to use. MariaDB packages are supported too.
";
···
bind = mkOption {
type = types.nullOr types.str;
default = null;
-
example = literalExample "0.0.0.0";
+
example = "0.0.0.0";
description = "Address to bind to. The default is to bind to all addresses.";
};
···
configFile = mkOption {
type = types.path;
default = settingsFile;
-
defaultText = "settingsFile";
+
defaultText = literalExpression "settingsFile";
description = ''
Override the configuration file used by MySQL. By default,
NixOS generates one automatically from <option>services.mysql.settings</option>.
'';
-
example = literalExample ''
+
example = literalExpression ''
pkgs.writeText "my.cnf" '''
[mysqld]
datadir = /var/lib/mysql
···
</para>
</note>
'';
-
example = literalExample ''
+
example = literalExpression ''
{
mysqld = {
key_buffer_size = "6G";
···
of MySQL. The schema attribute is optional: If not specified, an empty database is created.
'';
example = [
-
{ name = "foodatabase"; schema = literalExample "./foodatabase.sql"; }
+
{ name = "foodatabase"; schema = literalExpression "./foodatabase.sql"; }
{ name = "bardatabase"; }
];
};
···
<link xlink:href="https://mariadb.com/kb/en/library/grant/">GRANT syntax</link>.
The attributes are used as <code>GRANT ''${attrName} ON ''${attrValue}</code>.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
"database.*" = "ALL PRIVILEGES";
"*.*" = "SELECT, LOCK TABLES";
···
option is changed. This means that users created and permissions assigned once through this option or
otherwise have to be removed manually.
'';
-
example = literalExample ''
+
example = literalExpression ''
[
{
name = "nextcloud";
+1 -1
nixos/modules/services/databases/neo4j.nix
···
package = mkOption {
type = types.package;
default = pkgs.neo4j;
-
defaultText = "pkgs.neo4j";
+
defaultText = literalExpression "pkgs.neo4j";
description = ''
Neo4j package to use.
'';
+7 -6
nixos/modules/services/databases/openldap.nix
···
in types.attrsOf (types.submodule { options = hiddenOptions; });
default = {};
description = "Child entries of the current entry, with recursively the same structure.";
-
example = lib.literalExample ''
+
example = lib.literalExpression ''
{
"cn=schema" = {
# The attribute used in the DN must be defined
···
package = mkOption {
type = types.package;
default = pkgs.openldap;
+
defaultText = literalExpression "pkgs.openldap";
description = ''
OpenLDAP package to use.
···
settings = mkOption {
type = ldapAttrsType;
description = "Configuration for OpenLDAP, in OLC format";
-
example = lib.literalExample ''
+
example = lib.literalExpression ''
{
attrs.olcLogLevel = [ "stats" ];
children = {
"cn=schema".includes = [
-
"\${pkgs.openldap}/etc/schema/core.ldif"
-
"\${pkgs.openldap}/etc/schema/cosine.ldif"
-
"\${pkgs.openldap}/etc/schema/inetorgperson.ldif"
+
"''${pkgs.openldap}/etc/schema/core.ldif"
+
"''${pkgs.openldap}/etc/schema/cosine.ldif"
+
"''${pkgs.openldap}/etc/schema/inetorgperson.ldif"
];
"olcDatabase={-1}frontend" = {
attrs = {
···
rebuilt on each server startup, so this will slow down server startup,
especially with large databases.
'';
-
example = lib.literalExample ''
+
example = lib.literalExpression ''
{
"dc=example,dc=org" = '''
dn= dn: dc=example,dc=org
+1 -2
nixos/modules/services/databases/opentsdb.nix
···
package = mkOption {
type = types.package;
default = pkgs.opentsdb;
-
defaultText = "pkgs.opentsdb";
-
example = literalExample "pkgs.opentsdb";
+
defaultText = literalExpression "pkgs.opentsdb";
description = ''
OpenTSDB package to use.
'';
+1 -1
nixos/modules/services/databases/pgmanage.nix
···
package = mkOption {
type = types.package;
default = pkgs.pgmanage;
-
defaultText = "pkgs.pgmanage";
+
defaultText = literalExpression "pkgs.pgmanage";
description = ''
The pgmanage package to use.
'';
+6 -6
nixos/modules/services/databases/postgresql.nix
···
package = mkOption {
type = types.package;
-
example = literalExample "pkgs.postgresql_11";
+
example = literalExpression "pkgs.postgresql_11";
description = ''
PostgreSQL package to use.
'';
···
dataDir = mkOption {
type = types.path;
-
defaultText = "/var/lib/postgresql/\${config.services.postgresql.package.psqlSchema}";
+
defaultText = literalExpression ''"/var/lib/postgresql/''${config.services.postgresql.package.psqlSchema}"'';
example = "/var/lib/postgresql/11";
description = ''
The data directory for PostgreSQL. If left as the default value
···
<link xlink:href="https://www.postgresql.org/docs/current/sql-grant.html">GRANT syntax</link>.
The attributes are used as <code>GRANT ''${attrValue} ON ''${attrName}</code>.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
"DATABASE \"nextcloud\"" = "ALL PRIVILEGES";
"ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
···
option is changed. This means that users created and permissions assigned once through this option or
otherwise have to be removed manually.
'';
-
example = literalExample ''
+
example = literalExpression ''
[
{
name = "nextcloud";
···
extraPlugins = mkOption {
type = types.listOf types.path;
default = [];
-
example = literalExample "with pkgs.postgresql_11.pkgs; [ postgis pg_repack ]";
+
example = literalExpression "with pkgs.postgresql_11.pkgs; [ postgis pg_repack ]";
description = ''
List of PostgreSQL plugins. PostgreSQL version for each plugin should
match version for <literal>services.postgresql.package</literal> value.
···
escaped with two single quotes as described by the upstream documentation linked above.
</para></note>
'';
-
example = literalExample ''
+
example = literalExpression ''
{
log_connections = true;
log_statement = "all";
+2 -3
nixos/modules/services/databases/redis.nix
···
package = mkOption {
type = types.package;
default = pkgs.redis;
-
defaultText = "pkgs.redis";
+
defaultText = literalExpression "pkgs.redis";
description = "Which Redis derivation to use.";
};
···
type = with types; listOf (listOf int);
default = [ [900 1] [300 10] [60 10000] ];
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.";
-
example = [ [900 1] [300 10] [60 10000] ];
};
slaveOf = mkOption {
···
<link xlink:href="https://redis.io/topics/config"/>
for details on supported values.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
loadmodule = [ "/path/to/my_module.so" "/path/to/other_module.so" ];
}
+1 -2
nixos/modules/services/databases/riak.nix
···
package = mkOption {
type = types.package;
default = pkgs.riak;
-
defaultText = "pkgs.riak";
-
example = literalExample "pkgs.riak";
+
defaultText = literalExpression "pkgs.riak";
description = ''
Riak package to use.
'';
+1 -1
nixos/modules/services/databases/victoriametrics.nix
···
package = mkOption {
type = types.package;
default = pkgs.victoriametrics;
-
defaultText = "pkgs.victoriametrics";
+
defaultText = literalExpression "pkgs.victoriametrics";
description = ''
The VictoriaMetrics distribution to use.
'';
+1 -3
nixos/modules/services/desktops/geoclue2.nix
···
isAllowed = mkOption {
type = types.bool;
-
default = null;
description = ''
Whether the application will be allowed access to location information.
'';
···
isSystem = mkOption {
type = types.bool;
-
default = null;
description = ''
Whether the application is a system component or not.
'';
···
appConfig = mkOption {
type = types.attrsOf appConfigModule;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
"com.github.app" = {
isAllowed = true;
isSystem = true;
+1 -1
nixos/modules/services/desktops/gnome/evolution-data-server.nix
···
plugins = mkOption {
type = types.listOf types.package;
default = [ ];
-
example = literalExample "[ pkgs.evolution-ews ]";
+
example = literalExpression "[ pkgs.evolution-ews ]";
description = "Plugins for Evolution.";
};
+1
nixos/modules/services/desktops/gvfs.nix
···
package = mkOption {
type = types.package;
default = pkgs.gnome.gvfs;
+
defaultText = literalExpression "pkgs.gnome.gvfs";
description = "Which GVfs package to use.";
};
+2 -2
nixos/modules/services/desktops/pipewire/pipewire-media-session.nix
···
enable = mkOption {
type = types.bool;
default = config.services.pipewire.enable;
-
defaultText = "config.services.pipewire.enable";
+
defaultText = literalExpression "config.services.pipewire.enable";
description = "Example pipewire session manager";
};
package = mkOption {
type = types.package;
default = pkgs.pipewire.mediaSession;
-
example = literalExample "pkgs.pipewire.mediaSession";
+
defaultText = literalExpression "pkgs.pipewire.mediaSession";
description = ''
The pipewire-media-session derivation to use.
'';
+1 -2
nixos/modules/services/desktops/pipewire/pipewire.nix
···
package = mkOption {
type = types.package;
default = pkgs.pipewire;
-
defaultText = "pkgs.pipewire";
-
example = literalExample "pkgs.pipewire";
+
defaultText = literalExpression "pkgs.pipewire";
description = ''
The pipewire derivation to use.
'';
+1 -1
nixos/modules/services/development/distccd.nix
···
package = mkOption {
type = types.package;
default = pkgs.distcc;
-
example = "pkgs.distcc";
+
defaultText = literalExpression "pkgs.distcc";
description = ''
The distcc package to use.
'';
+3 -3
nixos/modules/services/development/hoogle.nix
···
packages = mkOption {
type = types.functionTo (types.listOf types.package);
default = hp: [];
-
defaultText = "hp: []";
-
example = "hp: with hp; [ text lens ]";
+
defaultText = literalExpression "hp: []";
+
example = literalExpression "hp: with hp; [ text lens ]";
description = ''
The Haskell packages to generate documentation for.
···
haskellPackages = mkOption {
description = "Which haskell package set to use.";
default = pkgs.haskellPackages;
-
defaultText = "pkgs.haskellPackages";
+
defaultText = literalExpression "pkgs.haskellPackages";
};
home = mkOption {
+3 -5
nixos/modules/services/development/jupyter/default.nix
···
# want to pass in JUPYTER_PATH but use .environment instead,
# saving a rebuild.
default = pkgs.python3.pkgs.notebook;
+
defaultText = literalExpression "pkgs.python3.pkgs.notebook";
description = ''
Jupyter package to use.
'';
···
"open('/path/secret_file', 'r', encoding='utf8').read().strip()"
It will be interpreted at the end of the notebookConfig.
'';
-
example = [
-
"'sha1:1b961dc713fb:88483270a63e57d18d43cf337e629539de1436ba'"
-
"open('/path/secret_file', 'r', encoding='utf8').read().strip()"
-
];
+
example = "'sha1:1b961dc713fb:88483270a63e57d18d43cf337e629539de1436ba'";
};
notebookConfig = mkOption {
···
})));
default = null;
-
example = literalExample ''
+
example = literalExpression ''
{
python3 = let
env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [
+4 -4
nixos/modules/services/development/jupyter/kernel-options.nix
···
displayName = mkOption {
type = types.str;
default = "";
-
example = [
+
example = literalExpression ''
"Python 3"
"Python 3 for Data Science"
-
];
+
'';
description = ''
Name that will be shown to the user.
'';
···
logo32 = mkOption {
type = types.nullOr types.path;
default = null;
-
example = "{env.sitePackages}/ipykernel/resources/logo-32x32.png";
+
example = literalExpression ''"''${env.sitePackages}/ipykernel/resources/logo-32x32.png"'';
description = ''
Path to 32x32 logo png.
'';
···
logo64 = mkOption {
type = types.nullOr types.path;
default = null;
-
example = "{env.sitePackages}/ipykernel/resources/logo-64x64.png";
+
example = literalExpression ''"''${env.sitePackages}/ipykernel/resources/logo-64x64.png"'';
description = ''
Path to 64x64 logo png.
'';
+20 -8
nixos/modules/services/development/jupyterhub/default.nix
···
defaults for configuration but you can override anything since
this is a python file.
'';
-
example = literalExample ''
-
c.SystemdSpawner.mem_limit = '8G'
-
c.SystemdSpawner.cpu_limit = 2.0
+
example = ''
+
c.SystemdSpawner.mem_limit = '8G'
+
c.SystemdSpawner.cpu_limit = 2.0
'';
};
jupyterhubEnv = mkOption {
type = types.package;
-
default = (pkgs.python3.withPackages (p: with p; [
+
default = pkgs.python3.withPackages (p: with p; [
jupyterhub
jupyterhub-systemdspawner
-
]));
+
]);
+
defaultText = literalExpression ''
+
pkgs.python3.withPackages (p: with p; [
+
jupyterhub
+
jupyterhub-systemdspawner
+
])
+
'';
description = ''
Python environment to run jupyterhub
···
jupyterlabEnv = mkOption {
type = types.package;
-
default = (pkgs.python3.withPackages (p: with p; [
+
default = pkgs.python3.withPackages (p: with p; [
jupyterhub
jupyterlab
-
]));
+
]);
+
defaultText = literalExpression ''
+
pkgs.python3.withPackages (p: with p; [
+
jupyterhub
+
jupyterlab
+
])
+
'';
description = ''
Python environment to run jupyterlab
···
})));
default = null;
-
example = literalExample ''
+
example = literalExpression ''
{
python3 = let
env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [
+1 -2
nixos/modules/services/development/lorri.nix
···
description = ''
The lorri package to use.
'';
-
defaultText = lib.literalExample "pkgs.lorri";
-
example = lib.literalExample "pkgs.lorri";
+
defaultText = lib.literalExpression "pkgs.lorri";
};
};
};
+3 -3
nixos/modules/services/display-managers/greetd.nix
···
package = mkOption {
type = types.package;
default = pkgs.greetd.greetd;
-
defaultText = "pkgs.greetd.greetd";
+
defaultText = literalExpression "pkgs.greetd.greetd";
description = "The greetd package that should be used.";
};
settings = mkOption {
type = settingsFormat.type;
-
example = literalExample ''
+
example = literalExpression ''
{
default_session = {
command = "''${pkgs.greetd.greetd}/bin/agreety --cmd sway";
···
restart = mkOption {
type = types.bool;
default = !(cfg.settings ? initial_session);
-
defaultText = "!(config.services.greetd.settings ? initial_session)";
+
defaultText = literalExpression "!(config.services.greetd.settings ? initial_session)";
description = ''
Wether to restart greetd when it terminates (e.g. on failure).
This is usually desirable so a user can always log in, but should be disabled when using 'settings.initial_session' (autologin),
+1 -1
nixos/modules/services/editors/emacs.nix
···
package = mkOption {
type = types.package;
default = pkgs.emacs;
-
defaultText = "pkgs.emacs";
+
defaultText = literalExpression "pkgs.emacs";
description = ''
emacs derivation to use.
'';
+1 -1
nixos/modules/services/editors/infinoted.nix
···
package = mkOption {
type = types.package;
default = pkgs.libinfinity;
-
defaultText = "pkgs.libinfinity";
+
defaultText = literalExpression "pkgs.libinfinity";
description = ''
Package providing infinoted
'';
+28 -26
nixos/modules/services/games/crossfire-server.nix
···
package = mkOption {
type = types.package;
default = pkgs.crossfire-server;
-
defaultText = "pkgs.crossfire-server";
+
defaultText = literalExpression "pkgs.crossfire-server";
description = ''
The package to use for the Crossfire server (and map/arch data, if you
don't change dataDir).
···
dataDir = mkOption {
type = types.str;
default = "${cfg.package}/share/crossfire";
-
defaultText = "\${config.services.crossfire.package}/share/crossfire";
+
defaultText = literalExpression ''"''${config.services.crossfire.package}/share/crossfire"'';
description = ''
Where to load readonly data from -- maps, archetypes, treasure tables,
and the like. If you plan to edit the data on the live server (rather
···
overwrite the example files that come with the server, rather than being
appended to them as the other configuration files are.
'';
-
example = literalExample ''
-
dm_file = '''
-
admin:secret_password:localhost
-
jane:xyzzy:*
-
''';
-
ban_file = '''
-
# Bob is a jerk
-
bob@*
-
# So is everyone on 192.168.86.255/24
-
*@192.168.86.
-
''';
-
metaserver2 = '''
-
metaserver2_notification on
-
localhostname crossfire.example.net
-
''';
-
motd = "Welcome to CrossFire!";
-
news = "No news yet.";
-
rules = "Don't be a jerk.";
-
settings = '''
-
# be nicer to newbies and harsher to experienced players
-
balanced_stat_loss true
-
# don't let players pick up and use admin-created items
-
real_wiz false
-
''';
+
example = literalExpression ''
+
{
+
dm_file = '''
+
admin:secret_password:localhost
+
jane:xyzzy:*
+
''';
+
ban_file = '''
+
# Bob is a jerk
+
bob@*
+
# So is everyone on 192.168.86.255/24
+
*@192.168.86.
+
''';
+
metaserver2 = '''
+
metaserver2_notification on
+
localhostname crossfire.example.net
+
''';
+
motd = "Welcome to CrossFire!";
+
news = "No news yet.";
+
rules = "Don't be a jerk.";
+
settings = '''
+
# be nicer to newbies and harsher to experienced players
+
balanced_stat_loss true
+
# don't let players pick up and use admin-created items
+
real_wiz false
+
''';
+
}
'';
default = {};
};
+20 -18
nixos/modules/services/games/deliantra-server.nix
···
package = mkOption {
type = types.package;
default = pkgs.deliantra-server;
-
defaultText = "pkgs.deliantra-server";
+
defaultText = literalExpression "pkgs.deliantra-server";
description = ''
The package to use for the Deliantra server (and map/arch data, if you
don't change dataDir).
···
dataDir = mkOption {
type = types.str;
default = "${pkgs.deliantra-data}";
-
defaultText = "\${pkgs.deliantra-data}";
+
defaultText = literalExpression ''"''${pkgs.deliantra-data}"'';
description = ''
Where to store readonly data (maps, archetypes, sprites, etc).
Note that if you plan to use the live map editor (rather than editing
···
The example here is not comprehensive. See the files in
/etc/deliantra-server after enabling this module for full documentation.
'';
-
example = literalExample ''
-
dm_file = '''
-
admin:secret_password:localhost
-
jane:xyzzy:*
-
''';
-
motd = "Welcome to Deliantra!";
-
settings = '''
-
# Settings for game mechanics.
-
stat_loss_on_death true
-
armor_max_enchant 7
-
''';
-
config = '''
-
# Settings for the server daemon.
-
hiscore_url https://deliantra.example.net/scores/
-
max_map_reset 86400
-
''';
+
example = literalExpression ''
+
{
+
dm_file = '''
+
admin:secret_password:localhost
+
jane:xyzzy:*
+
''';
+
motd = "Welcome to Deliantra!";
+
settings = '''
+
# Settings for game mechanics.
+
stat_loss_on_death true
+
armor_max_enchant 7
+
''';
+
config = '''
+
# Settings for the server daemon.
+
hiscore_url https://deliantra.example.net/scores/
+
max_map_reset 86400
+
''';
+
}
'';
default = {
motd = "";
+3 -3
nixos/modules/services/games/factorio.nix
···
configFile = mkOption {
type = types.path;
default = configFile;
-
defaultText = "configFile";
+
defaultText = literalExpression "configFile";
description = ''
The server's configuration file.
···
package = mkOption {
type = types.package;
default = pkgs.factorio-headless;
-
defaultText = "pkgs.factorio-headless";
-
example = "pkgs.factorio-headless-experimental";
+
defaultText = literalExpression "pkgs.factorio-headless";
+
example = literalExpression "pkgs.factorio-headless-experimental";
description = ''
Factorio version to use. This defaults to the stable channel.
'';
+4 -4
nixos/modules/services/games/minecraft-server.nix
···
You can use <link xlink:href="https://mcuuid.net/"/> to get a
Minecraft UUID for a username.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
username1 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
username2 = "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy";
···
serverProperties = mkOption {
type = with types; attrsOf (oneOf [ bool int str ]);
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
server-port = 43000;
difficulty = 3;
···
package = mkOption {
type = types.package;
default = pkgs.minecraft-server;
-
defaultText = "pkgs.minecraft-server";
-
example = literalExample "pkgs.minecraft-server_1_12_2";
+
defaultText = literalExpression "pkgs.minecraft-server";
+
example = literalExpression "pkgs.minecraft-server_1_12_2";
description = "Version of minecraft-server to run.";
};
+1 -1
nixos/modules/services/hardware/acpid.nix
···
options = {
event = mkOption {
type = types.str;
-
example = [ "button/power.*" "button/lid.*" "ac_adapter.*" "button/mute.*" "button/volumedown.*" "cd/play.*" "cd/next.*" ];
+
example = literalExpression ''"button/power.*" "button/lid.*" "ac_adapter.*" "button/mute.*" "button/volumedown.*" "cd/play.*" "cd/next.*"'';
description = "Event type.";
};
+1 -1
nixos/modules/services/hardware/actkbd.nix
···
bindings = mkOption {
type = types.listOf (types.submodule bindingCfg);
default = [];
-
example = lib.literalExample ''
+
example = lib.literalExpression ''
[ { keys = [ 113 ]; events = [ "key" ]; command = "''${pkgs.alsa-utils}/bin/amixer -q set Master toggle"; }
]
'';
+3 -3
nixos/modules/services/hardware/bluetooth.nix
···
inherit (lib)
mkDefault mkEnableOption mkIf mkOption
mkRenamedOptionModule mkRemovedOptionModule
-
concatStringsSep escapeShellArgs
+
concatStringsSep escapeShellArgs literalExpression
optional optionals optionalAttrs recursiveUpdate types;
cfgFmt = pkgs.formats.ini { };
···
package = mkOption {
type = types.package;
default = pkgs.bluez;
-
defaultText = "pkgs.bluez";
-
example = "pkgs.bluezFull";
+
defaultText = literalExpression "pkgs.bluez";
+
example = literalExpression "pkgs.bluezFull";
description = ''
Which BlueZ package to use.
+1 -1
nixos/modules/services/hardware/freefall.nix
···
package = mkOption {
type = types.package;
default = pkgs.freefall;
-
defaultText = "pkgs.freefall";
+
defaultText = literalExpression "pkgs.freefall";
description = ''
freefall derivation to use.
'';
+2 -1
nixos/modules/services/hardware/fwupd.nix
···
extraTrustedKeys = mkOption {
type = types.listOf types.path;
default = [];
-
example = literalExample "[ /etc/nixos/fwupd/myfirmware.pem ]";
+
example = literalExpression "[ /etc/nixos/fwupd/myfirmware.pem ]";
description = ''
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.
'';
···
package = mkOption {
type = types.package;
default = pkgs.fwupd;
+
defaultText = literalExpression "pkgs.fwupd";
description = ''
Which fwupd package to use.
'';
+1
nixos/modules/services/hardware/interception-tools.nix
···
plugins = mkOption {
type = types.listOf types.package;
default = [ pkgs.interception-tools-plugins.caps2esc ];
+
defaultText = literalExpression "[ pkgs.interception-tools-plugins.caps2esc ]";
description = ''
A list of interception tools plugins that will be made available to use
inside the udevmon configuration.
+2 -2
nixos/modules/services/hardware/pcscd.nix
···
plugins = mkOption {
type = types.listOf types.package;
default = [ pkgs.ccid ];
-
defaultText = "[ pkgs.ccid ]";
-
example = literalExample "[ pkgs.pcsc-cyberjack ]";
+
defaultText = literalExpression "[ pkgs.ccid ]";
+
example = literalExpression "[ pkgs.pcsc-cyberjack ]";
description = "Plugin packages to be used for PCSC-Lite.";
};
+2 -1
nixos/modules/services/hardware/sane.nix
···
The example contains the package for HP scanners.
</para></note>
'';
-
example = literalExample "[ pkgs.hplipWithPlugin ]";
+
example = literalExpression "[ pkgs.hplipWithPlugin ]";
};
hardware.sane.disabledDefaultBackends = mkOption {
···
hardware.sane.drivers.scanSnap.package = mkOption {
type = types.package;
default = pkgs.sane-drivers.epjitsu;
+
defaultText = literalExpression "pkgs.sane-drivers.epjitsu";
description = ''
Epjitsu driver package to use. Useful if you want to extract the driver files yourself.
+4 -4
nixos/modules/services/hardware/sane_extra_backends/brscan4.nix
···
the name of attribute will be used.
'';
-
example = literalExample "office1";
+
example = "office1";
};
model = mkOption {
···
The model of the network device.
'';
-
example = literalExample "MFC-7860DW";
+
example = "MFC-7860DW";
};
ip = mkOption {
···
provide a nodename.
'';
-
example = literalExample "192.168.1.2";
+
example = "192.168.1.2";
};
nodename = mkOption {
···
provide an ip.
'';
-
example = literalExample "BRW0080927AFBCE";
+
example = "BRW0080927AFBCE";
};
};
+4 -4
nixos/modules/services/hardware/sane_extra_backends/brscan5.nix
···
the name of attribute will be used.
'';
-
example = literalExample "office1";
+
example = "office1";
};
model = mkOption {
···
The model of the network device.
'';
-
example = literalExample "ADS-1200";
+
example = "ADS-1200";
};
ip = mkOption {
···
provide a nodename.
'';
-
example = literalExample "192.168.1.2";
+
example = "192.168.1.2";
};
nodename = mkOption {
···
provide an ip.
'';
-
example = literalExample "BRW0080927AFBCE";
+
example = "BRW0080927AFBCE";
};
};
+1 -1
nixos/modules/services/hardware/thermald.nix
···
package = mkOption {
type = types.package;
default = pkgs.thermald;
-
defaultText = "pkgs.thermald";
+
defaultText = literalExpression "pkgs.thermald";
description = "Which thermald package to use.";
};
};
+1 -1
nixos/modules/services/hardware/triggerhappy.nix
···
bindings = mkOption {
type = types.listOf (types.submodule bindingCfg);
default = [];
-
example = lib.literalExample ''
+
example = lib.literalExpression ''
[ { keys = ["PLAYPAUSE"]; cmd = "''${pkgs.mpc_cli}/bin/mpc -q toggle"; } ]
'';
description = ''
+1 -1
nixos/modules/services/hardware/undervolt.nix
···
package = mkOption {
type = types.package;
default = pkgs.undervolt;
-
defaultText = "pkgs.undervolt";
+
defaultText = literalExpression "pkgs.undervolt";
description = ''
undervolt derivation to use.
'';
+1 -2
nixos/modules/services/hardware/upower.nix
···
package = mkOption {
type = types.package;
default = pkgs.upower;
-
defaultText = "pkgs.upower";
-
example = lib.literalExample "pkgs.upower";
+
defaultText = literalExpression "pkgs.upower";
description = ''
Which upower package to use.
'';
+2 -2
nixos/modules/services/hardware/vdr.nix
···
package = mkOption {
type = types.package;
default = pkgs.vdr;
-
defaultText = "pkgs.vdr";
-
example = literalExample "pkgs.wrapVdr.override { plugins = with pkgs.vdrPlugins; [ hello ]; }";
+
defaultText = literalExpression "pkgs.vdr";
+
example = literalExpression "pkgs.wrapVdr.override { plugins = with pkgs.vdrPlugins; [ hello ]; }";
description = "Package to use.";
};
+1
nixos/modules/services/logging/SystemdJournal2Gelf.nix
···
package = mkOption {
type = types.package;
default = pkgs.systemd-journal2gelf;
+
defaultText = literalExpression "pkgs.systemd-journal2gelf";
description = ''
SystemdJournal2Gelf package to use.
'';
+4 -4
nixos/modules/services/logging/awstats.nix
···
hostAliases = mkOption {
type = types.listOf types.str;
default = [];
-
example = "[ \"www.example.org\" ]";
+
example = [ "www.example.org" ];
description = ''
List of aliases the site has.
'';
···
extraConfig = mkOption {
type = types.attrsOf types.str;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"ValidHTTPCodes" = "404";
}
'';
-
description = "Extra configuration to be appendend to awstats.\${name}.conf.";
+
description = "Extra configuration to be appended to awstats.\${name}.conf.";
};
webService = {
···
configs = mkOption {
type = types.attrsOf (types.submodule configOpts);
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"mysite" = {
domain = "example.com";
+1 -1
nixos/modules/services/logging/fluentd.nix
···
package = mkOption {
type = types.path;
default = pkgs.fluentd;
-
defaultText = "pkgs.fluentd";
+
defaultText = literalExpression "pkgs.fluentd";
description = "The fluentd package to use.";
};
+2 -3
nixos/modules/services/logging/graylog.nix
···
package = mkOption {
type = types.package;
default = pkgs.graylog;
-
defaultText = "pkgs.graylog";
+
defaultText = literalExpression "pkgs.graylog";
description = "Graylog package to use.";
};
user = mkOption {
type = types.str;
default = "graylog";
-
example = literalExample "graylog";
description = "User account under which graylog runs";
};
···
elasticsearchHosts = mkOption {
type = types.listOf types.str;
-
example = literalExample ''[ "http://node1:9200" "http://user:password@node2:19200" ]'';
+
example = literalExpression ''[ "http://node1:9200" "http://user:password@node2:19200" ]'';
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";
};
+2 -2
nixos/modules/services/logging/journalbeat.nix
···
package = mkOption {
type = types.package;
default = pkgs.journalbeat;
-
defaultText = "pkgs.journalbeat";
-
example = literalExample "pkgs.journalbeat7";
+
defaultText = literalExpression "pkgs.journalbeat";
+
example = literalExpression "pkgs.journalbeat7";
description = ''
The journalbeat package to use
'';
+1 -1
nixos/modules/services/logging/logcheck.nix
···
extraRulesDirs = mkOption {
default = [];
-
example = "/etc/logcheck";
+
example = [ "/etc/logcheck" ];
type = types.listOf types.path;
description = ''
Directories with extra rules.
+1 -1
nixos/modules/services/logging/logrotate.nix
···
can be controlled by the <link linkend="opt-services.logrotate.paths._name_.priority">priority</link> option
using the same semantics as `lib.mkOrder`. Smaller values have a greater priority.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
httpd = {
path = "/var/log/httpd/*.log";
+10 -9
nixos/modules/services/logging/logstash.nix
···
package = mkOption {
type = types.package;
default = pkgs.logstash;
-
defaultText = "pkgs.logstash";
-
example = literalExample "pkgs.logstash";
+
defaultText = literalExpression "pkgs.logstash";
description = "Logstash package to use.";
};
plugins = mkOption {
type = types.listOf types.path;
default = [ ];
-
example = literalExample "[ pkgs.logstash-contrib ]";
+
example = literalExpression "[ pkgs.logstash-contrib ]";
description = "The paths to find other logstash plugins in.";
};
···
type = types.lines;
default = "generator { }";
description = "Logstash input configuration.";
-
example = ''
-
# Read from journal
-
pipe {
-
command => "''${pkgs.systemd}/bin/journalctl -f -o json"
-
type => "syslog" codec => json {}
-
}
+
example = literalExpression ''
+
'''
+
# Read from journal
+
pipe {
+
command => "''${pkgs.systemd}/bin/journalctl -f -o json"
+
type => "syslog" codec => json {}
+
}
+
'''
'';
};
+2 -2
nixos/modules/services/logging/syslog-ng.nix
···
package = mkOption {
type = types.package;
default = pkgs.syslogng;
-
defaultText = "pkgs.syslogng";
+
defaultText = literalExpression "pkgs.syslogng";
description = ''
The package providing syslog-ng binaries.
'';
···
extraModulePaths = mkOption {
type = types.listOf types.str;
default = [];
-
example = literalExample ''
+
example = literalExpression ''
[ "''${pkgs.syslogng_incubator}/lib/syslog-ng" ]
'';
description = ''
+1 -1
nixos/modules/services/mail/davmail.nix
···
and <link xlink:href="http://davmail.sourceforge.net/advanced.html"/>
for details on supported values.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
davmail.allowRemote = true;
davmail.imapPort = 55555;
+2 -2
nixos/modules/services/mail/dovecot.nix
···
modules = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "[ pkgs.dovecot_pigeonhole ]";
+
example = literalExpression "[ pkgs.dovecot_pigeonhole ]";
description = ''
Symlinks the contents of lib/dovecot of every given package into
/etc/dovecot/modules. This will make the given modules available
···
(list: listToAttrs (map (entry: { name = entry.name; value = removeAttrs entry ["name"]; }) list))
(attrsOf (submodule mailboxes));
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
Spam = { specialUse = "Junk"; auto = "create"; };
}
+2 -2
nixos/modules/services/mail/exim.nix
···
{ config, lib, pkgs, ... }:
let
-
inherit (lib) mkIf mkOption singleton types;
+
inherit (lib) literalExpression mkIf mkOption singleton types;
inherit (pkgs) coreutils;
cfg = config.services.exim;
in
···
package = mkOption {
type = types.package;
default = pkgs.exim;
-
defaultText = "pkgs.exim";
+
defaultText = literalExpression "pkgs.exim";
description = ''
The Exim derivation to use.
This can be used to enable features such as LDAP or PAM support.
+2 -2
nixos/modules/services/mail/mailman.nix
···
package = mkOption {
type = types.package;
default = pkgs.mailman;
-
defaultText = "pkgs.mailman";
-
example = literalExample "pkgs.mailman.override { archivers = []; }";
+
defaultText = literalExpression "pkgs.mailman";
+
example = literalExpression "pkgs.mailman.override { archivers = []; }";
description = "Mailman package to use";
};
+2 -2
nixos/modules/services/mail/offlineimap.nix
···
package = mkOption {
type = types.package;
default = pkgs.offlineimap;
-
defaultText = "pkgs.offlineimap";
+
defaultText = literalExpression "pkgs.offlineimap";
description = "Offlineimap derivation to use.";
};
path = mkOption {
type = types.listOf types.path;
default = [];
-
example = literalExample "[ pkgs.pass pkgs.bash pkgs.notmuch ]";
+
example = literalExpression "[ pkgs.pass pkgs.bash pkgs.notmuch ]";
description = "List of derivations to put in Offlineimap's path.";
};
+1 -1
nixos/modules/services/mail/opensmtpd.nix
···
package = mkOption {
type = types.package;
default = pkgs.opensmtpd;
-
defaultText = "pkgs.opensmtpd";
+
defaultText = literalExpression "pkgs.opensmtpd";
description = "The OpenSMTPD package to use.";
};
+1
nixos/modules/services/mail/postfix.nix
···
tlsTrustedAuthorities = mkOption {
type = types.str;
default = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
+
defaultText = literalExpression ''"''${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"'';
description = ''
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.
'';
+3 -2
nixos/modules/services/mail/roundcube.nix
···
package = mkOption {
type = types.package;
default = pkgs.roundcube;
+
defaultText = literalExpression "pkgs.roundcube";
-
example = literalExample ''
+
example = literalExpression ''
roundcube.withPlugins (plugins: [ plugins.persistent_login ])
'';
···
dicts = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "with pkgs.aspellDicts; [ en fr de ]";
+
example = literalExpression "with pkgs.aspellDicts; [ en fr de ]";
description = ''
List of aspell dictionnaries for spell checking. If empty, spell checking is disabled.
'';
+3 -7
nixos/modules/services/mail/rspamd.nix
···
description = ''
Local configuration files, written into <filename>/etc/rspamd/local.d/{name}</filename>.
'';
-
example = literalExample ''
+
example = literalExpression ''
{ "redis.conf".source = "/nix/store/.../etc/dir/redis.conf";
"arc.conf".text = "allow_envfrom_empty = true;";
}
···
description = ''
Overridden configuration files, written into <filename>/etc/rspamd/override.d/{name}</filename>.
'';
-
example = literalExample ''
+
example = literalExpression ''
{ "redis.conf".source = "/nix/store/.../etc/dir/redis.conf";
"arc.conf".text = "allow_envfrom_empty = true;";
}
···
normal = {};
controller = {};
};
-
example = literalExample ''
+
example = literalExpression ''
{
normal = {
includes = [ "$CONFDIR/worker-normal.inc" ];
···
Addon to postfix configuration
'';
default = {
-
smtpd_milters = ["unix:/run/rspamd/rspamd-milter.sock"];
-
non_smtpd_milters = ["unix:/run/rspamd/rspamd-milter.sock"];
-
};
-
example = {
smtpd_milters = ["unix:/run/rspamd/rspamd-milter.sock"];
non_smtpd_milters = ["unix:/run/rspamd/rspamd-milter.sock"];
};
+4 -4
nixos/modules/services/mail/sympa.nix
···
Email domains handled by this instance. There have
to be MX records for keys of this attribute set.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
"lists.example.org" = {
webHost = "lists.example.org";
···
name = mkOption {
type = str;
default = if cfg.database.type == "SQLite" then "${dataDir}/sympa.sqlite" else "sympa";
-
defaultText = ''if database.type == "SQLite" then "${dataDir}/sympa.sqlite" else "sympa"'';
+
defaultText = literalExpression ''if database.type == "SQLite" then "${dataDir}/sympa.sqlite" else "sympa"'';
description = ''
Database name. When using SQLite this must be an absolute
path to the database file.
···
settings = mkOption {
type = attrsOf (oneOf [ str int bool ]);
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
default_home = "lists";
viewlogs_page_size = 50;
···
config.source = mkIf (config.text != null) (mkDefault (pkgs.writeText "sympa-${baseNameOf name}" config.text));
}));
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"list_data/lists.example.org/help" = {
text = "subject This list provides help to users";
+3 -3
nixos/modules/services/misc/airsonic.nix
···
transcoders = mkOption {
type = types.listOf types.path;
default = [ "${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
-
defaultText= [ "\${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
+
defaultText = literalExpression ''[ "''${pkgs.ffmpeg.bin}/bin/ffmpeg" ]'';
description = ''
List of paths to transcoder executables that should be accessible
from Airsonic. Symlinks will be created to each executable inside
···
jre = mkOption {
type = types.package;
default = pkgs.jre8;
-
defaultText = literalExample "pkgs.jre8";
+
defaultText = literalExpression "pkgs.jre8";
description = ''
JRE package to use.
···
war = mkOption {
type = types.path;
default = "${pkgs.airsonic}/webapps/airsonic.war";
-
defaultText = "\${pkgs.airsonic}/webapps/airsonic.war";
+
defaultText = literalExpression ''"''${pkgs.airsonic}/webapps/airsonic.war"'';
description = "Airsonic war file to use.";
};
+1 -1
nixos/modules/services/misc/ankisyncd.nix
···
package = mkOption {
type = types.package;
default = pkgs.ankisyncd;
-
defaultText = literalExample "pkgs.ankisyncd";
+
defaultText = literalExpression "pkgs.ankisyncd";
description = "The package to use for the ankisyncd command.";
};
+2 -2
nixos/modules/services/misc/apache-kafka.nix
···
package = mkOption {
description = "The kafka package to use";
default = pkgs.apacheKafka;
-
defaultText = "pkgs.apacheKafka";
+
defaultText = literalExpression "pkgs.apacheKafka";
type = types.package;
};
jre = mkOption {
description = "The JRE with which to run Kafka";
default = cfg.package.passthru.jre;
-
defaultText = "pkgs.apacheKafka.passthru.jre";
+
defaultText = literalExpression "pkgs.apacheKafka.passthru.jre";
type = types.package;
};
+1 -1
nixos/modules/services/misc/autofs.nix
···
autoMaster = mkOption {
type = types.str;
-
example = literalExample ''
+
example = literalExpression ''
let
mapConf = pkgs.writeText "auto" '''
kernel -ro,soft,intr ftp.kernel.org:/pub/linux
+2 -2
nixos/modules/services/misc/bees.nix
···
description = ''
Extra command-line options passed to the daemon. See upstream bees documentation.
'';
-
example = literalExample ''
+
example = literalExpression ''
[ "--thread-count" "4" ]
'';
};
···
type = with types; attrsOf (submodule fsOptions);
description = "BTRFS filesystems to run block-level deduplication on.";
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
root = {
spec = "LABEL=root";
+1 -1
nixos/modules/services/misc/cgminer.nix
···
package = mkOption {
default = pkgs.cgminer;
-
defaultText = "pkgs.cgminer";
+
defaultText = literalExpression "pkgs.cgminer";
description = "Which cgminer derivation to use.";
type = types.package;
};
+1 -1
nixos/modules/services/misc/clipcat.nix
···
package = mkOption {
type = types.package;
default = pkgs.clipcat;
-
defaultText = "pkgs.clipcat";
+
defaultText = literalExpression "pkgs.clipcat";
description = "clipcat derivation to use.";
};
};
+1 -1
nixos/modules/services/misc/clipmenu.nix
···
package = mkOption {
type = types.package;
default = pkgs.clipmenu;
-
defaultText = "pkgs.clipmenu";
+
defaultText = literalExpression "pkgs.clipmenu";
description = "clipmenu derivation to use.";
};
};
+1 -1
nixos/modules/services/misc/confd.nix
···
package = mkOption {
description = "Confd package to use.";
default = pkgs.confd;
-
defaultText = "pkgs.confd";
+
defaultText = literalExpression "pkgs.confd";
type = types.package;
};
};
+2 -2
nixos/modules/services/misc/dictd.nix
···
DBs = mkOption {
type = types.listOf types.package;
default = with pkgs.dictdDBs; [ wiktionary wordnet ];
-
defaultText = "with pkgs.dictdDBs; [ wiktionary wordnet ]";
-
example = literalExample "[ pkgs.dictdDBs.nld2eng ]";
+
defaultText = literalExpression "with pkgs.dictdDBs; [ wiktionary wordnet ]";
+
example = literalExpression "[ pkgs.dictdDBs.nld2eng ]";
description = "List of databases to make available.";
};
+1 -2
nixos/modules/services/misc/disnix.nix
···
type = types.path;
description = "The Disnix package";
default = pkgs.disnix;
-
defaultText = "pkgs.disnix";
+
defaultText = literalExpression "pkgs.disnix";
};
enableProfilePath = mkEnableOption "exposing the Disnix profiles in the system's PATH";
···
profiles = mkOption {
type = types.listOf types.str;
default = [ "default" ];
-
example = [ "default" ];
description = "Names of the Disnix profiles to expose in the system's PATH";
};
};
+2 -2
nixos/modules/services/misc/dwm-status.nix
···
package = mkOption {
type = types.package;
default = pkgs.dwm-status;
-
defaultText = "pkgs.dwm-status";
-
example = "pkgs.dwm-status.override { enableAlsaUtils = false; }";
+
defaultText = literalExpression "pkgs.dwm-status";
+
example = literalExpression "pkgs.dwm-status.override { enableAlsaUtils = false; }";
description = ''
Which dwm-status package to use.
'';
+1 -1
nixos/modules/services/misc/etcd.nix
···
'';
type = types.attrsOf types.str;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"CORS" = "*";
"NAME" = "default-name";
+3 -3
nixos/modules/services/misc/etebase-server.nix
···
static_root = mkOption {
type = types.str;
default = "${cfg.dataDir}/static";
-
defaultText = "\${config.services.etebase-server.dataDir}/static";
+
defaultText = literalExpression ''"''${config.services.etebase-server.dataDir}/static"'';
description = "The directory for static files.";
};
media_root = mkOption {
type = types.str;
default = "${cfg.dataDir}/media";
-
defaultText = "\${config.services.etebase-server.dataDir}/media";
+
defaultText = literalExpression ''"''${config.services.etebase-server.dataDir}/media"'';
description = "The media directory.";
};
};
···
name = mkOption {
type = types.str;
default = "${cfg.dataDir}/db.sqlite3";
-
defaultText = "\${config.services.etebase-server.dataDir}/db.sqlite3";
+
defaultText = literalExpression ''"''${config.services.etebase-server.dataDir}/db.sqlite3"'';
description = "The database name.";
};
};
+1 -1
nixos/modules/services/misc/felix.nix
···
bundles = mkOption {
type = types.listOf types.package;
default = [ pkgs.felix_remoteshell ];
-
defaultText = "[ pkgs.felix_remoteshell ]";
+
defaultText = literalExpression "[ pkgs.felix_remoteshell ]";
description = "List of bundles that should be activated on startup";
};
+4 -5
nixos/modules/services/misc/freeswitch.nix
···
configTemplate = mkOption {
type = types.path;
default = "${config.services.freeswitch.package}/share/freeswitch/conf/vanilla";
-
defaultText = literalExample "\${config.services.freeswitch.package}/share/freeswitch/conf/vanilla";
-
example = literalExample "\${config.services.freeswitch.package}/share/freeswitch/conf/minimal";
+
defaultText = literalExpression ''"''${config.services.freeswitch.package}/share/freeswitch/conf/vanilla"'';
+
example = literalExpression ''"''${config.services.freeswitch.package}/share/freeswitch/conf/minimal"'';
description = ''
Configuration template to use.
See available templates in <link xlink:href="https://github.com/signalwire/freeswitch/tree/master/conf">FreeSWITCH repository</link>.
···
configDir = mkOption {
type = with types; attrsOf path;
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
"freeswitch.xml" = ./freeswitch.xml;
"dialplan/default.xml" = pkgs.writeText "dialplan-default.xml" '''
···
package = mkOption {
type = types.package;
default = pkgs.freeswitch;
-
defaultText = literalExample "pkgs.freeswitch";
-
example = literalExample "pkgs.freeswitch";
+
defaultText = literalExpression "pkgs.freeswitch";
description = ''
FreeSWITCH package.
'';
+6 -5
nixos/modules/services/misc/gitea.nix
···
package = mkOption {
default = pkgs.gitea;
type = types.package;
-
defaultText = "pkgs.gitea";
+
defaultText = literalExpression "pkgs.gitea";
description = "gitea derivation to use";
};
···
socket = mkOption {
type = types.nullOr types.path;
default = if (cfg.database.createDatabase && usePostgresql) then "/run/postgresql" else if (cfg.database.createDatabase && useMysql) then "/run/mysqld/mysqld.sock" else null;
-
defaultText = "null";
+
defaultText = literalExpression "null";
example = "/run/mysqld/mysqld.sock";
description = "Path to the unix socket file to use for authentication.";
};
···
};
staticRootPath = mkOption {
-
type = types.str;
-
default = "${gitea.data}";
+
type = types.either types.str types.path;
+
default = gitea.data;
+
defaultText = literalExpression "package.data";
example = "/var/lib/gitea/data";
description = "Upper level of template and static files path.";
};
···
Gitea configuration. Refer to <link xlink:href="https://docs.gitea.io/en-us/config-cheat-sheet/"/>
for details on supported values.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
"cron.sync_external_users" = {
RUN_AT_START = true;
+26 -26
nixos/modules/services/misc/gitit.nix
···
haskellPackages = mkOption {
default = pkgs.haskellPackages;
-
defaultText = "pkgs.haskellPackages";
-
example = literalExample "pkgs.haskell.packages.ghc784";
+
defaultText = literalExpression "pkgs.haskellPackages";
+
example = literalExpression "pkgs.haskell.packages.ghc784";
description = "haskellPackages used to build gitit and plugins.";
};
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = self: [];
-
example = literalExample ''
+
example = literalExpression ''
haskellPackages: [
haskellPackages.wreq
]
···
wantedBy = [ "multi-user.target" ];
path = with pkgs; [ curl ]
++ optional cfg.pdfExport texlive.combined.scheme-basic
-
++ optional (cfg.repositoryType == "darcs") darcs
-
++ optional (cfg.repositoryType == "mercurial") mercurial
-
++ optional (cfg.repositoryType == "git") git;
+
++ optional (cfg.repositoryType == "darcs") darcs
+
++ optional (cfg.repositoryType == "mercurial") mercurial
+
++ optional (cfg.repositoryType == "git") git;
preStart = let
gm = "gitit@${config.networking.hostName}";
···
fi
done
cd ${repositoryPath}
-
${
-
if repositoryType == "darcs" then
-
''
-
if [ ! -d _darcs ]
-
then
-
${pkgs.darcs}/bin/darcs initialize
-
echo "${gm}" > _darcs/prefs/email
-
''
-
else if repositoryType == "mercurial" then
-
''
-
if [ ! -d .hg ]
-
then
-
${pkgs.mercurial}/bin/hg init
-
cat >> .hg/hgrc <<NAMED
+
${
+
if repositoryType == "darcs" then
+
''
+
if [ ! -d _darcs ]
+
then
+
${pkgs.darcs}/bin/darcs initialize
+
echo "${gm}" > _darcs/prefs/email
+
''
+
else if repositoryType == "mercurial" then
+
''
+
if [ ! -d .hg ]
+
then
+
${pkgs.mercurial}/bin/hg init
+
cat >> .hg/hgrc <<NAMED
[ui]
username = gitit ${gm}
NAMED
-
''
-
else
-
''
-
if [ ! -d .git ]
+
''
+
else
+
''
+
if [ ! -d .git ]
then
${pkgs.git}/bin/git init
${pkgs.git}/bin/git config user.email "${gm}"
${pkgs.git}/bin/git config user.name "gitit"
-
''}
+
''}
chown ${uid}:${gid} -R ${repositoryPath}
fi
-
cd -
+
cd -
'';
serviceConfig = {
+8 -10
nixos/modules/services/misc/gitlab.nix
···
packages.gitlab = mkOption {
type = types.package;
default = pkgs.gitlab;
-
defaultText = "pkgs.gitlab";
+
defaultText = literalExpression "pkgs.gitlab";
description = "Reference to the gitlab package";
-
example = "pkgs.gitlab-ee";
+
example = literalExpression "pkgs.gitlab-ee";
};
packages.gitlab-shell = mkOption {
type = types.package;
default = pkgs.gitlab-shell;
-
defaultText = "pkgs.gitlab-shell";
+
defaultText = literalExpression "pkgs.gitlab-shell";
description = "Reference to the gitlab-shell package";
};
packages.gitlab-workhorse = mkOption {
type = types.package;
default = pkgs.gitlab-workhorse;
-
defaultText = "pkgs.gitlab-workhorse";
+
defaultText = literalExpression "pkgs.gitlab-workhorse";
description = "Reference to the gitlab-workhorse package";
};
packages.gitaly = mkOption {
type = types.package;
default = pkgs.gitaly;
-
defaultText = "pkgs.gitaly";
+
defaultText = literalExpression "pkgs.gitaly";
description = "Reference to the gitaly package";
};
packages.pages = mkOption {
type = types.package;
default = pkgs.gitlab-pages;
-
defaultText = "pkgs.gitlab-pages";
+
defaultText = literalExpression "pkgs.gitlab-pages";
description = "Reference to the gitlab-pages package";
};
···
backup.uploadOptions = mkOption {
type = types.attrs;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
# Fog storage connection settings, see http://fog.io/storage/
connection = {
···
};
certFile = mkOption {
type = types.path;
-
default = null;
description = "Path to GitLab container registry certificate.";
};
keyFile = mkOption {
type = types.path;
-
default = null;
description = "Path to GitLab container registry certificate-key.";
};
defaultForProjects = mkOption {
···
extraConfig = mkOption {
type = types.attrs;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
gitlab = {
default_projects_features = {
+7 -5
nixos/modules/services/misc/gitolite.nix
···
extraGitoliteRc = mkOption {
type = types.lines;
default = "";
-
example = literalExample ''
-
$RC{UMASK} = 0027;
-
$RC{SITE_INFO} = 'This is our private repository host';
-
push( @{$RC{ENABLE}}, 'Kindergarten' ); # enable the command/feature
-
@{$RC{ENABLE}} = grep { $_ ne 'desc' } @{$RC{ENABLE}}; # disable the command/feature
+
example = literalExpression ''
+
'''
+
$RC{UMASK} = 0027;
+
$RC{SITE_INFO} = 'This is our private repository host';
+
push( @{$RC{ENABLE}}, 'Kindergarten' ); # enable the command/feature
+
@{$RC{ENABLE}} = grep { $_ ne 'desc' } @{$RC{ENABLE}}; # disable the command/feature
+
'''
'';
description = ''
Extra configuration to append to the default <literal>~/.gitolite.rc</literal>.
+1 -1
nixos/modules/services/misc/greenclip.nix
···
package = mkOption {
type = types.package;
default = pkgs.haskellPackages.greenclip;
-
defaultText = "pkgs.haskellPackages.greenclip";
+
defaultText = literalExpression "pkgs.haskellPackages.greenclip";
description = "greenclip derivation to use.";
};
};
+4 -4
nixos/modules/services/misc/home-assistant.nix
···
emptyValue.value = {};
};
in valueType;
-
example = literalExample ''
+
example = literalExpression ''
{
homeassistant = {
name = "Home";
···
default = null;
type = with types; nullOr attrs;
# from https://www.home-assistant.io/lovelace/yaml-mode/
-
example = literalExample ''
+
example = literalExpression ''
{
title = "My Awesome Home";
views = [ {
···
default = pkgs.home-assistant.overrideAttrs (oldAttrs: {
doInstallCheck = false;
});
-
defaultText = literalExample ''
+
defaultText = literalExpression ''
pkgs.home-assistant.overrideAttrs (oldAttrs: {
doInstallCheck = false;
})
'';
type = types.package;
-
example = literalExample ''
+
example = literalExpression ''
pkgs.home-assistant.override {
extraPackages = ps: with ps; [ colorlog ];
}
+4 -3
nixos/modules/services/misc/ihaskell.nix
···
cfg = config.services.ihaskell;
ihaskell = pkgs.ihaskell.override {
-
packages = self: cfg.extraPackages self;
+
packages = cfg.extraPackages;
};
in
···
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
-
default = self: [];
-
example = literalExample ''
+
default = haskellPackages: [];
+
defaultText = literalExpression "haskellPackages: []";
+
example = literalExpression ''
haskellPackages: [
haskellPackages.wreq
haskellPackages.lens
+1 -1
nixos/modules/services/misc/jackett.nix
···
package = mkOption {
type = types.package;
default = pkgs.jackett;
-
defaultText = "pkgs.jackett";
+
defaultText = literalExpression "pkgs.jackett";
description = "Jackett package to use.";
};
};
+1 -1
nixos/modules/services/misc/jellyfin.nix
···
package = mkOption {
type = types.package;
default = pkgs.jellyfin;
-
example = literalExample "pkgs.jellyfin";
+
defaultText = literalExpression "pkgs.jellyfin";
description = ''
Jellyfin package to use.
'';
+1
nixos/modules/services/misc/klipper.nix
···
package = mkOption {
type = types.package;
default = pkgs.klipper;
+
defaultText = literalExpression "pkgs.klipper";
description = "The Klipper package.";
};
+1 -1
nixos/modules/services/misc/lidarr.nix
···
package = mkOption {
type = types.package;
default = pkgs.lidarr;
-
defaultText = "pkgs.lidarr";
+
defaultText = literalExpression "pkgs.lidarr";
description = "The Lidarr package to use";
};
+1 -1
nixos/modules/services/misc/matrix-appservice-discord.nix
···
botToken = "";
};
};
-
example = literalExample ''
+
example = literalExpression ''
{
bridge = {
domain = "public-domain.tld";
+2 -2
nixos/modules/services/misc/matrix-synapse.nix
···
package = mkOption {
type = types.package;
default = pkgs.matrix-synapse;
-
defaultText = "pkgs.matrix-synapse";
+
defaultText = literalExpression "pkgs.matrix-synapse";
description = ''
Overridable attribute of the matrix synapse server package to use.
'';
···
plugins = mkOption {
type = types.listOf types.package;
default = [ ];
-
example = literalExample ''
+
example = literalExpression ''
with config.services.matrix-synapse.package.plugins; [
matrix-synapse-ldap3
matrix-synapse-pam
+1 -1
nixos/modules/services/misc/mautrix-telegram.nix
···
};
};
};
-
example = literalExample ''
+
example = literalExpression ''
{
homeserver = {
address = "http://localhost:8008";
+1 -1
nixos/modules/services/misc/mbpfan.nix
···
package = mkOption {
type = types.package;
default = pkgs.mbpfan;
-
defaultText = "pkgs.mbpfan";
+
defaultText = literalExpression "pkgs.mbpfan";
description = ''
The package used for the mbpfan daemon.
'';
+4 -3
nixos/modules/services/misc/mediatomb.nix
···
package = mkOption {
type = types.package;
-
example = literalExample "pkgs.mediatomb";
+
example = literalExpression "pkgs.mediatomb";
default = pkgs.gerbera;
+
defaultText = literalExpression "pkgs.gerbera";
description = ''
-
Underlying package to be used with the module (default: pkgs.gerbera).
+
Underlying package to be used with the module.
'';
};
···
mediaDirectories = mkOption {
type = with types; listOf (submodule mediaDirectory);
-
default = {};
+
default = [];
description = ''
Declare media directories to index.
'';
+1 -1
nixos/modules/services/misc/mx-puppet-discord.nix
···
lineDateFormat = "MMM-D HH:mm:ss.SSS";
};
};
-
example = literalExample ''
+
example = literalExpression ''
{
bridge = {
bindAddress = "localhost";
+1 -1
nixos/modules/services/misc/nitter.nix
···
staticDir = mkOption {
type = types.path;
default = "${pkgs.nitter}/share/nitter/public";
-
defaultText = "\${pkgs.nitter}/share/nitter/public";
+
defaultText = literalExpression ''"''${pkgs.nitter}/share/nitter/public"'';
description = "Path to the static files directory.";
};
+2 -2
nixos/modules/services/misc/nix-daemon.nix
···
package = mkOption {
type = types.package;
default = pkgs.nix;
-
defaultText = "pkgs.nix";
+
defaultText = literalExpression "pkgs.nix";
description = ''
This option specifies the Nix package instance to use throughout the system.
'';
···
flake = mkOption {
type = types.nullOr types.attrs;
default = null;
-
example = literalExample "nixpkgs";
+
example = literalExpression "nixpkgs";
description = ''
The flake input to which <option>from></option> is to be rewritten.
'';
+1 -1
nixos/modules/services/misc/nzbhydra2.nix
···
package = mkOption {
type = types.package;
default = pkgs.nzbhydra2;
-
defaultText = "pkgs.nzbhydra2";
+
defaultText = literalExpression "pkgs.nzbhydra2";
description = "NZBHydra2 package to use.";
};
};
+2 -2
nixos/modules/services/misc/octoprint.nix
···
plugins = mkOption {
type = types.functionTo (types.listOf types.package);
default = plugins: [];
-
defaultText = "plugins: []";
-
example = literalExample "plugins: with plugins; [ themeify stlviewer ]";
+
defaultText = literalExpression "plugins: []";
+
example = literalExpression "plugins: with plugins; [ themeify stlviewer ]";
description = "Additional plugins to be used. Available plugins are passed through the plugins input.";
};
+4 -4
nixos/modules/services/misc/paperless-ng.nix
···
mediaDir = mkOption {
type = types.str;
default = "${cfg.dataDir}/media";
-
defaultText = "\${dataDir}/consume";
+
defaultText = literalExpression ''"''${dataDir}/media"'';
description = "Directory to store the Paperless documents.";
};
consumptionDir = mkOption {
type = types.str;
default = "${cfg.dataDir}/consume";
-
defaultText = "\${dataDir}/consume";
+
defaultText = literalExpression ''"''${dataDir}/consume"'';
description = "Directory from which new documents are imported.";
};
···
See <link xlink:href="https://paperless-ng.readthedocs.io/en/latest/configuration.html">the documentation</link>
for available options.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
PAPERLESS_OCR_LANGUAGE = "deu+eng";
}
···
package = mkOption {
type = types.package;
default = pkgs.paperless-ng;
-
defaultText = "pkgs.paperless-ng";
+
defaultText = literalExpression "pkgs.paperless-ng";
description = "The Paperless package to use.";
};
};
+1 -1
nixos/modules/services/misc/plex.nix
···
package = mkOption {
type = types.package;
default = pkgs.plex;
-
defaultText = "pkgs.plex";
+
defaultText = literalExpression "pkgs.plex";
description = ''
The Plex package to use. Plex subscribers may wish to use their own
package here, pointing to subscriber-only server versions.
+9 -8
nixos/modules/services/misc/redmine.nix
···
let
inherit (lib) mkBefore mkDefault mkEnableOption mkIf mkOption mkRemovedOptionModule types;
-
inherit (lib) concatStringsSep literalExample mapAttrsToList;
+
inherit (lib) concatStringsSep literalExpression mapAttrsToList;
inherit (lib) optional optionalAttrs optionalString;
cfg = config.services.redmine;
···
package = mkOption {
type = types.package;
default = pkgs.redmine;
+
defaultText = literalExpression "pkgs.redmine";
description = "Which Redmine package to use.";
-
example = "pkgs.redmine.override { ruby = pkgs.ruby_2_7; }";
+
example = literalExpression "pkgs.redmine.override { ruby = pkgs.ruby_2_7; }";
};
user = mkOption {
···
<link xlink:href="https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration"/>
for details.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
email_delivery = {
delivery_method = "smtp";
···
See <link xlink:href="https://svn.redmine.org/redmine/trunk/config/additional_environment.rb.example"/>
for details.
'';
-
example = literalExample ''
+
example = ''
config.logger.level = Logger::DEBUG
'';
};
···
type = types.attrsOf types.path;
default = {};
description = "Set of themes.";
-
example = literalExample ''
+
example = literalExpression ''
{
dkuk-redmine_alex_skin = builtins.fetchurl {
url = "https://bitbucket.org/dkuk/redmine_alex_skin/get/1842ef675ef3.zip";
···
type = types.attrsOf types.path;
default = {};
description = "Set of plugins.";
-
example = literalExample ''
+
example = literalExpression ''
{
redmine_env_auth = builtins.fetchurl {
url = "https://github.com/Intera/redmine_env_auth/archive/0.6.zip";
···
port = mkOption {
type = types.int;
default = if cfg.database.type == "postgresql" then 5432 else 3306;
-
defaultText = "3306";
+
defaultText = literalExpression "3306";
description = "Database host port.";
};
···
if mysqlLocal then "/run/mysqld/mysqld.sock"
else if pgsqlLocal then "/run/postgresql"
else null;
-
defaultText = "/run/mysqld/mysqld.sock";
+
defaultText = literalExpression "/run/mysqld/mysqld.sock";
example = "/run/mysqld/mysqld.sock";
description = "Path to the unix socket file to use for authentication.";
};
+1 -1
nixos/modules/services/misc/rippled.nix
···
description = "Which rippled package to use.";
type = types.package;
default = pkgs.rippled;
-
defaultText = "pkgs.rippled";
+
defaultText = literalExpression "pkgs.rippled";
};
ports = mkOption {
+2 -1
nixos/modules/services/misc/sickbeard.nix
···
package = mkOption {
type = types.package;
default = pkgs.sickbeard;
-
example = literalExample "pkgs.sickrage";
+
defaultText = literalExpression "pkgs.sickbeard";
+
example = literalExpression "pkgs.sickrage";
description =''
Enable <literal>pkgs.sickrage</literal> or <literal>pkgs.sickgear</literal>
as an alternative to SickBeard
+12 -10
nixos/modules/services/misc/snapper.nix
···
configs = mkOption {
default = { };
-
example = literalExample {
-
home = {
-
subvolume = "/home";
-
extraConfig = ''
-
ALLOW_USERS="alice"
-
TIMELINE_CREATE=yes
-
TIMELINE_CLEANUP=yes
-
'';
-
};
-
};
+
example = literalExpression ''
+
{
+
home = {
+
subvolume = "/home";
+
extraConfig = '''
+
ALLOW_USERS="alice"
+
TIMELINE_CREATE=yes
+
TIMELINE_CLEANUP=yes
+
''';
+
};
+
}
+
'';
description = ''
Subvolume configuration
+1 -1
nixos/modules/services/misc/sourcehut/builds.nix
···
images = mkOption {
type = types.attrsOf (types.attrsOf (types.attrsOf types.package));
default = { };
-
example = lib.literalExample ''(let
+
example = lib.literalExpression ''(let
# Pinning unstable to allow usage with flakes and limit rebuilds.
pkgs_unstable = builtins.fetchGit {
url = "https://github.com/NixOS/nixpkgs";
+2 -1
nixos/modules/services/misc/sourcehut/git.nix
···
package = mkOption {
type = types.package;
default = pkgs.git;
-
example = literalExample "pkgs.gitFull";
+
defaultText = literalExpression "pkgs.git";
+
example = literalExpression "pkgs.gitFull";
description = ''
Git package for git.sr.ht. This can help silence collisions.
'';
+1 -1
nixos/modules/services/misc/ssm-agent.nix
···
type = types.path;
description = "The SSM agent package to use";
default = pkgs.ssm-agent.override { overrideEtc = false; };
-
defaultText = "pkgs.ssm-agent.override { overrideEtc = false; }";
+
defaultText = literalExpression "pkgs.ssm-agent.override { overrideEtc = false; }";
};
};
+1
nixos/modules/services/misc/subsonic.nix
···
transcoders = mkOption {
type = types.listOf types.path;
default = [ "${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
+
defaultText = literalExpression ''[ "''${pkgs.ffmpeg.bin}/bin/ffmpeg" ]'';
description = ''
List of paths to transcoder executables that should be accessible
from Subsonic. Symlinks will be created to each executable inside
+1 -1
nixos/modules/services/misc/tautulli.nix
···
package = mkOption {
type = types.package;
default = pkgs.tautulli;
-
defaultText = "pkgs.tautulli";
+
defaultText = literalExpression "pkgs.tautulli";
description = ''
The Tautulli package to use.
'';
+1 -1
nixos/modules/services/misc/tp-auto-kbbl.nix
···
package = mkOption {
type = types.package;
default = pkgs.tp-auto-kbbl;
-
defaultText = literalExample "pkgs.tp-auto-kbbl";
+
defaultText = literalExpression "pkgs.tp-auto-kbbl";
description = "Package providing <command>tp-auto-kbbl</command>.";
};
+1 -1
nixos/modules/services/misc/uhub.nix
···
options = {
plugin = mkOption {
type = path;
-
example = literalExample
+
example = literalExpression
"$${pkgs.uhub}/plugins/mod_auth_sqlite.so";
description = "Path to plugin file.";
};
+3 -4
nixos/modules/services/misc/weechat.nix
···
};
binary = mkOption {
type = types.path;
-
description = "Binary to execute (by default \${weechat}/bin/weechat).";
-
example = literalExample ''
-
''${pkgs.weechat}/bin/weechat-headless
-
'';
+
description = "Binary to execute.";
default = "${pkgs.weechat}/bin/weechat";
+
defaultText = literalExpression ''"''${pkgs.weechat}/bin/weechat"'';
+
example = literalExpression ''"''${pkgs.weechat}/bin/weechat-headless"'';
};
};
+1 -1
nixos/modules/services/misc/xmr-stak.nix
···
configFiles = mkOption {
type = types.attrsOf types.str;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"config.txt" = '''
"verbose_level" : 4,
+2 -2
nixos/modules/services/misc/zigbee2mqtt.nix
···
default = pkgs.zigbee2mqtt.override {
dataDir = cfg.dataDir;
};
-
defaultText = literalExample ''
+
defaultText = literalExpression ''
pkgs.zigbee2mqtt {
dataDir = services.zigbee2mqtt.dataDir
}
···
settings = mkOption {
type = format.type;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
homeassistant = config.services.home-assistant.enable;
permit_join = true;
+1 -1
nixos/modules/services/misc/zookeeper.nix
···
package = mkOption {
description = "The zookeeper package to use";
default = pkgs.zookeeper;
-
defaultText = "pkgs.zookeeper";
+
defaultText = literalExpression "pkgs.zookeeper";
type = types.package;
};
-4
nixos/modules/services/monitoring/alerta.nix
···
bind = mkOption {
type = types.str;
default = "0.0.0.0";
-
example = literalExample "0.0.0.0";
description = "Address to bind to. The default is to bind to all addresses";
};
···
type = types.str;
description = "URL of the MongoDB or PostgreSQL database to connect to";
default = "mongodb://localhost";
-
example = "mongodb://localhost";
};
databaseName = mkOption {
type = types.str;
description = "Name of the database instance to connect to";
default = "monitoring";
-
example = "monitoring";
};
corsOrigins = mkOption {
type = types.listOf types.str;
description = "List of URLs that can access the API for Cross-Origin Resource Sharing (CORS)";
example = [ "http://localhost" "http://localhost:5000" ];
-
default = [ "http://localhost" "http://localhost:5000" ];
};
authenticationRequired = mkOption {
+1 -2
nixos/modules/services/monitoring/arbtt.nix
···
package = mkOption {
type = types.package;
default = pkgs.haskellPackages.arbtt;
-
defaultText = "pkgs.haskellPackages.arbtt";
-
example = literalExample "pkgs.haskellPackages.arbtt";
+
defaultText = literalExpression "pkgs.haskellPackages.arbtt";
description = ''
The package to use for the arbtt binaries.
'';
+1 -2
nixos/modules/services/monitoring/bosun.nix
···
package = mkOption {
type = types.package;
default = pkgs.bosun;
-
defaultText = "pkgs.bosun";
-
example = literalExample "pkgs.bosun";
+
defaultText = literalExpression "pkgs.bosun";
description = ''
bosun binary to use.
'';
+1 -1
nixos/modules/services/monitoring/collectd.nix
···
package = mkOption {
default = pkgs.collectd;
-
defaultText = "pkgs.collectd";
+
defaultText = literalExpression "pkgs.collectd";
description = ''
Which collectd package to use.
'';
+6 -4
nixos/modules/services/monitoring/datadog-agent.nix
···
package = mkOption {
default = pkgs.datadog-agent;
-
defaultText = "pkgs.datadog-agent";
+
defaultText = literalExpression "pkgs.datadog-agent";
description = ''
Which DataDog v7 agent package to use. Note that the provided
package is expected to have an overridable `pythonPackages`-attribute
···
package set must be provided.
'';
-
example = {
-
ntp = (pythonPackages: [ pythonPackages.ntplib ]);
-
};
+
example = literalExpression ''
+
{
+
ntp = pythonPackages: [ pythonPackages.ntplib ];
+
}
+
'';
};
extraConfig = mkOption {
+3 -2
nixos/modules/services/monitoring/grafana-reporter.nix
···
templateDir = mkOption {
description = "Optional template directory to use custom tex templates";
-
default = "${pkgs.grafana_reporter}";
-
type = types.str;
+
default = pkgs.grafana_reporter;
+
defaultText = literalExpression "pkgs.grafana_reporter";
+
type = types.either types.str types.path;
};
};
+3 -2
nixos/modules/services/monitoring/grafana.nix
···
staticRootPath = mkOption {
description = "Root path for static assets.";
default = "${cfg.package}/share/grafana/public";
+
defaultText = literalExpression ''"''${package}/share/grafana/public"'';
type = types.str;
};
package = mkOption {
description = "Package to use.";
default = pkgs.grafana;
-
defaultText = "pkgs.grafana";
+
defaultText = literalExpression "pkgs.grafana";
type = types.package;
};
···
type = with types; nullOr (listOf path);
default = null;
description = "If non-null, then a list of packages containing Grafana plugins to install. If set, plugins cannot be manually installed.";
-
example = literalExample "with pkgs.grafanaPlugins; [ grafana-piechart-panel ]";
+
example = literalExpression "with pkgs.grafanaPlugins; [ grafana-piechart-panel ]";
# Make sure each plugin is added only once; otherwise building
# the link farm fails, since the same path is added multiple
# times.
+3 -3
nixos/modules/services/monitoring/graphite.nix
···
finders = mkOption {
description = "List of finder plugins to load.";
default = [];
-
example = literalExample "[ pkgs.python3Packages.influxgraph ]";
+
example = literalExpression "[ pkgs.python3Packages.influxgraph ]";
type = types.listOf types.package;
};
···
package = mkOption {
description = "Package to use for graphite api.";
default = pkgs.python3Packages.graphite_api;
-
defaultText = "pkgs.python3Packages.graphite_api";
+
defaultText = literalExpression "pkgs.python3Packages.graphite_api";
type = types.package;
};
···
<link xlink:href='https://github.com/scobal/seyren#config' />
'';
type = types.attrsOf types.str;
-
example = literalExample ''
+
example = literalExpression ''
{
GRAPHITE_USERNAME = "user";
GRAPHITE_PASSWORD = "pass";
+1 -1
nixos/modules/services/monitoring/heapster.nix
···
package = mkOption {
description = "Package to use by heapster";
default = pkgs.heapster;
-
defaultText = "pkgs.heapster";
+
defaultText = literalExpression "pkgs.heapster";
type = types.package;
};
};
+1 -1
nixos/modules/services/monitoring/incron.nix
···
extraPackages = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "[ pkgs.rsync ]";
+
example = literalExpression "[ pkgs.rsync ]";
description = "Extra packages available to the system incrontab.";
};
+1 -4
nixos/modules/services/monitoring/kapacitor.nix
···
dataDir = mkOption {
type = types.path;
example = "/var/lib/kapacitor";
-
default = "/var/lib/kapacitor";
description = "Location where Kapacitor stores its state";
};
···
bind = mkOption {
type = types.str;
default = "";
-
example = literalExample "0.0.0.0";
+
example = "0.0.0.0";
description = "Address to bind to. The default is to bind to all addresses";
};
···
type = types.str;
description = "Specifies how often to snapshot the task state (in InfluxDB time units)";
default = "1m0s";
-
example = "1m0s";
};
loadDirectory = mkOption {
···
url = mkOption {
description = "The URL to the Alerta REST API";
default = "http://localhost:5000";
-
example = "http://localhost:5000";
type = types.str;
};
+2 -2
nixos/modules/services/monitoring/loki.nix
···
{ config, lib, pkgs, ... }:
let
-
inherit (lib) escapeShellArgs literalExample mkEnableOption mkIf mkOption types;
+
inherit (lib) escapeShellArgs mkEnableOption mkIf mkOption types;
cfg = config.services.loki;
···
extraFlags = mkOption {
type = types.listOf types.str;
default = [];
-
example = literalExample [ "--server.http-listen-port=3101" ];
+
example = [ "--server.http-listen-port=3101" ];
description = ''
Specify a list of additional command line flags,
which get escaped and are then passed to Loki.
-1
nixos/modules/services/monitoring/mackerel-agent.nix
···
apiKeyFile = mkOption {
type = types.path;
-
default = "";
example = "/run/keys/mackerel-api-key";
description = ''
Path to file containing the Mackerel API key. The file should contain a
+3 -4
nixos/modules/services/monitoring/metricbeat.nix
···
let
inherit (lib)
attrValues
-
literalExample
+
literalExpression
mkEnableOption
mkIf
mkOption
···
package = mkOption {
type = types.package;
default = pkgs.metricbeat;
-
defaultText = literalExample "pkgs.metricbeat";
-
example = literalExample "pkgs.metricbeat7";
+
defaultText = literalExpression "pkgs.metricbeat";
+
example = literalExpression "pkgs.metricbeat7";
description = ''
The metricbeat package to use
'';
···
module = mkOption {
type = types.str;
default = name;
-
defaultText = literalExample ''<name>'';
description = ''
The name of the module.
+7 -5
nixos/modules/services/monitoring/munin.nix
···
<literal>/bin</literal>, <literal>/usr/bin</literal>,
<literal>/sbin</literal>, and <literal>/usr/sbin</literal>.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
zfs_usage_bigpool = /src/munin-contrib/plugins/zfs/zfs_usage_;
zfs_usage_smallpool = /src/munin-contrib/plugins/zfs/zfs_usage_;
···
<literal>/bin</literal>, <literal>/usr/bin</literal>,
<literal>/sbin</literal>, and <literal>/usr/sbin</literal>.
'';
-
example = literalExample ''
+
example = literalExpression ''
[
/src/munin-contrib/plugins/zfs
/src/munin-contrib/plugins/ssh
···
host for cron to succeed. See
<link xlink:href='http://guide.munin-monitoring.org/en/latest/reference/munin.conf.html' />
'';
-
example = ''
-
[''${config.networking.hostName}]
-
address localhost
+
example = literalExpression ''
+
'''
+
[''${config.networking.hostName}]
+
address localhost
+
'''
'';
};
+4 -4
nixos/modules/services/monitoring/nagios.nix
···
network that you want Nagios to monitor.
";
type = types.listOf types.path;
-
example = literalExample "[ ./objects.cfg ]";
+
example = literalExpression "[ ./objects.cfg ]";
};
plugins = mkOption {
type = types.listOf types.package;
default = with pkgs; [ monitoring-plugins ssmtp mailutils ];
-
defaultText = "[pkgs.monitoring-plugins pkgs.ssmtp pkgs.mailutils]";
+
defaultText = literalExpression "[pkgs.monitoring-plugins pkgs.ssmtp pkgs.mailutils]";
description = "
Packages to be added to the Nagios <envar>PATH</envar>.
Typically used to add plugins, but can be anything.
···
cgiConfigFile = mkOption {
type = types.package;
default = nagiosCGICfgFile;
-
defaultText = "nagiosCGICfgFile";
+
defaultText = literalExpression "nagiosCGICfgFile";
description = "
Derivation for the configuration file of Nagios CGI scripts
that can be used in web servers for running the Nagios web interface.
···
virtualHost = mkOption {
type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
-
example = literalExample ''
+
example = literalExpression ''
{ hostName = "example.org";
adminAddr = "webmaster@example.org";
enableSSL = true;
+5 -5
nixos/modules/services/monitoring/netdata.nix
···
package = mkOption {
type = types.package;
default = pkgs.netdata;
-
defaultText = "pkgs.netdata";
+
defaultText = literalExpression "pkgs.netdata";
description = "Netdata package to use.";
};
···
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = ps: [];
-
defaultText = "ps: []";
-
example = literalExample ''
+
defaultText = literalExpression "ps: []";
+
example = literalExpression ''
ps: [
ps.psycopg2
ps.docker
···
extraPluginPaths = mkOption {
type = types.listOf types.path;
default = [ ];
-
example = literalExample ''
+
example = literalExpression ''
[ "/path/to/plugins.d" ]
'';
description = ''
···
type = types.attrsOf types.attrs;
default = {};
description = "netdata.conf configuration as nix attributes. cannot be combined with configText.";
-
example = literalExample ''
+
example = literalExpression ''
global = {
"debug log" = "syslog";
"access log" = "syslog";
+1 -1
nixos/modules/services/monitoring/parsedmarc.nix
···
hostname = lib.mkOption {
type = lib.types.str;
default = config.networking.fqdn;
-
defaultText = "config.networking.fqdn";
+
defaultText = lib.literalExpression "config.networking.fqdn";
example = "monitoring.example.com";
description = ''
The hostname to use when configuring Postfix.
+1 -1
nixos/modules/services/monitoring/prometheus/alertmanager.nix
···
package = mkOption {
type = types.package;
default = pkgs.prometheus-alertmanager;
-
defaultText = "pkgs.alertmanager";
+
defaultText = literalExpression "pkgs.alertmanager";
description = ''
Package that should be used for alertmanager.
'';
+2 -2
nixos/modules/services/monitoring/prometheus/default.nix
···
package = mkOption {
type = types.package;
default = pkgs.prometheus;
-
defaultText = "pkgs.prometheus";
+
defaultText = literalExpression "pkgs.prometheus";
description = ''
The prometheus package that should be used.
'';
···
alertmanagers = mkOption {
type = types.listOf types.attrs;
-
example = literalExample ''
+
example = literalExpression ''
[ {
scheme = "https";
path_prefix = "/alertmanager";
+3 -3
nixos/modules/services/monitoring/prometheus/exporters.nix
···
{ config, pkgs, lib, options, ... }:
let
-
inherit (lib) concatStrings foldl foldl' genAttrs literalExample maintainers
+
inherit (lib) concatStrings foldl foldl' genAttrs literalExpression maintainers
mapAttrsToList mkDefault mkEnableOption mkIf mkMerge mkOption
optional types mkOptionDefault flip attrNames;
···
firewallFilter = mkOption {
type = types.nullOr types.str;
default = null;
-
example = literalExample ''
+
example = literalExpression ''
"-i eth0 -p tcp -m tcp --dport ${toString port}"
'';
description = ''
···
};
description = "Prometheus exporter configuration";
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
node = {
enable = true;
+1 -1
nixos/modules/services/monitoring/prometheus/exporters/buildkite-agent.nix
···
queues = mkOption {
type = with types; nullOr (listOf str);
default = null;
-
example = literalExample ''[ "my-queue1" "my-queue2" ]'';
+
example = literalExpression ''[ "my-queue1" "my-queue2" ]'';
description = ''
Which specific queues to process.
'';
+1 -1
nixos/modules/services/monitoring/prometheus/exporters/flow.nix
···
extraOpts = {
brokers = mkOption {
type = types.listOf types.str;
-
example = literalExample ''[ "kafka.example.org:19092" ]'';
+
example = literalExpression ''[ "kafka.example.org:19092" ]'';
description = "List of Kafka brokers to connect to.";
};
+1 -1
nixos/modules/services/monitoring/prometheus/exporters/kea.nix
···
extraOpts = {
controlSocketPaths = mkOption {
type = types.listOf types.str;
-
example = literalExample ''
+
example = literalExpression ''
[
"/run/kea/kea-dhcp4.socket"
"/run/kea/kea-dhcp6.socket"
+1 -1
nixos/modules/services/monitoring/prometheus/exporters/knot.nix
···
knotLibraryPath = mkOption {
type = types.str;
default = "${pkgs.knot-dns.out}/lib/libknot.so";
-
defaultText = "\${pkgs.knot-dns}/lib/libknot.so";
+
defaultText = literalExpression ''"''${pkgs.knot-dns.out}/lib/libknot.so"'';
description = ''
Path to the library of <package>knot-dns</package>.
'';
+1 -1
nixos/modules/services/monitoring/prometheus/exporters/mail.nix
···
servers = mkOption {
type = types.listOf (types.submodule serverOptions);
default = [];
-
example = literalExample ''
+
example = literalExpression ''
[ {
name = "testserver";
server = "smtp.domain.tld";
+2 -2
nixos/modules/services/monitoring/prometheus/exporters/mikrotik.nix
···
Path to a mikrotik exporter configuration file. Mutually exclusive with
<option>configuration</option> option.
'';
-
example = literalExample "./mikrotik.yml";
+
example = literalExpression "./mikrotik.yml";
};
configuration = mkOption {
···
See <link xlink:href="https://github.com/nshttpd/mikrotik-exporter/blob/master/README.md"/>
for the description of the configuration file format.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
devices = [
{
+2 -2
nixos/modules/services/monitoring/prometheus/exporters/node.nix
···
enabledCollectors = mkOption {
type = types.listOf types.str;
default = [];
-
example = ''[ "systemd" ]'';
+
example = [ "systemd" ];
description = ''
Collectors to enable. The collectors listed here are enabled in addition to the default ones.
'';
···
disabledCollectors = mkOption {
type = types.listOf types.str;
default = [];
-
example = ''[ "timex" ]'';
+
example = [ "timex" ];
description = ''
Collectors to disable which are enabled by default.
'';
+2 -2
nixos/modules/services/monitoring/prometheus/exporters/pihole.nix
···
};
piholePort = mkOption {
type = types.port;
-
default = "80";
-
example = "443";
+
default = 80;
+
example = 443;
description = ''
The port pihole webinterface is reachable on
'';
+6 -8
nixos/modules/services/monitoring/prometheus/exporters/process.nix
···
extraOpts = {
settings.process_names = mkOption {
type = types.listOf types.anything;
-
default = {};
-
example = literalExample ''
-
{
-
process_names = [
-
# Remove nix store path from process name
-
{ name = "{{.Matches.Wrapped}} {{ .Matches.Args }}"; cmdline = [ "^/nix/store[^ ]*/(?P<Wrapped>[^ /]*) (?P<Args>.*)" ]; }
-
];
-
}
+
default = [];
+
example = literalExpression ''
+
[
+
# Remove nix store path from process name
+
{ name = "{{.Matches.Wrapped}} {{ .Matches.Args }}"; cmdline = [ "^/nix/store[^ ]*/(?P<Wrapped>[^ /]*) (?P<Args>.*)" ]; }
+
]
'';
description = ''
All settings expressed as an Nix attrset.
+2 -2
nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix
···
default = {
host = config.networking.hostName;
};
-
defaultText = "{ host = config.networking.hostName; }";
-
example = literalExample ''
+
defaultText = literalExpression "{ host = config.networking.hostName; }";
+
example = literalExpression ''
{
host = config.networking.hostName;
custom_label = "some_value";
+1 -1
nixos/modules/services/monitoring/prometheus/exporters/script.nix
···
};
};
});
-
example = literalExample ''
+
example = literalExpression ''
{
scripts = [
{ name = "sleep"; script = "sleep 5"; }
+7 -9
nixos/modules/services/monitoring/prometheus/exporters/snmp.nix
···
description = ''
Path to a snmp exporter configuration file. Mutually exclusive with 'configuration' option.
'';
-
example = "./snmp.yml";
+
example = literalExpression "./snmp.yml";
};
configuration = mkOption {
···
description = ''
Snmp exporter configuration as nix attribute set. Mutually exclusive with 'configurationPath' option.
'';
-
example = ''
-
{
-
"default" = {
-
"version" = 2;
-
"auth" = {
-
"community" = "public";
-
};
+
example = {
+
"default" = {
+
"version" = 2;
+
"auth" = {
+
"community" = "public";
};
};
-
'';
+
};
};
logFormat = mkOption {
+1 -1
nixos/modules/services/monitoring/prometheus/pushgateway.nix
···
package = mkOption {
type = types.package;
default = pkgs.prometheus-pushgateway;
-
defaultText = "pkgs.prometheus-pushgateway";
+
defaultText = literalExpression "pkgs.prometheus-pushgateway";
description = ''
Package that should be used for the prometheus pushgateway.
'';
+2 -3
nixos/modules/services/monitoring/scollector.nix
···
package = mkOption {
type = types.package;
default = pkgs.scollector;
-
defaultText = "pkgs.scollector";
-
example = literalExample "pkgs.scollector";
+
defaultText = literalExpression "pkgs.scollector";
description = ''
scollector binary to use.
'';
···
collectors = mkOption {
type = with types; attrsOf (listOf path);
default = {};
-
example = literalExample "{ \"0\" = [ \"\${postgresStats}/bin/collect-stats\" ]; }";
+
example = literalExpression ''{ "0" = [ "''${postgresStats}/bin/collect-stats" ]; }'';
description = ''
An attribute set mapping the frequency of collection to a list of
binaries that should be executed at that frequency. You can use "0"
+2 -2
nixos/modules/services/monitoring/telegraf.nix
···
package = mkOption {
default = pkgs.telegraf;
-
defaultText = "pkgs.telegraf";
+
defaultText = literalExpression "pkgs.telegraf";
description = "Which telegraf derivation to use";
type = types.package;
};
···
environmentFiles = mkOption {
type = types.listOf types.path;
default = [];
-
example = "/run/keys/telegraf.env";
+
example = [ "/run/keys/telegraf.env" ];
description = ''
File to load as environment file. Environment variables from this file
will be interpolated into the config file using envsubst with this
+4 -4
nixos/modules/services/monitoring/thanos.nix
···
type = with types; nullOr str;
default = if cfg.tracing.config == null then null
else toString (toYAML "tracing.yaml" cfg.tracing.config);
-
defaultText = ''
+
defaultText = literalExpression ''
if config.services.thanos.<cmd>.tracing.config == null then null
else toString (toYAML "tracing.yaml" config.services.thanos.<cmd>.tracing.config);
'';
···
type = with types; nullOr str;
default = if cfg.objstore.config == null then null
else toString (toYAML "objstore.yaml" cfg.objstore.config);
-
defaultText = ''
+
defaultText = literalExpression ''
if config.services.thanos.<cmd>.objstore.config == null then null
else toString (toYAML "objstore.yaml" config.services.thanos.<cmd>.objstore.config);
'';
···
option = mkOption {
type = types.str;
default = "/var/lib/${config.services.prometheus.stateDir}/data";
-
defaultText = "/var/lib/\${config.services.prometheus.stateDir}/data";
+
defaultText = literalExpression ''"/var/lib/''${config.services.prometheus.stateDir}/data"'';
description = ''
Data directory of TSDB.
'';
···
package = mkOption {
type = types.package;
default = pkgs.thanos;
-
defaultText = "pkgs.thanos";
+
defaultText = literalExpression "pkgs.thanos";
description = ''
The thanos package that should be used.
'';
+2 -2
nixos/modules/services/monitoring/unifi-poller.nix
···
pass = mkOption {
type = types.path;
default = pkgs.writeText "unifi-poller-influxdb-default.password" "unifipoller";
-
defaultText = "unifi-poller-influxdb-default.password";
+
defaultText = literalExpression "unifi-poller-influxdb-default.password";
description = ''
Path of a file containing the password for influxdb.
This file needs to be readable by the unifi-poller user.
···
pass = mkOption {
type = types.path;
default = pkgs.writeText "unifi-poller-unifi-default.password" "unifi";
-
defaultText = "unifi-poller-unifi-default.password";
+
defaultText = literalExpression "unifi-poller-unifi-default.password";
description = ''
Path of a file containing the password for the unifi service user.
This file needs to be readable by the unifi-poller user.
+5 -5
nixos/modules/services/monitoring/zabbix-agent.nix
···
cfg = config.services.zabbixAgent;
inherit (lib) mkDefault mkEnableOption mkIf mkMerge mkOption;
-
inherit (lib) attrValues concatMapStringsSep literalExample optionalString types;
+
inherit (lib) attrValues concatMapStringsSep literalExpression optionalString types;
inherit (lib.generators) toKeyValue;
user = "zabbix-agent";
···
package = mkOption {
type = types.package;
default = pkgs.zabbix.agent;
-
defaultText = "pkgs.zabbix.agent";
+
defaultText = literalExpression "pkgs.zabbix.agent";
description = "The Zabbix package to use.";
};
extraPackages = mkOption {
type = types.listOf types.package;
default = with pkgs; [ nettools ];
-
defaultText = "[ nettools ]";
-
example = "[ nettools mysql ]";
+
defaultText = literalExpression "with pkgs; [ nettools ]";
+
example = literalExpression "with pkgs; [ nettools mysql ]";
description = ''
Packages to be added to the Zabbix <envar>PATH</envar>.
Typically used to add executables for scripts, but can be anything.
···
type = types.attrsOf types.package;
description = "A set of modules to load.";
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"dummy.so" = pkgs.stdenv.mkDerivation {
name = "zabbix-dummy-module-''${cfg.package.version}";
+5 -5
nixos/modules/services/monitoring/zabbix-proxy.nix
···
mysql = config.services.mysql;
inherit (lib) mkAfter mkDefault mkEnableOption mkIf mkMerge mkOption;
-
inherit (lib) attrValues concatMapStringsSep getName literalExample optional optionalAttrs optionalString types;
+
inherit (lib) attrValues concatMapStringsSep getName literalExpression optional optionalAttrs optionalString types;
inherit (lib.generators) toKeyValue;
user = "zabbix";
···
if cfg.database.type == "mysql" then pkgs.zabbix.proxy-mysql
else if cfg.database.type == "pgsql" then pkgs.zabbix.proxy-pgsql
else pkgs.zabbix.proxy-sqlite;
-
defaultText = "pkgs.zabbix.proxy-pgsql";
+
defaultText = literalExpression "pkgs.zabbix.proxy-pgsql";
description = "The Zabbix package to use.";
};
extraPackages = mkOption {
type = types.listOf types.package;
default = with pkgs; [ nettools nmap traceroute ];
-
defaultText = "[ nettools nmap traceroute ]";
+
defaultText = literalExpression "[ nettools nmap traceroute ]";
description = ''
Packages to be added to the Zabbix <envar>PATH</envar>.
Typically used to add executables for scripts, but can be anything.
···
type = types.attrsOf types.package;
description = "A set of modules to load.";
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"dummy.so" = pkgs.stdenv.mkDerivation {
name = "zabbix-dummy-module-''${cfg.package.version}";
···
name = mkOption {
type = types.str;
default = if cfg.database.type == "sqlite" then "${stateDir}/zabbix.db" else "zabbix";
-
defaultText = "zabbix";
+
defaultText = literalExpression "zabbix";
description = "Database name.";
};
+4 -4
nixos/modules/services/monitoring/zabbix-server.nix
···
mysql = config.services.mysql;
inherit (lib) mkAfter mkDefault mkEnableOption mkIf mkMerge mkOption;
-
inherit (lib) attrValues concatMapStringsSep getName literalExample optional optionalAttrs optionalString types;
+
inherit (lib) attrValues concatMapStringsSep getName literalExpression optional optionalAttrs optionalString types;
inherit (lib.generators) toKeyValue;
user = "zabbix";
···
package = mkOption {
type = types.package;
default = if cfg.database.type == "mysql" then pkgs.zabbix.server-mysql else pkgs.zabbix.server-pgsql;
-
defaultText = "pkgs.zabbix.server-pgsql";
+
defaultText = literalExpression "pkgs.zabbix.server-pgsql";
description = "The Zabbix package to use.";
};
extraPackages = mkOption {
type = types.listOf types.package;
default = with pkgs; [ nettools nmap traceroute ];
-
defaultText = "[ nettools nmap traceroute ]";
+
defaultText = literalExpression "[ nettools nmap traceroute ]";
description = ''
Packages to be added to the Zabbix <envar>PATH</envar>.
Typically used to add executables for scripts, but can be anything.
···
type = types.attrsOf types.package;
description = "A set of modules to load.";
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"dummy.so" = pkgs.stdenv.mkDerivation {
name = "zabbix-dummy-module-''${cfg.package.version}";
+11 -21
nixos/modules/services/network-filesystems/ceph.nix
···
mgrModulePath = mkOption {
type = types.path;
default = "${pkgs.ceph.lib}/lib/ceph/mgr";
+
defaultText = literalExpression ''"''${pkgs.ceph.lib}/lib/ceph/mgr"'';
description = ''
Path at which to find ceph-mgr modules.
'';
···
rgwMimeTypesFile = mkOption {
type = with types; nullOr path;
default = "${pkgs.mime-types}/etc/mime.types";
+
defaultText = literalExpression ''"''${pkgs.mime-types}/etc/mime.types"'';
description = ''
Path to mime types used by radosgw.
'';
···
extraConfig = mkOption {
type = with types; attrsOf str;
default = {};
-
example = ''
-
{
-
"ms bind ipv6" = "true";
-
};
-
'';
+
example = {
+
"ms bind ipv6" = "true";
+
};
description = ''
Extra configuration to add to the global section. Use for setting values that are common for all daemons in the cluster.
'';
···
daemons = mkOption {
type = with types; listOf str;
default = [];
-
example = ''
-
[ "name1" "name2" ];
-
'';
+
example = [ "name1" "name2" ];
description = ''
A list of names for manager daemons that should have a service created. The names correspond
to the id part in ceph i.e. [ "name1" ] would result in mgr.name1
···
daemons = mkOption {
type = with types; listOf str;
default = [];
-
example = ''
-
[ "name1" "name2" ];
-
'';
+
example = [ "name1" "name2" ];
description = ''
A list of monitor daemons that should have a service created. The names correspond
to the id part in ceph i.e. [ "name1" ] would result in mon.name1
···
daemons = mkOption {
type = with types; listOf str;
default = [];
-
example = ''
-
[ "name1" "name2" ];
-
'';
+
example = [ "name1" "name2" ];
description = ''
A list of OSD daemons that should have a service created. The names correspond
to the id part in ceph i.e. [ "name1" ] would result in osd.name1
···
daemons = mkOption {
type = with types; listOf str;
default = [];
-
example = ''
-
[ "name1" "name2" ];
-
'';
+
example = [ "name1" "name2" ];
description = ''
A list of metadata service daemons that should have a service created. The names correspond
to the id part in ceph i.e. [ "name1" ] would result in mds.name1
···
daemons = mkOption {
type = with types; listOf str;
default = [];
-
example = ''
-
[ "name1" "name2" ];
-
'';
+
example = [ "name1" "name2" ];
description = ''
A list of rados gateway daemons that should have a service created. The names correspond
to the id part in ceph i.e. [ "name1" ] would result in client.name1, radosgw daemons
···
extraConfig = mkOption {
type = with types; attrsOf (attrsOf str);
default = {};
-
example = ''
+
example = literalExpression ''
{
# This would create a section for a radosgw daemon named node0 and related
# configuration for it
-3
nixos/modules/services/network-filesystems/glusterfs.nix
···
type = types.nullOr (types.submodule {
options = {
tlsKeyPath = mkOption {
-
default = null;
type = types.str;
description = "Path to the private key used for TLS.";
};
tlsPem = mkOption {
-
default = null;
type = types.path;
description = "Path to the certificate used for TLS.";
};
caCert = mkOption {
-
default = null;
type = types.path;
description = "Path certificate authority used to sign the cluster certificates.";
};
+1 -1
nixos/modules/services/network-filesystems/ipfs.nix
···
package = mkOption {
type = types.package;
default = pkgs.ipfs;
-
defaultText = "pkgs.ipfs";
+
defaultText = literalExpression "pkgs.ipfs";
description = "Which IPFS package to use.";
};
+1 -1
nixos/modules/services/network-filesystems/litestream/default.nix
···
package = mkOption {
description = "Package to use.";
default = pkgs.litestream;
-
defaultText = "pkgs.litestream";
+
defaultText = literalExpression "pkgs.litestream";
type = types.package;
};
+7 -8
nixos/modules/services/network-filesystems/openafs/client.nix
···
with import ./lib.nix { inherit config lib pkgs; };
let
-
inherit (lib) getBin mkOption mkIf optionalString singleton types;
+
inherit (lib) getBin literalExpression mkOption mkIf optionalString singleton types;
cfg = config.services.openafsClient;
···
CellServDB. See CellServDB(5) man page for syntax. Ignored when
<literal>afsdb</literal> is set to <literal>true</literal>.
'';
-
example = ''
-
[ { ip = "1.2.3.4"; dnsname = "first.afsdb.server.dns.fqdn.org"; }
-
{ ip = "2.3.4.5"; dnsname = "second.afsdb.server.dns.fqdn.org"; }
-
]
-
'';
+
example = [
+
{ ip = "1.2.3.4"; dnsname = "first.afsdb.server.dns.fqdn.org"; }
+
{ ip = "2.3.4.5"; dnsname = "second.afsdb.server.dns.fqdn.org"; }
+
];
};
cache = {
···
packages = {
module = mkOption {
default = config.boot.kernelPackages.openafs;
-
defaultText = "config.boot.kernelPackages.openafs";
+
defaultText = literalExpression "config.boot.kernelPackages.openafs";
type = types.package;
description = "OpenAFS kernel module package. MUST match the userland package!";
};
programs = mkOption {
default = getBin pkgs.openafs;
-
defaultText = "getBin pkgs.openafs";
+
defaultText = literalExpression "getBin pkgs.openafs";
type = types.package;
description = "OpenAFS programs package. MUST match the kernel module package!";
};
+2 -2
nixos/modules/services/network-filesystems/openafs/server.nix
···
with import ./lib.nix { inherit config lib pkgs; };
let
-
inherit (lib) concatStringsSep mkIf mkOption optionalString types;
+
inherit (lib) concatStringsSep literalExpression mkIf mkOption optionalString types;
bosConfig = pkgs.writeText "BosConfig" (''
restrictmode 1
···
package = mkOption {
default = pkgs.openafs.server or pkgs.openafs;
-
defaultText = "pkgs.openafs.server or pkgs.openafs";
+
defaultText = literalExpression "pkgs.openafs.server or pkgs.openafs";
type = types.package;
description = "OpenAFS package for the server binaries";
};
-1
nixos/modules/services/network-filesystems/orangefs/client.nix
···
target = mkOption {
type = types.str;
-
default = null;
example = "tcp://server:3334/orangefs";
description = "Target URL";
};
+5 -8
nixos/modules/services/network-filesystems/orangefs/server.nix
···
servers = mkOption {
type = with types; attrsOf types.str;
default = {};
-
example = ''
-
{
-
node1="tcp://node1:3334";
-
node2="tcp://node2:3334";
-
}
-
'';
+
example = {
+
node1 = "tcp://node1:3334";
+
node2 = "tcp://node2:3334";
+
};
description = "URLs for storage server including port. The attribute names define the server alias.";
};
···
These options will create the <literal>&lt;FileSystem&gt;</literal> sections of config file.
'';
default = { orangefs = {}; };
-
defaultText = literalExample "{ orangefs = {}; }";
-
example = literalExample ''
+
example = literalExpression ''
{
fs1 = {
id = 101;
+3 -3
nixos/modules/services/network-filesystems/samba.nix
···
package = mkOption {
type = types.package;
default = pkgs.samba;
-
defaultText = "pkgs.samba";
-
example = literalExample "pkgs.samba4Full";
+
defaultText = literalExpression "pkgs.samba";
+
example = literalExpression "pkgs.samba4Full";
description = ''
Defines which package should be used for the samba server.
'';
···
See <command>man smb.conf</command> for options.
'';
type = types.attrsOf (types.attrsOf types.unspecified);
-
example = literalExample ''
+
example = literalExpression ''
{ public =
{ path = "/srv/public";
"read only" = true;
+2 -4
nixos/modules/services/network-filesystems/tahoe.nix
···
};
package = mkOption {
default = pkgs.tahoelafs;
-
defaultText = "pkgs.tahoelafs";
+
defaultText = literalExpression "pkgs.tahoelafs";
type = types.package;
-
example = literalExample "pkgs.tahoelafs";
description = ''
The package to use for the Tahoe LAFS daemon.
'';
···
};
package = mkOption {
default = pkgs.tahoelafs;
-
defaultText = "pkgs.tahoelafs";
+
defaultText = literalExpression "pkgs.tahoelafs";
type = types.package;
-
example = literalExample "pkgs.tahoelafs";
description = ''
The package to use for the Tahoe LAFS daemon.
'';
+2 -2
nixos/modules/services/network-filesystems/xtreemfs.nix
···
'';
};
syncMode = mkOption {
-
type = types.enum [ "ASYNC" "SYNC_WRITE_METADATA" "SYNC_WRITE" "FDATASYNC" "ASYNC" ];
+
type = types.enum [ "ASYNC" "SYNC_WRITE_METADATA" "SYNC_WRITE" "FDATASYNC" "FSYNC" ];
default = "FSYNC";
example = "FDATASYNC";
description = ''
···
};
syncMode = mkOption {
default = "FSYNC";
-
type = types.enum [ "ASYNC" "SYNC_WRITE_METADATA" "SYNC_WRITE" "FDATASYNC" "ASYNC" ];
+
type = types.enum [ "ASYNC" "SYNC_WRITE_METADATA" "SYNC_WRITE" "FDATASYNC" "FSYNC" ];
example = "FDATASYNC";
description = ''
The sync mode influences how operations are committed to the disk
+3 -16
nixos/modules/services/networking/3proxy.nix
···
};
});
default = [ ];
-
example = literalExample ''
+
example = literalExpression ''
[
{
rule = "allow";
···
};
});
default = [ ];
-
example = literalExample ''
+
example = literalExpression ''
[
{
type = "proxy";
···
"::1"
"fc00::/7"
];
-
example = [
-
"0.0.0.0/8"
-
"127.0.0.0/8"
-
"10.0.0.0/8"
-
"100.64.0.0/10"
-
"172.16.0.0/12"
-
"192.168.0.0/16"
-
"::"
-
"::1"
-
"fc00::/7"
-
];
description = ''
What IP ranges to deny access when denyPrivate is set tu true.
'';
···
nscache = mkOption {
type = types.int;
default = 65535;
-
example = 65535;
description = "Set name cache size for IPv4.";
};
nscache6 = mkOption {
type = types.int;
default = 65535;
-
example = 65535;
description = "Set name cache size for IPv6.";
};
nsrecord = mkOption {
type = types.attrsOf types.str;
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
"files.local" = "192.168.1.12";
"site.local" = "192.168.1.43";
+2 -2
nixos/modules/services/networking/asterisk.nix
···
confFiles = mkOption {
default = {};
type = types.attrsOf types.str;
-
example = literalExample
+
example = literalExpression
''
{
"extensions.conf" = '''
···
package = mkOption {
type = types.package;
default = pkgs.asterisk;
-
defaultText = "pkgs.asterisk";
+
defaultText = literalExpression "pkgs.asterisk";
description = "The Asterisk package to use.";
};
};
+1 -1
nixos/modules/services/networking/atftpd.nix
···
extraOptions = mkOption {
default = [];
type = types.listOf types.str;
-
example = literalExample ''
+
example = literalExpression ''
[ "--bind-address 192.168.9.1"
"--verbose=7"
]
+3 -3
nixos/modules/services/networking/avahi-daemon.nix
···
hostName = mkOption {
type = types.str;
default = config.networking.hostName;
-
defaultText = literalExample "config.networking.hostName";
+
defaultText = literalExpression "config.networking.hostName";
description = ''
Host name advertised on the LAN. If not set, avahi will use the value
of <option>config.networking.hostName</option>.
···
ipv6 = mkOption {
type = types.bool;
default = config.networking.enableIPv6;
-
defaultText = "config.networking.enableIPv6";
+
defaultText = literalExpression "config.networking.enableIPv6";
description = "Whether to use IPv6.";
};
···
extraServiceFiles = mkOption {
type = with types; attrsOf (either str path);
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
ssh = "''${pkgs.avahi}/etc/avahi/services/ssh.service";
smb = '''
+2 -2
nixos/modules/services/networking/bee.nix
···
package = mkOption {
type = types.package;
default = pkgs.bee;
-
defaultText = "pkgs.bee";
-
example = "pkgs.bee-unstable";
+
defaultText = literalExpression "pkgs.bee";
+
example = literalExpression "pkgs.bee-unstable";
description = "The package providing the bee binary for the service.";
};
+1
nixos/modules/services/networking/biboumi.nix
···
options.policy_directory = mkOption {
type = types.path;
default = "${pkgs.biboumi}/etc/biboumi";
+
defaultText = literalExpression ''"''${pkgs.biboumi}/etc/biboumi"'';
description = ''
A directory that should contain the policy files,
used to customize Botan’s behaviour
+2 -2
nixos/modules/services/networking/bind.nix
···
package = mkOption {
type = types.package;
default = pkgs.bind;
-
defaultText = "pkgs.bind";
+
defaultText = literalExpression "pkgs.bind";
description = "The BIND package to use.";
};
···
configFile = mkOption {
type = types.path;
default = confFile;
-
defaultText = "confFile";
+
defaultText = literalExpression "confFile";
description = "
Overridable config file to use for named. By default, that
generated by nixos.
+2 -2
nixos/modules/services/networking/bitcoind.nix
···
package = mkOption {
type = types.package;
default = pkgs.bitcoind;
-
defaultText = "pkgs.bitcoind";
+
defaultText = literalExpression "pkgs.bitcoind";
description = "The package providing bitcoin binaries.";
};
···
};
users = mkOption {
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
alice.passwordHMAC = "f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae";
bob.passwordHMAC = "b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99";
+2 -2
nixos/modules/services/networking/bitlbee.nix
···
plugins = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "[ pkgs.bitlbee-facebook ]";
+
example = literalExpression "[ pkgs.bitlbee-facebook ]";
description = ''
The list of bitlbee plugins to install.
'';
···
libpurple_plugins = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "[ pkgs.purple-matrix ]";
+
example = literalExpression "[ pkgs.purple-matrix ]";
description = ''
The list of libpurple plugins to install.
'';
+6 -9
nixos/modules/services/networking/blockbook-frontend.nix
···
package = mkOption {
type = types.package;
default = pkgs.blockbook;
+
defaultText = literalExpression "pkgs.blockbook";
description = "Which blockbook package to use.";
};
···
coinName = mkOption {
type = types.str;
default = "Bitcoin";
-
example = "Bitcoin";
description = ''
See <link xlink:href="https://github.com/trezor/blockbook/blob/master/bchain/coins/blockchain.go#L61"/>
for current of coins supported in master (Note: may differ from release).
···
cssDir = mkOption {
type = types.path;
default = "${config.package}/share/css/";
-
example = "${config.dataDir}/static/css/";
+
defaultText = literalExpression ''"''${package}/share/css/"'';
+
example = literalExpression ''"''${dataDir}/static/css/"'';
description = ''
Location of the dir with <filename>main.css</filename> CSS file.
By default, the one shipped with the package is used.
···
internal = mkOption {
type = types.nullOr types.str;
default = ":9030";
-
example = ":9030";
description = "Internal http server binding <literal>[address]:port</literal>.";
};
messageQueueBinding = mkOption {
type = types.str;
default = "tcp://127.0.0.1:38330";
-
example = "tcp://127.0.0.1:38330";
description = "Message Queue Binding <literal>address:port</literal>.";
};
public = mkOption {
type = types.nullOr types.str;
default = ":9130";
-
example = ":9130";
description = "Public http server binding <literal>[address]:port</literal>.";
};
···
user = mkOption {
type = types.str;
default = "rpc";
-
example = "rpc";
description = "Username for JSON-RPC connections.";
};
password = mkOption {
type = types.str;
default = "rpc";
-
example = "rpc";
description = ''
RPC password for JSON-RPC connections.
Warning: this is stored in cleartext in the Nix store!!!
···
templateDir = mkOption {
type = types.path;
default = "${config.package}/share/templates/";
-
example = "${config.dataDir}/templates/static/";
+
defaultText = literalExpression ''"''${package}/share/templates/"'';
+
example = literalExpression ''"''${dataDir}/templates/static/"'';
description = "Location of the HTML templates. By default, ones shipped with the package are used.";
};
extraConfig = mkOption {
type = types.attrs;
default = {};
-
example = literalExample '' {
+
example = literalExpression '' {
"alternative_estimate_fee" = "whatthefee-disabled";
"alternative_estimate_fee_params" = "{\"url\": \"https://whatthefee.io/data.json\", \"periodSeconds\": 60}";
"fiat_rates" = "coingecko";
+2 -2
nixos/modules/services/networking/cjdns.nix
···
connectTo = mkOption {
type = types.attrsOf ( types.submodule ( connectToSubmodule ) );
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
"192.168.1.1:27313" = {
hostname = "homer.hype";
···
connectTo = mkOption {
type = types.attrsOf ( types.submodule ( connectToSubmodule ) );
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
"01:02:03:04:05:06" = {
hostname = "homer.hype";
+3 -2
nixos/modules/services/networking/connman.nix
···
};
package = mkOption {
-
type = types.path;
+
type = types.package;
description = "The connman package / build flavor";
default = connman;
-
example = literalExample "pkgs.connmanFull";
+
defaultText = literalExpression "pkgs.connman";
+
example = literalExpression "pkgs.connmanFull";
};
};
+2 -2
nixos/modules/services/networking/consul.nix
···
package = mkOption {
type = types.package;
default = pkgs.consul;
-
defaultText = "pkgs.consul";
+
defaultText = literalExpression "pkgs.consul";
description = ''
The package used for the Consul agent and CLI.
'';
···
package = mkOption {
description = "Package to use for consul-alerts.";
default = pkgs.consul-alerts;
-
defaultText = "pkgs.consul-alerts";
+
defaultText = literalExpression "pkgs.consul-alerts";
type = types.package;
};
+1 -1
nixos/modules/services/networking/coredns.nix
···
package = mkOption {
default = pkgs.coredns;
-
defaultText = "pkgs.coredns";
+
defaultText = literalExpression "pkgs.coredns";
type = types.package;
description = "Coredns package to use.";
};
+3 -3
nixos/modules/services/networking/corerad.nix
···
settings = mkOption {
type = settingsFormat.type;
-
example = literalExample ''
+
example = literalExpression ''
{
interfaces = [
# eth0 is an upstream interface monitoring for IPv6 router advertisements.
···
configFile = mkOption {
type = types.path;
-
example = literalExample "\"\${pkgs.corerad}/etc/corerad/corerad.toml\"";
+
example = literalExpression ''"''${pkgs.corerad}/etc/corerad/corerad.toml"'';
description = "Path to CoreRAD TOML configuration file.";
};
package = mkOption {
default = pkgs.corerad;
-
defaultText = literalExample "pkgs.corerad";
+
defaultText = literalExpression "pkgs.corerad";
type = types.package;
description = "CoreRAD package to use.";
};
+2 -2
nixos/modules/services/networking/coturn.nix
···
alt-listening-port = mkOption {
type = types.int;
default = cfg.listening-port + 1;
-
defaultText = "listening-port + 1";
+
defaultText = literalExpression "listening-port + 1";
description = ''
Alternative listening port for UDP and TCP listeners;
default (or zero) value means "listening port plus one".
···
alt-tls-listening-port = mkOption {
type = types.int;
default = cfg.tls-listening-port + 1;
-
defaultText = "tls-listening-port + 1";
+
defaultText = literalExpression "tls-listening-port + 1";
description = ''
Alternative listening port for TLS and DTLS protocols.
'';
+1 -1
nixos/modules/services/networking/dnscache.nix
···
Table of {hostname: server} pairs to use as authoritative servers for hosts (and subhosts).
If entry for @ is not specified predefined list of root servers is used.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
"@" = ["8.8.8.8" "8.8.4.4"];
"example.com" = ["192.168.100.100"];
+3 -3
nixos/modules/services/networking/dnscrypt-proxy2.nix
···
Attrset that is converted and passed as TOML config file.
For available params, see: <link xlink:href="https://github.com/DNSCrypt/dnscrypt-proxy/blob/${pkgs.dnscrypt-proxy2.version}/dnscrypt-proxy/example-dnscrypt-proxy.toml"/>
'';
-
example = literalExample ''
+
example = literalExpression ''
{
sources.public-resolvers = {
urls = [ "https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md" ];
···
upstreamDefaults = mkOption {
description = ''
-
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"/>)
+
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"/>)
Disable this if you want to declare your dnscrypt config from scratch.
'';
···
''}
${pkgs.remarshal}/bin/json2toml < config.json > $out
'';
-
defaultText = literalExample "TOML file generated from services.dnscrypt-proxy2.settings";
+
defaultText = literalDocBook "TOML file generated from <option>services.dnscrypt-proxy2.settings</option>";
};
};
+1 -1
nixos/modules/services/networking/doh-proxy-rust.nix
···
flags = mkOption {
type = types.listOf types.str;
default = [];
-
example = literalExample [ "--server-address=9.9.9.9:53" ];
+
example = [ "--server-address=9.9.9.9:53" ];
description = ''
A list of command-line flags to pass to doh-proxy. For details on the
available options, see <link xlink:href="https://github.com/jedisct1/doh-server#usage"/>.
+2 -2
nixos/modules/services/networking/ejabberd.nix
···
package = mkOption {
type = types.package;
default = pkgs.ejabberd;
-
defaultText = "pkgs.ejabberd";
+
defaultText = literalExpression "pkgs.ejabberd";
description = "ejabberd server package to use";
};
···
type = types.listOf types.path;
default = [];
description = "Configuration dumps that should be loaded on the first startup";
-
example = literalExample "[ ./myejabberd.dump ]";
+
example = literalExpression "[ ./myejabberd.dump ]";
};
imagemagick = mkOption {
+1
nixos/modules/services/networking/epmd.nix
···
package = mkOption {
type = types.package;
default = pkgs.erlang;
+
defaultText = literalExpression "pkgs.erlang";
description = ''
The Erlang package to use to get epmd binary. That way you can re-use
an Erlang runtime that is already installed for other purposes.
+2 -2
nixos/modules/services/networking/ferm.nix
···
config = mkOption {
description = "Verbatim ferm.conf configuration.";
default = "";
-
defaultText = "empty firewall, allows any traffic";
+
defaultText = literalDocBook "empty firewall, allows any traffic";
type = types.lines;
};
package = mkOption {
description = "The ferm package.";
type = types.package;
default = pkgs.ferm;
-
defaultText = "pkgs.ferm";
+
defaultText = literalExpression "pkgs.ferm";
};
};
};
+3 -3
nixos/modules/services/networking/firewall.nix
···
package = mkOption {
type = types.package;
default = pkgs.iptables;
-
defaultText = "pkgs.iptables";
-
example = literalExample "pkgs.iptables-nftables-compat";
+
defaultText = literalExpression "pkgs.iptables";
+
example = literalExpression "pkgs.iptables-nftables-compat";
description =
''
The iptables package to use for running the firewall service."
···
extraPackages = mkOption {
type = types.listOf types.package;
default = [ ];
-
example = literalExample "[ pkgs.ipset ]";
+
example = literalExpression "[ pkgs.ipset ]";
description =
''
Additional packages to be included in the environment of the system
+1 -1
nixos/modules/services/networking/flannel.nix
···
description = "Package to use for flannel";
type = types.package;
default = pkgs.flannel;
-
defaultText = "pkgs.flannel";
+
defaultText = literalExpression "pkgs.flannel";
};
publicIp = mkOption {
+2 -2
nixos/modules/services/networking/ghostunnel.nix
···
concatMap
concatStringsSep
escapeShellArg
-
literalExample
+
literalExpression
mapAttrs'
mkDefault
mkEnableOption
···
description = "The ghostunnel package to use.";
type = types.package;
default = pkgs.ghostunnel;
-
defaultText = literalExample ''pkgs.ghostunnel'';
+
defaultText = literalExpression "pkgs.ghostunnel";
};
services.ghostunnel.servers = mkOption {
+1 -1
nixos/modules/services/networking/globalprotect-vpn.nix
···
as described at <link xlink:href="https://www.infradead.org/openconnect/hip.html" />
'';
default = null;
-
example = literalExample "\${pkgs.openconnect}/libexec/openconnect/hipreport.sh";
+
example = literalExpression ''"''${pkgs.openconnect}/libexec/openconnect/hipreport.sh"'';
type = types.nullOr types.path;
};
};
+2 -2
nixos/modules/services/networking/gnunet.nix
···
package = mkOption {
type = types.package;
default = pkgs.gnunet;
-
defaultText = "pkgs.gnunet";
+
defaultText = literalExpression "pkgs.gnunet";
description = "Overridable attribute of the gnunet package to use.";
-
example = literalExample "pkgs.gnunet_git";
+
example = literalExpression "pkgs.gnunet_git";
};
extraOptions = mkOption {
+1 -1
nixos/modules/services/networking/gobgpd.nix
···
<link xlink:href="https://github.com/osrg/gobgp#documentation"/>
for details on supported values.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
global = {
config = {
+1 -1
nixos/modules/services/networking/hans.nix
···
where <replaceable>name</replaceable> is the name of the
corresponding attribute name.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
foo = {
server = "192.0.2.1";
+4 -4
nixos/modules/services/networking/hylafax/options.nix
···
let
-
inherit (lib.options) literalExample mkEnableOption mkOption;
+
inherit (lib.options) literalExpression mkEnableOption mkOption;
inherit (lib.types) bool enum ints lines attrsOf nullOr path str submodule;
inherit (lib.modules) mkDefault mkIf mkMerge;
···
sendmailPath = mkOption {
type = path;
-
example = literalExample "''${pkgs.postfix}/bin/sendmail";
+
example = literalExpression ''"''${pkgs.postfix}/bin/sendmail"'';
# '' ; # fix vim
description = ''
Path to <filename>sendmail</filename> program.
···
faxqclean.doneqMinutes = mkOption {
type = ints.positive;
default = 15;
-
example = literalExample "24*60";
+
example = literalExpression "24*60";
description = ''
Set the job
age threshold (in minutes) that controls how long
···
faxqclean.docqMinutes = mkOption {
type = ints.positive;
default = 60;
-
example = literalExample "24*60";
+
example = literalExpression "24*60";
description = ''
Set the document
age threshold (in minutes) that controls how long
+1 -1
nixos/modules/services/networking/i2pd.nix
···
exploratory.inbound = i2cpOpts "exploratory";
exploratory.outbound = i2cpOpts "exploratory";
-
ntcp2.enable = mkEnableTrueOption "NTCP2.";
+
ntcp2.enable = mkEnableTrueOption "NTCP2";
ntcp2.published = mkEnableOption "NTCP2 publication";
ntcp2.port = mkOption {
type = types.int;
+1 -1
nixos/modules/services/networking/icecream/daemon.nix
···
package = mkOption {
default = pkgs.icecream;
-
defaultText = "pkgs.icecream";
+
defaultText = literalExpression "pkgs.icecream";
type = types.package;
description = "Icecream package to use.";
};
+1 -1
nixos/modules/services/networking/icecream/scheduler.nix
···
package = mkOption {
default = pkgs.icecream;
-
defaultText = "pkgs.icecream";
+
defaultText = literalExpression "pkgs.icecream";
type = types.package;
description = "Icecream package to use.";
};
+2 -2
nixos/modules/services/networking/inspircd.nix
···
package = lib.mkOption {
type = lib.types.package;
default = pkgs.inspircd;
-
defaultText = lib.literalExample "pkgs.inspircd";
-
example = lib.literalExample "pkgs.inspircdMinimal";
+
defaultText = lib.literalExpression "pkgs.inspircd";
+
example = lib.literalExpression "pkgs.inspircdMinimal";
description = ''
The InspIRCd package to use. This is mainly useful
to specify an overridden version of the
+1 -1
nixos/modules/services/networking/iodine.nix
···
where <replaceable>name</replaceable> is the name of the
corresponding attribute name.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
foo = {
server = "tunnel.mdomain.com";
+2 -2
nixos/modules/services/networking/ircd-hybrid/default.nix
···
rsaKey = mkOption {
default = null;
-
example = literalExample "/root/certificates/irc.key";
+
example = literalExpression "/root/certificates/irc.key";
type = types.nullOr types.path;
description = "
IRCD server RSA key.
···
certificate = mkOption {
default = null;
-
example = literalExample "/root/certificates/irc.pem";
+
example = literalExpression "/root/certificates/irc.pem";
type = types.nullOr types.path;
description = "
IRCD server SSL certificate. There are some limitations - read manual.
+1 -1
nixos/modules/services/networking/iscsi/initiator.nix
···
type = package;
description = "openiscsi package to use";
default = pkgs.openiscsi;
-
defaultText = "pkgs.openiscsi";
+
defaultText = literalExpression "pkgs.openiscsi";
};
extraConfig = mkOption {
+1 -1
nixos/modules/services/networking/jicofo.nix
···
config = mkOption {
type = attrsOf str;
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
"org.jitsi.jicofo.auth.URL" = "XMPP:jitsi-meet.example.com";
}
+3 -3
nixos/modules/services/networking/jitsi-videobridge.nix
···
config = mkOption {
type = attrs;
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
videobridge = {
ice.udp.port = 5000;
···
See <link xlink:href="https://github.com/jitsi/jitsi-videobridge/blob/master/doc/muc.md" /> for more information.
'';
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
"localhost" = {
hostName = "localhost";
···
Needed for monitoring jitsi.
'';
default = [];
-
example = literalExample "[ \"colibri\" \"rest\" ]";
+
example = literalExpression "[ \"colibri\" \"rest\" ]";
};
};
+1 -3
nixos/modules/services/networking/keepalived/vrrp-instance-options.nix
···
inherit lib;
}));
default = [];
-
example = literalExample ''
-
TODO: Example
-
'';
+
# TODO: example
description = "Declarative vhost config";
};
+1 -1
nixos/modules/services/networking/keepalived/vrrp-script-options.nix
···
script = mkOption {
type = str;
-
example = "\${pkgs.curl} -f http://localhost:80";
+
example = literalExpression ''"''${pkgs.curl} -f http://localhost:80"'';
description = "(Path of) Script command to execute followed by args, i.e. cmd [args]...";
};
+1 -1
nixos/modules/services/networking/knot.nix
···
package = mkOption {
type = types.package;
default = pkgs.knot-dns;
-
defaultText = "pkgs.knot-dns";
+
defaultText = literalExpression "pkgs.knot-dns";
description = ''
Which Knot DNS package to use
'';
+2 -2
nixos/modules/services/networking/kresd.nix
···
knot-resolver package to use.
";
default = pkgs.knot-resolver;
-
defaultText = "pkgs.knot-resolver";
-
example = literalExample "pkgs.knot-resolver.override { extraFeatures = true; }";
+
defaultText = literalExpression "pkgs.knot-resolver";
+
example = literalExpression "pkgs.knot-resolver.override { extraFeatures = true; }";
};
extraConfig = mkOption {
type = types.lines;
+1 -1
nixos/modules/services/networking/lambdabot.nix
···
package = mkOption {
type = types.package;
default = pkgs.lambdabot;
-
defaultText = "pkgs.lambdabot";
+
defaultText = literalExpression "pkgs.lambdabot";
description = "Used lambdabot package";
};
+2 -2
nixos/modules/services/networking/libreswan.nix
···
connections = mkOption {
type = types.attrsOf types.lines;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{ myconnection = '''
auto=add
left=%defaultroute
···
policies = mkOption {
type = types.attrsOf types.lines;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{ private-or-clear = '''
# Attempt opportunistic IPsec for the entire Internet
0.0.0.0/0
+1 -1
nixos/modules/services/networking/minidlna.nix
···
services.minidlna.friendlyName = mkOption {
type = types.str;
default = "${config.networking.hostName} MiniDLNA";
-
defaultText = "$HOSTNAME MiniDLNA";
+
defaultText = literalExpression ''"''${config.networking.hostName} MiniDLNA"'';
example = "rpi3";
description =
''
+1 -1
nixos/modules/services/networking/miredo.nix
···
package = mkOption {
type = types.package;
default = pkgs.miredo;
-
defaultText = "pkgs.miredo";
+
defaultText = literalExpression "pkgs.miredo";
description = ''
The package to use for the miredo daemon's binary.
'';
+2 -5
nixos/modules/services/networking/morty.nix
···
type = types.bool;
default = true;
description = "Allow IPv6 HTTP requests?";
-
defaultText = "Allow IPv6 HTTP requests.";
};
key = mkOption {
···
HMAC url validation key (hexadecimal encoded).
Leave blank to disable. Without validation key, anyone can
submit proxy requests. Leave blank to disable.
+
Generate with <literal>printf %s somevalue | openssl dgst -sha1 -hmac somekey</literal>
'';
-
defaultText = "No HMAC url validation. Generate with echo -n somevalue | openssl dgst -sha1 -hmac somekey";
};
timeout = mkOption {
type = types.int;
default = 2;
description = "Request timeout in seconds.";
-
defaultText = "A resource now gets 2 seconds to respond.";
};
package = mkOption {
type = types.package;
default = pkgs.morty;
-
defaultText = "pkgs.morty";
+
defaultText = literalExpression "pkgs.morty";
description = "morty package to use.";
};
···
type = types.str;
default = "127.0.0.1";
description = "The address on which the service listens";
-
defaultText = "127.0.0.1 (localhost)";
};
};
-2
nixos/modules/services/networking/mosquitto.nix
···
port = mkOption {
default = 1883;
-
example = 1883;
type = types.int;
description = ''
Port on which to listen without SSL.
···
port = mkOption {
default = 8883;
-
example = 8883;
type = types.int;
description = ''
Port on which to listen with SSL.
+1 -1
nixos/modules/services/networking/murmur.nix
···
package = mkOption {
type = types.package;
default = pkgs.murmur;
-
defaultText = "pkgs.murmur";
+
defaultText = literalExpression "pkgs.murmur";
description = "Overridable attribute of the murmur package to use.";
};
+1 -1
nixos/modules/services/networking/mxisd.nix
···
package = mkOption {
type = types.package;
default = pkgs.ma1sd;
-
defaultText = "pkgs.ma1sd";
+
defaultText = literalExpression "pkgs.ma1sd";
description = "The mxisd/ma1sd package to use";
};
+1 -1
nixos/modules/services/networking/nat.nix
···
loopbackIPs = mkOption {
type = types.listOf types.str;
default = [];
-
example = literalExample ''[ "55.1.2.3" ]'';
+
example = literalExpression ''[ "55.1.2.3" ]'';
description = "Public IPs for NAT reflection; for connections to `loopbackip:sourcePort' from the host itself and from other hosts behind NAT";
};
};
+1 -2
nixos/modules/services/networking/nats.nix
···
port = mkOption {
default = 4222;
-
example = 4222;
type = types.port;
description = ''
Port on which to listen.
···
settings = mkOption {
default = { };
type = format.type;
-
example = literalExample ''
+
example = literalExpression ''
{
jetstream = {
max_mem = "1G";
+1 -1
nixos/modules/services/networking/ncdns.nix
···
settings = mkOption {
type = configType;
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{ # enable webserver
ncdns.httplistenaddr = ":8202";
+1 -1
nixos/modules/services/networking/ndppd.nix
···
messages, and respond to them according to a set of rules.
'';
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
eth0.rules."1111::/64" = {};
}
+6 -8
nixos/modules/services/networking/nebula.nix
···
package = mkOption {
type = types.package;
default = pkgs.nebula;
-
defaultText = "pkgs.nebula";
+
defaultText = literalExpression "pkgs.nebula";
description = "Nebula derivation to use.";
};
···
The static host map defines a set of hosts with fixed IP addresses on the internet (or any network).
A host can have multiple fixed IP addresses defined here, and nebula will try each when establishing a tunnel.
'';
-
example = literalExample ''
-
{ "192.168.100.1" = [ "100.64.22.11:4242" ]; }
-
'';
+
example = { "192.168.100.1" = [ "100.64.22.11:4242" ]; };
};
isLighthouse = mkOption {
···
List of IPs of lighthouse hosts this node should report to and query from. This should be empty on lighthouse
nodes. The IPs should be the lighthouse's Nebula IPs, not their external IPs.
'';
-
example = ''[ "192.168.100.1" ]'';
+
example = [ "192.168.100.1" ];
};
listen.host = mkOption {
···
type = types.listOf types.attrs;
default = [];
description = "Firewall rules for outbound traffic.";
-
example = ''[ { port = "any"; proto = "any"; host = "any"; } ]'';
+
example = [ { port = "any"; proto = "any"; host = "any"; } ];
};
firewall.inbound = mkOption {
type = types.listOf types.attrs;
default = [];
description = "Firewall rules for inbound traffic.";
-
example = ''[ { port = "any"; proto = "any"; host = "any"; } ]'';
+
example = [ { port = "any"; proto = "any"; host = "any"; } ];
};
settings = mkOption {
···
<link xlink:href="https://github.com/slackhq/nebula/blob/master/examples/config.yml"/>
for details on supported values.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
lighthouse.dns = {
host = "0.0.0.0";
+1 -1
nixos/modules/services/networking/networkmanager.nix
···
};
});
default = [];
-
example = literalExample ''
+
example = literalExpression ''
[ {
source = pkgs.writeText "upHook" '''
+2
nixos/modules/services/networking/nftables.nix
···
};
networking.nftables.ruleset = mkOption {
type = types.lines;
+
default = "";
example = ''
# Check out https://wiki.nftables.org/ for better documentation.
# Table for both IPv4 and IPv6.
···
name = "nftables-rules";
text = cfg.ruleset;
};
+
defaultText = literalDocBook ''a file with the contents of <option>networking.nftables.ruleset</option>'';
description =
''
The ruleset file to be used with nftables. Should be in a format that
+1 -1
nixos/modules/services/networking/ngircd.nix
···
type = types.package;
default = pkgs.ngircd;
-
defaultText = "pkgs.ngircd";
+
defaultText = literalExpression "pkgs.ngircd";
};
};
};
-1
nixos/modules/services/networking/nixops-dns.nix
···
For example "ops" will resolve "vm.ops".
'';
-
example = "ops";
default = "ops";
};
+11 -11
nixos/modules/services/networking/nntp-proxy.nix
···
options = {
username = mkOption {
type = types.str;
-
default = null;
description = ''
Username
'';
···
passwordHash = mkOption {
type = types.str;
-
default = null;
example = "$6$GtzE7FrpE$wwuVgFYU.TZH4Rz.Snjxk9XGua89IeVwPQ/fEUD8eujr40q5Y021yhn0aNcsQ2Ifw.BLclyzvzgegopgKcneL0";
description = ''
SHA-512 password hash (can be generated by
···
'';
default = {};
-
example = literalExample ''
-
"user1" = {
-
passwordHash = "$6$1l0t5Kn2Dk$appzivc./9l/kjq57eg5UCsBKlcfyCr0zNWYNerKoPsI1d7eAwiT0SVsOVx/CTgaBNT/u4fi2vN.iGlPfv1ek0";
-
maxConnections = 5;
-
};
-
"anotheruser" = {
-
passwordHash = "$6$6lwEsWB.TmsS$W7m1riUx4QrA8pKJz8hvff0dnF1NwtZXgdjmGqA1Dx2MDPj07tI9GNcb0SWlMglE.2/hBgynDdAd/XqqtRqVQ0";
-
maxConnections = 7;
-
};
+
example = literalExpression ''
+
{
+
"user1" = {
+
passwordHash = "$6$1l0t5Kn2Dk$appzivc./9l/kjq57eg5UCsBKlcfyCr0zNWYNerKoPsI1d7eAwiT0SVsOVx/CTgaBNT/u4fi2vN.iGlPfv1ek0";
+
maxConnections = 5;
+
};
+
"anotheruser" = {
+
passwordHash = "$6$6lwEsWB.TmsS$W7m1riUx4QrA8pKJz8hvff0dnF1NwtZXgdjmGqA1Dx2MDPj07tI9GNcb0SWlMglE.2/hBgynDdAd/XqqtRqVQ0";
+
maxConnections = 7;
+
};
+
}
'';
};
};
+4 -4
nixos/modules/services/networking/nomad.nix
···
package = mkOption {
type = types.package;
default = pkgs.nomad;
-
defaultText = "pkgs.nomad";
+
defaultText = literalExpression "pkgs.nomad";
description = ''
The package used for the Nomad agent and CLI.
'';
···
description = ''
Extra packages to add to <envar>PATH</envar> for the Nomad agent process.
'';
-
example = literalExample ''
+
example = literalExpression ''
with pkgs; [ cni-plugins ]
'';
};
···
description = ''
Additional settings paths used to configure nomad. These can be files or directories.
'';
-
example = literalExample ''
+
example = literalExpression ''
[ "/etc/nomad-mutable.json" "/run/keys/nomad-with-secrets.json" "/etc/nomad/config.d" ]
'';
};
···
the <literal>DynamicUser</literal> feature of systemd which directly
manages and operates on <literal>StateDirectory</literal>.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
# A minimal config example:
server = {
+2 -4
nixos/modules/services/networking/nsd.nix
···
data = mkOption {
type = types.lines;
default = "";
-
example = "";
description = ''
The actual zone data. This is the content of your zone file.
Use imports or pkgs.lib.readFile if you don't want this data in your config file.
···
requestXFR = mkOption {
type = types.listOf types.str;
default = [];
-
example = [];
description = ''
Format: <code>[AXFR|UDP] &lt;ip-address&gt; &lt;key-name | NOKEY&gt;</code>
'';
···
};
});
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{ "tsig.example.org" = {
algorithm = "hmac-md5";
keyFile = "/path/to/my/key";
···
zones = mkOption {
type = types.attrsOf zoneOptions;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{ "serverGroup1" = {
provideXFR = [ "10.1.2.3 NOKEY" ];
children = {
+1 -1
nixos/modules/services/networking/ntp/chrony.nix
···
package = mkOption {
type = types.package;
default = pkgs.chrony;
-
defaultText = "pkgs.chrony";
+
defaultText = literalExpression "pkgs.chrony";
description = ''
Which chrony package to use.
'';
+1 -1
nixos/modules/services/networking/ntp/ntpd.nix
···
extraFlags = mkOption {
type = types.listOf types.str;
description = "Extra flags passed to the ntpd command.";
-
example = literalExample ''[ "--interface=eth0" ]'';
+
example = literalExpression ''[ "--interface=eth0" ]'';
default = [];
};
+1 -1
nixos/modules/services/networking/ofono.nix
···
plugins = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "[ pkgs.modem-manager-gui ]";
+
example = literalExpression "[ pkgs.modem-manager-gui ]";
description = ''
The list of plugins to install.
'';
+1 -2
nixos/modules/services/networking/onedrive.nix
···
package = lib.mkOption {
type = lib.types.package;
default = pkgs.onedrive;
-
defaultText = "pkgs.onedrive";
-
example = lib.literalExample "pkgs.onedrive";
+
defaultText = lib.literalExpression "pkgs.onedrive";
description = ''
OneDrive package to use.
'';
+1 -1
nixos/modules/services/networking/openvpn.nix
···
services.openvpn.servers = mkOption {
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
server = {
config = '''
+2 -2
nixos/modules/services/networking/ostinato.nix
···
include = mkOption {
type = types.listOf types.str;
default = [];
-
example = ''[ "eth*" "lo*" ]'';
+
example = [ "eth*" "lo*" ];
description = ''
For a port to pass the filter and appear on the port list managed
by drone, it be allowed by this include list.
···
exclude = mkOption {
type = types.listOf types.str;
default = [];
-
example = ''[ "usbmon*" "eth0" ]'';
+
example = [ "usbmon*" "eth0" ];
description = ''
A list of ports does not appear on the port list managed by drone.
'';
+1 -1
nixos/modules/services/networking/pdns-recursor.nix
···
settings = mkOption {
type = configType;
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
loglevel = 8;
log-common-errors = true;
+1
nixos/modules/services/networking/pleroma.nix
···
package = mkOption {
type = types.package;
default = pkgs.pleroma;
+
defaultText = literalExpression "pkgs.pleroma";
description = "Pleroma package to use.";
};
+1 -1
nixos/modules/services/networking/pppd.nix
···
package = mkOption {
default = pkgs.ppp;
-
defaultText = "pkgs.ppp";
+
defaultText = literalExpression "pkgs.ppp";
type = types.package;
description = "pppd package to use.";
};
+1 -1
nixos/modules/services/networking/privoxy.nix
···
};
};
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{ # Listen on IPv6 only
listen-address = "[::]:8118";
+2 -2
nixos/modules/services/networking/prosody.nix
···
type = types.package;
description = "Prosody package to use";
default = pkgs.prosody;
-
defaultText = "pkgs.prosody";
-
example = literalExample ''
+
defaultText = literalExpression "pkgs.prosody";
+
example = literalExpression ''
pkgs.prosody.override {
withExtraLibs = [ pkgs.luaPackages.lpty ];
withCommunityModules = [ "auth_external" ];
+1 -2
nixos/modules/services/networking/quassel.nix
···
package = mkOption {
type = types.package;
default = pkgs.quasselDaemon;
-
defaultText = "pkgs.quasselDaemon";
+
defaultText = literalExpression "pkgs.quasselDaemon";
description = ''
The package of the quassel daemon.
'';
-
example = literalExample "pkgs.quasselDaemon";
};
interfaces = mkOption {
+2 -2
nixos/modules/services/networking/quorum.nix
···
{ config, pkgs, lib, ... }:
let
-
inherit (lib) mkEnableOption mkIf mkOption literalExample types optionalString;
+
inherit (lib) mkEnableOption mkIf mkOption literalExpression types optionalString;
cfg = config.services.quorum;
dataDir = "/var/lib/quorum";
···
genesis = mkOption {
type = types.nullOr types.attrs;
default = null;
-
example = literalExample '' {
+
example = literalExpression '' {
alloc = {
a47385db68718bdcbddc2d2bb7c54018066ec111 = {
balance = "1000000000000000000000000000";
+3 -3
nixos/modules/services/networking/radicale.nix
···
# warnings about incompatible configuration and storage formats.
type = with types; nullOr package // { inherit (package) description; };
default = null;
-
defaultText = "pkgs.radicale";
+
defaultText = literalExpression "pkgs.radicale";
};
config = mkOption {
···
<link xlink:href="https://radicale.org/3.0.html#documentation/configuration" />.
This option is mutually exclusive with <option>config</option>.
'';
-
example = literalExample ''
+
example = literalExpression ''
server = {
hosts = [ "0.0.0.0:5232" "[::]:5232" ];
};
···
<option>settings.rights.file</option> to approriate values.
'';
default = { };
-
example = literalExample ''
+
example = literalExpression ''
root = {
user = ".+";
collection = "";
+3 -3
nixos/modules/services/networking/searx.nix
···
settings = mkOption {
type = types.attrsOf settingType;
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{ server.port = 8080;
server.bind_address = "0.0.0.0";
server.secret_key = "@SEARX_SECRET_KEY@";
···
package = mkOption {
type = types.package;
default = pkgs.searx;
-
defaultText = "pkgs.searx";
+
defaultText = literalExpression "pkgs.searx";
description = "searx package to use.";
};
···
uwsgiConfig = mkOption {
type = options.services.uwsgi.instance.type;
default = { http = ":8080"; };
-
example = literalExample ''
+
example = literalExpression ''
{
disable-logging = true;
http = ":8080"; # serve via HTTP...
+4 -6
nixos/modules/services/networking/shadowsocks.nix
···
plugin = mkOption {
type = types.nullOr types.str;
default = null;
-
example = "\${pkgs.shadowsocks-v2ray-plugin}/bin/v2ray-plugin";
+
example = literalExpression ''"''${pkgs.shadowsocks-v2ray-plugin}/bin/v2ray-plugin"'';
description = ''
SIP003 plugin for shadowsocks
'';
···
extraConfig = mkOption {
type = types.attrs;
default = {};
-
example = ''
-
{
-
nameserver = "8.8.8.8";
-
}
-
'';
+
example = {
+
nameserver = "8.8.8.8";
+
};
description = ''
Additional configuration for shadowsocks that is not covered by the
provided options. The provided attrset will be serialized to JSON and
+1 -1
nixos/modules/services/networking/shellhub-agent.nix
···
package = mkOption {
type = types.package;
default = pkgs.shellhub-agent;
-
defaultText = "pkgs.shellhub-agent";
+
defaultText = literalExpression "pkgs.shellhub-agent";
description = ''
Which ShellHub Agent package to use.
'';
+1 -1
nixos/modules/services/networking/shorewall.nix
···
package = lib.mkOption {
type = types.package;
default = pkgs.shorewall;
-
defaultText = "pkgs.shorewall";
+
defaultText = lib.literalExpression "pkgs.shorewall";
description = "The shorewall package to use.";
};
configs = lib.mkOption {
+1 -1
nixos/modules/services/networking/shorewall6.nix
···
package = lib.mkOption {
type = types.package;
default = pkgs.shorewall;
-
defaultText = "pkgs.shorewall";
+
defaultText = lib.literalExpression "pkgs.shorewall";
description = "The shorewall package to use.";
};
configs = lib.mkOption {
+1 -1
nixos/modules/services/networking/skydns.nix
···
package = mkOption {
default = pkgs.skydns;
-
defaultText = "pkgs.skydns";
+
defaultText = literalExpression "pkgs.skydns";
type = types.package;
description = "Skydns package to use.";
};
+1 -1
nixos/modules/services/networking/smartdns.nix
···
type =
let atom = oneOf [ str int bool ];
in attrsOf (coercedTo atom toList (listOf atom));
-
example = literalExample ''
+
example = literalExpression ''
{
bind = ":5353 -no-rule -group example";
cache-size = 4096;
+9 -8
nixos/modules/services/networking/smokeping.nix
···
to = root@localhost
from = smokeping@localhost
'';
-
example = literalExample ''
+
example = ''
to = alertee@address.somewhere
from = smokealert@company.xy
···
cgiUrl = mkOption {
type = types.str;
default = "http://${cfg.hostName}:${toString cfg.port}/smokeping.cgi";
-
defaultText = "http://\${hostName}:\${toString port}/smokeping.cgi";
+
defaultText = literalExpression ''"http://''${hostName}:''${toString port}/smokeping.cgi"'';
example = "https://somewhere.example.com/smokeping.cgi";
description = "URL to the smokeping cgi.";
};
···
MIN 0.5 144 720
'';
-
example = literalExample ''
+
example = ''
# near constant pings.
step = 30
pings = 20
···
hostName = mkOption {
type = types.str;
default = config.networking.fqdn;
-
defaultText = "\${config.networking.fqdn}";
+
defaultText = literalExpression "config.networking.fqdn";
example = "somewhere.example.com";
description = "DNS name for the urls generated in the cgi.";
};
imgUrl = mkOption {
type = types.str;
default = "http://${cfg.hostName}:${toString cfg.port}/cache";
-
defaultText = "http://\${hostName}:\${toString port}/cache";
+
defaultText = literalExpression ''"http://''${hostName}:''${toString port}/cache"'';
example = "https://somewhere.example.com/cache";
description = "Base url for images generated in the cgi.";
};
···
ownerEmail = mkOption {
type = types.str;
default = "no-reply@${cfg.hostName}";
-
defaultText = "no-reply@\${hostName}";
+
defaultText = literalExpression ''"no-reply@''${hostName}"'';
example = "no-reply@yourdomain.com";
description = "Email contact for owner";
};
package = mkOption {
type = types.package;
default = pkgs.smokeping;
-
defaultText = "pkgs.smokeping";
+
defaultText = literalExpression "pkgs.smokeping";
description = "Specify a custom smokeping package";
};
port = mkOption {
type = types.int;
default = 8081;
-
example = 8081;
description = "TCP port to use for the web server.";
};
presentationConfig = mkOption {
···
presentationTemplate = mkOption {
type = types.str;
default = "${pkgs.smokeping}/etc/basepage.html.dist";
+
defaultText = literalExpression ''"''${pkgs.smokeping}/etc/basepage.html.dist"'';
description = "Default page layout for the web UI.";
};
probeConfig = mkOption {
···
smokeMailTemplate = mkOption {
type = types.str;
default = "${cfg.package}/etc/smokemail.dist";
+
defaultText = literalExpression ''"''${package}/etc/smokemail.dist"'';
description = "Specify the smokemail template for alerts.";
};
targetConfig = mkOption {
+2 -2
nixos/modules/services/networking/sniproxy.nix
···
type = types.lines;
default = "";
description = "sniproxy.conf configuration excluding the daemon username and pid file.";
-
example = literalExample ''
+
example = ''
error_log {
filename /var/log/sniproxy/error.log
}
···
table {
example.com 192.0.2.10
example.net 192.0.2.20
-
}
+
}
'';
};
+1 -1
nixos/modules/services/networking/softether.nix
···
package = mkOption {
type = types.package;
default = pkgs.softether;
-
defaultText = "pkgs.softether";
+
defaultText = literalExpression "pkgs.softether";
description = ''
softether derivation to use.
'';
+2 -2
nixos/modules/services/networking/spacecookie.nix
···
package = mkOption {
type = types.package;
default = pkgs.spacecookie;
-
defaultText = literalExample "pkgs.spacecookie";
-
example = literalExample "pkgs.haskellPackages.spacecookie";
+
defaultText = literalExpression "pkgs.spacecookie";
+
example = literalExpression "pkgs.haskellPackages.spacecookie";
description = ''
The spacecookie derivation to use. This can be used to
override the used package or to use another version.
+1 -1
nixos/modules/services/networking/spiped.nix
···
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
pipe1 =
{ keyfile = "/var/lib/spiped/pipe1.key";
+1 -1
nixos/modules/services/networking/strongswan-swanctl/module.nix
···
package = mkOption {
type = types.package;
default = pkgs.strongswan;
-
defaultText = "pkgs.strongswan";
+
defaultText = literalExpression "pkgs.strongswan";
description = ''
The strongswan derivation to use.
'';
+2 -2
nixos/modules/services/networking/strongswan.nix
···
inherit (builtins) toFile;
inherit (lib) concatMapStringsSep concatStringsSep mapAttrsToList
-
mkIf mkEnableOption mkOption types literalExample;
+
mkIf mkEnableOption mkOption types literalExpression;
cfg = config.services.strongswan;
···
connections = mkOption {
type = types.attrsOf (types.attrsOf types.str);
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"%default" = {
keyexchange = "ikev2";
+1
nixos/modules/services/networking/stunnel.nix
···
CAFile = mkOption {
type = types.nullOr types.path;
default = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
+
defaultText = literalExpression ''"''${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"'';
description = "Path to a file containing certificates to validate against.";
};
+2 -2
nixos/modules/services/networking/supplicant.nix
···
path = mkOption {
type = types.nullOr types.path;
default = null;
-
example = literalExample "/etc/wpa_supplicant.conf";
+
example = literalExpression "/etc/wpa_supplicant.conf";
description = ''
External <literal>wpa_supplicant.conf</literal> configuration file.
The configuration options defined declaratively within <literal>networking.supplicant</literal> have
···
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{ "wlan0 wlan1" = {
configFile.path = "/etc/wpa_supplicant.conf";
userControlled.group = "network";
+4 -3
nixos/modules/services/networking/supybot.nix
···
default = if versionAtLeast config.system.stateVersion "20.09"
then "/var/lib/supybot"
else "/home/supybot";
-
defaultText = "/var/lib/supybot";
+
defaultText = literalExpression "/var/lib/supybot";
description = "The root directory, logs and plugins are stored here";
};
···
Please note that you still need to add the plugins to the config
file (or with <literal>!load</literal>) using their attribute name.
'';
-
example = literalExample ''
+
example = literalExpression ''
let
plugins = pkgs.fetchzip {
url = "https://github.com/ProgVal/Supybot-plugins/archive/57c2450c.zip";
···
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = p: [];
+
defaultText = literalExpression "p: []";
description = ''
Extra Python packages available to supybot plugins. The
value must be a function which receives the attrset defined
in <varname>python3Packages</varname> as the sole argument.
'';
-
example = literalExample "p: [ p.lxml p.requests ]";
+
example = literalExpression "p: [ p.lxml p.requests ]";
};
};
+5 -5
nixos/modules/services/networking/syncthing.nix
···
will be reverted on restart if <link linkend="opt-services.syncthing.overrideDevices">overrideDevices</link>
is enabled.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
"/home/user/sync" = {
id = "syncme";
···
There are 4 different types of versioning with different parameters.
See <link xlink:href="https://docs.syncthing.net/users/versioning.html"/>.
'';
-
example = literalExample ''
+
example = literalExpression ''
[
{
versioning = {
···
description = ''
The path where the settings and keys will exist.
'';
-
default = cfg.dataDir + (optionalString cond "/.config/syncthing");
-
defaultText = literalExample "dataDir${optionalString cond " + \"/.config/syncthing\""}";
+
default = cfg.dataDir + optionalString cond "/.config/syncthing";
+
defaultText = literalExpression "dataDir${optionalString cond " + \"/.config/syncthing\""}";
};
extraFlags = mkOption {
···
package = mkOption {
type = types.package;
default = pkgs.syncthing;
-
defaultText = literalExample "pkgs.syncthing";
+
defaultText = literalExpression "pkgs.syncthing";
description = ''
The Syncthing package to use.
'';
+1 -1
nixos/modules/services/networking/tailscale.nix
···
package = mkOption {
type = types.package;
default = pkgs.tailscale;
-
defaultText = "pkgs.tailscale";
+
defaultText = literalExpression "pkgs.tailscale";
description = "The package to use for tailscale";
};
};
+1 -1
nixos/modules/services/networking/tedicross.nix
···
config = mkOption {
type = types.attrs;
# from https://github.com/TediCross/TediCross/blob/master/example.settings.yaml
-
example = literalExample ''
+
example = literalExpression ''
{
telegram = {
useFirstNameInsteadOfUsername = false;
+1 -1
nixos/modules/services/networking/thelounge.nix
···
extraConfig = mkOption {
default = {};
type = types.attrs;
-
example = literalExample ''{
+
example = literalExpression ''{
reverseProxy = true;
defaults = {
name = "Your Network";
+3 -3
nixos/modules/services/networking/tinc.nix
···
hostSettings = mkOption {
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
host1 = {
addresses = [
···
package = mkOption {
type = types.package;
default = pkgs.tinc_pre;
-
defaultText = "pkgs.tinc_pre";
+
defaultText = literalExpression "pkgs.tinc_pre";
description = ''
The package to use for the tinc daemon's binary.
'';
···
settings = mkOption {
default = { };
type = types.submodule { freeformType = tincConfType; };
-
example = literalExample ''
+
example = literalExpression ''
{
Interface = "custom.interface";
DirectOnly = true;
+1 -1
nixos/modules/services/networking/toxvpn.nix
···
auto_add_peers = mkOption {
type = types.listOf types.str;
default = [];
-
example = ''[ "toxid1" "toxid2" ]'';
+
example = [ "toxid1" "toxid2" ];
description = "peers to automatically connect to on startup";
};
};
+1 -1
nixos/modules/services/networking/trickster.nix
···
package = mkOption {
type = types.package;
default = pkgs.trickster;
-
defaultText = "pkgs.trickster";
+
defaultText = literalExpression "pkgs.trickster";
description = ''
Package that should be used for trickster.
'';
+5 -5
nixos/modules/services/networking/ucarp.nix
···
Command to run after become master, the interface name, virtual address
and optional extra parameters are passed as arguments.
'';
-
example = ''
+
example = literalExpression ''
pkgs.writeScript "upscript" '''
#!/bin/sh
-
$\{pkgs.iproute2\}/bin/ip addr add "$2"/24 dev "$1"
+
''${pkgs.iproute2}/bin/ip addr add "$2"/24 dev "$1"
''';
'';
};
···
Command to run after become backup, the interface name, virtual address
and optional extra parameters are passed as arguments.
'';
-
example = ''
+
example = literalExpression ''
pkgs.writeScript "downscript" '''
#!/bin/sh
-
$\{pkgs.iproute2\}/bin/ip addr del "$2"/24 dev "$1"
+
''${pkgs.iproute2}/bin/ip addr del "$2"/24 dev "$1"
''';
'';
};
···
upstream updates for a long time and can be considered as unmaintained.
'';
default = pkgs.ucarp;
-
defaultText = "pkgs.ucarp";
+
defaultText = literalExpression "pkgs.ucarp";
};
};
+2 -2
nixos/modules/services/networking/unbound.nix
···
package = mkOption {
type = types.package;
default = pkgs.unbound-with-systemd;
-
defaultText = "pkgs.unbound-with-systemd";
+
defaultText = literalExpression "pkgs.unbound-with-systemd";
description = "The unbound package to use";
};
···
};
};
};
-
example = literalExample ''
+
example = literalExpression ''
{
server = {
interface = [ "127.0.0.1" ];
+3 -3
nixos/modules/services/networking/unifi.nix
···
services.unifi.jrePackage = mkOption {
type = types.package;
default = pkgs.jre8;
-
defaultText = "pkgs.jre8";
+
defaultText = literalExpression "pkgs.jre8";
description = ''
The JRE package to use. Check the release notes to ensure it is supported.
'';
···
services.unifi.unifiPackage = mkOption {
type = types.package;
default = pkgs.unifiLTS;
-
defaultText = "pkgs.unifiLTS";
+
defaultText = literalExpression "pkgs.unifiLTS";
description = ''
The unifi package to use.
'';
···
services.unifi.mongodbPackage = mkOption {
type = types.package;
default = pkgs.mongodb;
-
defaultText = "pkgs.mongodb";
+
defaultText = literalExpression "pkgs.mongodb";
description = ''
The mongodb package to use.
'';
+1 -1
nixos/modules/services/networking/vsftpd.nix
···
userlistFile = mkOption {
type = types.path;
default = pkgs.writeText "userlist" (concatMapStrings (x: "${x}\n") cfg.userlist);
-
defaultText = "pkgs.writeText \"userlist\" (concatMapStrings (x: \"\${x}\n\") cfg.userlist)";
+
defaultText = literalExpression ''pkgs.writeText "userlist" (concatMapStrings (x: "''${x}\n") cfg.userlist)'';
description = ''
Newline separated list of names to be allowed/denied if <option>userlistEnable</option>
is <literal>true</literal>. Meaning see <option>userlistDeny</option>.
+1 -1
nixos/modules/services/networking/websockify.nix
···
sslKey = mkOption {
description = "Path to the SSL key.";
default = cfg.sslCert;
-
defaultText = "config.services.networking.websockify.sslCert";
+
defaultText = literalExpression "config.services.networking.websockify.sslCert";
type = types.path;
};
+4 -12
nixos/modules/services/networking/wg-quick.nix
···
};
preUp = mkOption {
-
example = literalExample ''
-
${pkgs.iproute2}/bin/ip netns add foo
-
'';
+
example = literalExpression ''"''${pkgs.iproute2}/bin/ip netns add foo"'';
default = "";
type = with types; coercedTo (listOf str) (concatStringsSep "\n") lines;
description = ''
···
};
preDown = mkOption {
-
example = literalExample ''
-
${pkgs.iproute2}/bin/ip netns del foo
-
'';
+
example = literalExpression ''"''${pkgs.iproute2}/bin/ip netns del foo"'';
default = "";
type = with types; coercedTo (listOf str) (concatStringsSep "\n") lines;
description = ''
···
};
postUp = mkOption {
-
example = literalExample ''
-
${pkgs.iproute2}/bin/ip netns add foo
-
'';
+
example = literalExpression ''"''${pkgs.iproute2}/bin/ip netns add foo"'';
default = "";
type = with types; coercedTo (listOf str) (concatStringsSep "\n") lines;
description = ''
···
};
postDown = mkOption {
-
example = literalExample ''
-
${pkgs.iproute2}/bin/ip netns del foo
-
'';
+
example = literalExpression ''"''${pkgs.iproute2}/bin/ip netns del foo"'';
default = "";
type = with types; coercedTo (listOf str) (concatStringsSep "\n") lines;
description = ''
+4 -6
nixos/modules/services/networking/wireguard.nix
···
};
preSetup = mkOption {
-
example = literalExample ''
-
${pkgs.iproute2}/bin/ip netns add foo
-
'';
+
example = literalExpression ''"''${pkgs.iproute2}/bin/ip netns add foo"'';
default = "";
type = with types; coercedTo (listOf str) (concatStringsSep "\n") lines;
description = ''
···
};
postSetup = mkOption {
-
example = literalExample ''
-
printf "nameserver 10.200.100.1" | ${pkgs.openresolv}/bin/resolvconf -a wg0 -m 0
+
example = literalExpression ''
+
'''printf "nameserver 10.200.100.1" | ''${pkgs.openresolv}/bin/resolvconf -a wg0 -m 0'''
'';
default = "";
type = with types; coercedTo (listOf str) (concatStringsSep "\n") lines;
···
};
postShutdown = mkOption {
-
example = literalExample "${pkgs.openresolv}/bin/resolvconf -d wg0";
+
example = literalExpression ''"''${pkgs.openresolv}/bin/resolvconf -d wg0"'';
default = "";
type = with types; coercedTo (listOf str) (concatStringsSep "\n") lines;
description = "Commands called after shutting down the interface.";
+2 -2
nixos/modules/services/networking/wpa_supplicant.nix
···
description = ''
Set this to <literal>true</literal> if the SSID of the network is hidden.
'';
-
example = literalExample ''
+
example = literalExpression ''
{ echelon = {
hidden = true;
psk = "abcdefgh";
···
/etc/wpa_supplicant.conf as the configuration file.
'';
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{ echelon = { # SSID with no spaces or special characters
psk = "abcdefgh"; # (password will be written to /nix/store!)
};
+8 -7
nixos/modules/services/networking/x2goserver.nix
···
nxagentDefaultOptions = mkOption {
type = types.listOf types.str;
default = [ "-extension GLX" "-nolisten tcp" ];
-
example = [ "-extension GLX" "-nolisten tcp" ];
description = ''
List of default nx agent options.
'';
···
x2goserver.conf ini configuration as nix attributes. See
`x2goserver.conf(5)` for details
'';
-
example = literalExample ''
-
superenicer = {
-
"enable" = "yes";
-
"idle-nice-level" = 19;
-
};
-
telekinesis = { "enable" = "no"; };
+
example = literalExpression ''
+
{
+
superenicer = {
+
"enable" = "yes";
+
"idle-nice-level" = 19;
+
};
+
telekinesis = { "enable" = "no"; };
+
}
'';
};
};
+2 -2
nixos/modules/services/networking/xandikos.nix
···
package = mkOption {
type = types.package;
default = pkgs.xandikos;
-
defaultText = "pkgs.xandikos";
+
defaultText = literalExpression "pkgs.xandikos";
description = "The Xandikos package to use.";
};
···
extraOptions = mkOption {
default = [];
type = types.listOf types.str;
-
example = literalExample ''
+
example = literalExpression ''
[ "--autocreate"
"--defaults"
"--current-user-principal user"
+1 -1
nixos/modules/services/networking/xrdp.nix
···
package = mkOption {
type = types.package;
default = pkgs.xrdp;
-
defaultText = "pkgs.xrdp";
+
defaultText = literalExpression "pkgs.xrdp";
description = ''
The package to use for the xrdp daemon's binary.
'';
+1 -1
nixos/modules/services/networking/yggdrasil.nix
···
package = mkOption {
type = package;
default = pkgs.yggdrasil;
-
defaultText = "pkgs.yggdrasil";
+
defaultText = literalExpression "pkgs.yggdrasil";
description = "Yggdrasil package to use.";
};
+2 -4
nixos/modules/services/networking/zeronet.nix
···
{ config, lib, pkgs, ... }:
let
-
inherit (lib) generators literalExample mkEnableOption mkIf mkOption recursiveUpdate types;
+
inherit (lib) generators literalExpression mkEnableOption mkIf mkOption recursiveUpdate types;
cfg = config.services.zeronet;
dataDir = "/var/lib/zeronet";
configFile = pkgs.writeText "zeronet.conf" (generators.toINI {} (recursiveUpdate defaultSettings cfg.settings));
···
settings = mkOption {
type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
default = {};
-
example = literalExample "global.tor = enable;";
+
example = literalExpression "{ global.tor = enable; }";
description = ''
<filename>zeronet.conf</filename> configuration. Refer to
···
port = mkOption {
type = types.port;
default = 43110;
-
example = 43110;
description = "Optional zeronet web UI port.";
};
···
# read-only config file and crashes
type = types.port;
default = 12261;
-
example = 12261;
description = "Zeronet fileserver port.";
};
+1 -2
nixos/modules/services/networking/zerotierone.nix
···
options.services.zerotierone.port = mkOption {
default = 9993;
-
example = 9993;
type = types.int;
description = ''
Network port used by ZeroTier.
···
options.services.zerotierone.package = mkOption {
default = pkgs.zerotierone;
-
defaultText = "pkgs.zerotierone";
+
defaultText = literalExpression "pkgs.zerotierone";
type = types.package;
description = ''
ZeroTier One package to use.
+3 -3
nixos/modules/services/networking/znc/default.nix
···
config = mkOption {
type = semanticTypes.zncConf;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
LoadModule = [ "webadmin" "adminlog" ];
User.paul = {
···
configFile = mkOption {
type = types.path;
-
example = "~/.znc/configs/znc.conf";
+
example = literalExpression "~/.znc/configs/znc.conf";
description = ''
Configuration file for ZNC. It is recommended to use the
<option>config</option> option instead.
···
modulePackages = mkOption {
type = types.listOf types.package;
default = [ ];
-
example = literalExample "[ pkgs.zncModules.fish pkgs.zncModules.push ]";
+
example = literalExpression "[ pkgs.zncModules.fish pkgs.zncModules.push ]";
description = ''
A list of global znc module packages to add to znc.
'';
+3 -3
nixos/modules/services/networking/znc/options.nix
···
modules = mkOption {
type = types.listOf types.str;
default = [ "simple_away" ];
-
example = literalExample ''[ "simple_away" "sasl" ]'';
+
example = literalExpression ''[ "simple_away" "sasl" ]'';
description = ''
ZNC network modules to load.
'';
···
description = ''
IRC networks to connect the user to.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
"libera" = {
server = "irc.libera.chat";
···
};
passBlock = mkOption {
-
example = literalExample ''
+
example = ''
&lt;Pass password&gt;
Method = sha256
Hash = e2ce303c7ea75c571d80d8540a8699b46535be6a085be3414947d638e48d9e93
+1 -1
nixos/modules/services/printing/cupsd.nix
···
drivers = mkOption {
type = types.listOf types.path;
default = [];
-
example = literalExample "with pkgs; [ gutenprint hplip splix ]";
+
example = literalExpression "with pkgs; [ gutenprint hplip splix ]";
description = ''
CUPS drivers to use. Drivers provided by CUPS, cups-filters,
Ghostscript and Samba are added unconditionally. If this list contains
+1 -1
nixos/modules/services/scheduling/cron.nix
···
systemCronJobs = mkOption {
type = types.listOf types.str;
default = [];
-
example = literalExample ''
+
example = literalExpression ''
[ "* * * * * test ls -l / > /tmp/cronout 2>&1"
"* * * * * eelco echo Hello World > /home/eelco/cronout"
]
+2 -2
nixos/modules/services/search/elasticsearch.nix
···
package = mkOption {
description = "Elasticsearch package to use.";
default = pkgs.elasticsearch;
-
defaultText = "pkgs.elasticsearch";
+
defaultText = literalExpression "pkgs.elasticsearch";
type = types.package;
};
···
description = "Extra elasticsearch plugins";
default = [ ];
type = types.listOf types.package;
-
example = lib.literalExample "[ pkgs.elasticsearchPlugins.discovery-ec2 ]";
+
example = lib.literalExpression "[ pkgs.elasticsearchPlugins.discovery-ec2 ]";
};
};
+13 -11
nixos/modules/services/search/hound.nix
···
package = mkOption {
default = pkgs.hound;
-
defaultText = "pkgs.hound";
+
defaultText = literalExpression "pkgs.hound";
type = types.package;
description = ''
Package for running hound.
···
The full configuration of the Hound daemon. Note the dbpath
should be an absolute path to a writable location on disk.
'';
-
example = ''
-
{
-
"max-concurrent-indexers" : 2,
-
"dbpath" : "''${services.hound.home}/data",
-
"repos" : {
-
"nixpkgs": {
-
"url" : "https://www.github.com/NixOS/nixpkgs.git"
-
}
-
}
-
}
+
example = literalExpression ''
+
'''
+
{
+
"max-concurrent-indexers" : 2,
+
"dbpath" : "''${services.hound.home}/data",
+
"repos" : {
+
"nixpkgs": {
+
"url" : "https://www.github.com/NixOS/nixpkgs.git"
+
}
+
}
+
}
+
'''
'';
};
+1 -2
nixos/modules/services/search/kibana.nix
···
package = mkOption {
description = "Kibana package to use";
default = pkgs.kibana;
-
defaultText = "pkgs.kibana";
-
example = "pkgs.kibana";
+
defaultText = literalExpression "pkgs.kibana";
type = types.package;
};
+1 -1
nixos/modules/services/search/solr.nix
···
package = mkOption {
type = types.package;
default = pkgs.solr;
-
defaultText = "pkgs.solr";
+
defaultText = literalExpression "pkgs.solr";
description = "Which Solr package to use.";
};
+2 -2
nixos/modules/services/security/certmgr.nix
···
package = mkOption {
type = types.package;
default = pkgs.certmgr;
-
defaultText = "pkgs.certmgr";
+
defaultText = literalExpression "pkgs.certmgr";
description = "Which certmgr package to use in the service.";
};
···
specs = mkOption {
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
exampleCert =
let
+2 -2
nixos/modules/services/security/cfssl.nix
···
};
ca = mkOption {
-
defaultText = "\${cfg.dataDir}/ca.pem";
+
defaultText = literalExpression ''"''${cfg.dataDir}/ca.pem"'';
type = types.str;
description = "CA used to sign the new certificate -- accepts '[file:]fname' or 'env:varname'.";
};
caKey = mkOption {
-
defaultText = "file:\${cfg.dataDir}/ca-key.pem";
+
defaultText = literalExpression ''"file:''${cfg.dataDir}/ca-key.pem"'';
type = types.str;
description = "CA private key -- accepts '[file:]fname' or 'env:varname'.";
};
+6 -4
nixos/modules/services/security/fail2ban.nix
···
package = mkOption {
default = pkgs.fail2ban;
+
defaultText = literalExpression "pkgs.fail2ban";
type = types.package;
-
example = "pkgs.fail2ban_0_11";
+
example = literalExpression "pkgs.fail2ban_0_11";
description = "The fail2ban package to use for running the fail2ban service.";
};
packageFirewall = mkOption {
default = pkgs.iptables;
+
defaultText = literalExpression "pkgs.iptables";
type = types.package;
-
example = "pkgs.nftables";
+
example = literalExpression "pkgs.nftables";
description = "The firewall package used by fail2ban service.";
};
extraPackages = mkOption {
default = [];
type = types.listOf types.package;
-
example = lib.literalExample "[ pkgs.ipset ]";
+
example = lib.literalExpression "[ pkgs.ipset ]";
description = ''
Extra packages to be made available to the fail2ban service. The example contains
the packages needed by the `iptables-ipset-proto6` action.
···
jails = mkOption {
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{ apache-nohome-iptables = '''
# Block an IP address if it accesses a non-existent
# home directory more than 5 times in 10 minutes,
+2 -2
nixos/modules/services/security/fprintd.nix
···
package = mkOption {
type = types.package;
default = fprintdPkg;
-
defaultText = "if cfg.tod.enable then pkgs.fprintd-tod else pkgs.fprintd";
+
defaultText = literalExpression "if config.services.fprintd.tod.enable then pkgs.fprintd-tod else pkgs.fprintd";
description = ''
fprintd package to use.
'';
···
driver = mkOption {
type = types.package;
-
example = literalExample "pkgs.libfprint-2-tod1-goodix";
+
example = literalExpression "pkgs.libfprint-2-tod1-goodix";
description = ''
Touch OEM Drivers (TOD) package to use.
'';
+1 -1
nixos/modules/services/security/haka.nix
···
package = mkOption {
default = pkgs.haka;
-
defaultText = "pkgs.haka";
+
defaultText = literalExpression "pkgs.haka";
type = types.package;
description = "
Which Haka derivation to use.
+1 -1
nixos/modules/services/security/hockeypuck.nix
···
settings = lib.mkOption {
type = settingsFormat.type;
default = { };
-
example = lib.literalExample ''
+
example = lib.literalExpression ''
{
hockeypuck = {
loglevel = "INFO";
+2 -2
nixos/modules/services/security/nginx-sso.nix
···
package = mkOption {
type = types.package;
default = pkgs.nginx-sso;
-
defaultText = "pkgs.nginx-sso";
+
defaultText = literalExpression "pkgs.nginx-sso";
description = ''
The nginx-sso package that should be used.
'';
···
configuration = mkOption {
type = types.attrsOf types.unspecified;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
listen = { addr = "127.0.0.1"; port = 8080; };
+1 -1
nixos/modules/services/security/oauth2_proxy.nix
···
package = mkOption {
type = types.package;
default = pkgs.oauth2-proxy;
-
defaultText = "pkgs.oauth2-proxy";
+
defaultText = literalExpression "pkgs.oauth2-proxy";
description = ''
The package that provides oauth2-proxy.
'';
-1
nixos/modules/services/security/privacyidea.nix
···
configFile = mkOption {
type = types.path;
-
default = "";
description = ''
Path to PrivacyIDEA LDAP Proxy configuration (proxy.ini).
'';
+1 -1
nixos/modules/services/security/shibboleth-sp.nix
···
configFile = mkOption {
type = types.path;
-
example = "${pkgs.shibboleth-sp}/etc/shibboleth/shibboleth2.xml";
+
example = literalExpression ''"''${pkgs.shibboleth-sp}/etc/shibboleth/shibboleth2.xml"'';
description = "Path to shibboleth config file";
};
+2 -2
nixos/modules/services/security/sks.nix
···
package = mkOption {
default = pkgs.sks;
-
defaultText = "pkgs.sks";
+
defaultText = literalExpression "pkgs.sks";
type = types.package;
description = "Which SKS derivation to use.";
};
···
webroot = mkOption {
type = types.nullOr types.path;
default = "${sksPkg.webSamples}/OpenPKG";
-
defaultText = "\${pkgs.sks.webSamples}/OpenPKG";
+
defaultText = literalExpression ''"''${package.webSamples}/OpenPKG"'';
description = ''
Source directory (will be symlinked, if not null) for the files the
built-in webserver should serve. SKS (''${pkgs.sks.webSamples})
+1
nixos/modules/services/security/step-ca.nix
···
package = lib.mkOption {
type = lib.types.package;
default = pkgs.step-ca;
+
defaultText = lib.literalExpression "pkgs.step-ca";
description = "Which step-ca package to use.";
};
address = lib.mkOption {
+1 -2
nixos/modules/services/security/tor.nix
···
package = mkOption {
type = types.package;
default = pkgs.tor;
-
defaultText = "pkgs.tor";
-
example = literalExample "pkgs.tor";
+
defaultText = literalExpression "pkgs.tor";
description = "Tor package to use.";
};
+1 -1
nixos/modules/services/security/usbguard.nix
···
package = mkOption {
type = types.package;
default = pkgs.usbguard;
-
defaultText = "pkgs.usbguard";
+
defaultText = literalExpression "pkgs.usbguard";
description = ''
The usbguard package to use. If you do not need the Qt GUI, use
<literal>pkgs.usbguard-nox</literal> to save disk space.
+1 -1
nixos/modules/services/security/vault.nix
···
package = mkOption {
type = types.package;
default = pkgs.vault;
-
defaultText = "pkgs.vault";
+
defaultText = literalExpression "pkgs.vault";
description = "This option specifies the vault package to use.";
};
+3 -3
nixos/modules/services/security/vaultwarden/default.nix
···
config = mkOption {
type = attrsOf (nullOr (oneOf [ bool int str ]));
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
domain = "https://bw.domain.tld:8443";
signupsAllowed = true;
···
package = mkOption {
type = package;
default = pkgs.vaultwarden;
-
defaultText = "pkgs.vaultwarden";
+
defaultText = literalExpression "pkgs.vaultwarden";
description = "Vaultwarden package to use.";
};
webVaultPackage = mkOption {
type = package;
default = pkgs.vaultwarden-vault;
-
defaultText = "pkgs.vaultwarden-vault";
+
defaultText = literalExpression "pkgs.vaultwarden-vault";
description = "Web vault package to use.";
};
};
+1 -1
nixos/modules/services/security/yubikey-agent.nix
···
package = mkOption {
type = types.package;
default = pkgs.yubikey-agent;
-
defaultText = "pkgs.yubikey-agent";
+
defaultText = literalExpression "pkgs.yubikey-agent";
description = ''
The package used for the yubikey-agent daemon.
'';
+1 -1
nixos/modules/services/system/saslauthd.nix
···
package = mkOption {
default = pkgs.cyrus_sasl.bin;
-
defaultText = "pkgs.cyrus_sasl.bin";
+
defaultText = literalExpression "pkgs.cyrus_sasl.bin";
type = types.package;
description = "Cyrus SASL package to use.";
};
+2 -2
nixos/modules/services/torrent/deluge.nix
···
config = mkOption {
type = types.attrs;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
download_location = "/srv/torrents/";
max_upload_speed = "1000.0";
···
package = mkOption {
type = types.package;
-
example = literalExample "pkgs.deluge-2_x";
+
example = literalExpression "pkgs.deluge-2_x";
description = ''
Deluge package to use.
'';
+1 -1
nixos/modules/services/torrent/flexget.nix
···
systemScheduler = mkOption {
default = true;
-
example = "false";
+
example = false;
type = types.bool;
description = "When true, execute the runs via the flexget-runner.timer. If false, you have to specify the settings yourself in the YML file.";
};
+1 -1
nixos/modules/services/torrent/magnetico.nix
···
web.credentials = mkOption {
type = types.attrsOf types.str;
default = {};
-
example = lib.literalExample ''
+
example = lib.literalExpression ''
{
myuser = "$2y$12$YE01LZ8jrbQbx6c0s2hdZO71dSjn2p/O9XsYJpz.5968yCysUgiaG";
}
+1 -1
nixos/modules/services/torrent/opentracker.nix
···
opentracker package to use
'';
default = pkgs.opentracker;
-
defaultText = "pkgs.opentracker";
+
defaultText = literalExpression "pkgs.opentracker";
};
extraOptions = mkOption {
+1 -1
nixos/modules/services/torrent/rtorrent.nix
···
package = mkOption {
type = types.package;
default = pkgs.rtorrent;
-
defaultText = "pkgs.rtorrent";
+
defaultText = literalExpression "pkgs.rtorrent";
description = ''
The rtorrent package to use.
'';
+1
nixos/modules/services/ttys/getty.nix
···
loginProgram = mkOption {
type = types.path;
default = "${pkgs.shadow}/bin/login";
+
defaultText = literalExpression ''"''${pkgs.shadow}/bin/login"'';
description = ''
Path to the login binary executed by agetty.
'';
+25 -4
nixos/modules/services/video/epgstation/default.nix
···
passwordFile = mkOption {
type = types.path;
default = pkgs.writeText "epgstation-password" defaultPassword;
+
defaultText = literalDocBook ''a file containing <literal>${defaultPassword}</literal>'';
example = "/run/keys/epgstation-password";
description = ''
A file containing the password for <option>basicAuth.user</option>.
···
passwordFile = mkOption {
type = types.path;
default = pkgs.writeText "epgstation-db-password" defaultPassword;
+
defaultText = literalDocBook ''a file containing <literal>${defaultPassword}</literal>'';
example = "/run/keys/epgstation-db-password";
description = ''
A file containing the password for the database named
···
type = with types; listOf attrs;
description = "Encoding presets for recorded videos.";
default = [
-
{ name = "H264";
+
{
+
name = "H264";
cmd = "${pkgs.epgstation}/libexec/enc.sh main";
suffix = ".mp4";
-
default = true; }
-
{ name = "H264-sub";
+
default = true;
+
}
+
{
+
name = "H264-sub";
cmd = "${pkgs.epgstation}/libexec/enc.sh sub";
-
suffix = "-sub.mp4"; }
+
suffix = "-sub.mp4";
+
}
];
+
defaultText = literalExpression ''
+
[
+
{
+
name = "H264";
+
cmd = "''${pkgs.epgstation}/libexec/enc.sh main";
+
suffix = ".mp4";
+
default = true;
+
}
+
{
+
name = "H264-sub";
+
cmd = "''${pkgs.epgstation}/libexec/enc.sh sub";
+
suffix = "-sub.mp4";
+
}
+
]
+
'';
};
};
};
+3 -3
nixos/modules/services/video/mirakurun.nix
···
serverSettings = mkOption {
type = settingsFmt.type;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
highWaterMark = 25165824;
overflowTimeLimit = 30000;
···
tunerSettings = mkOption {
type = with types; nullOr settingsFmt.type;
default = null;
-
example = literalExample ''
+
example = literalExpression ''
[
{
name = "tuner-name";
···
channelSettings = mkOption {
type = with types; nullOr settingsFmt.type;
default = null;
-
example = literalExample ''
+
example = literalExpression ''
[
{
name = "channel";
+1 -1
nixos/modules/services/video/replay-sorcery.nix
···
type = attrsOf (oneOf [ str int ]);
default = {};
description = "System-wide configuration for ReplaySorcery (/etc/replay-sorcery.conf).";
-
example = literalExample ''
+
example = literalExpression ''
{
videoInput = "hwaccel"; # requires `services.replay-sorcery.enableSysAdminCapability = true`
videoFramerate = 60;
+3 -3
nixos/modules/services/video/unifi-video.nix
···
jrePackage = mkOption {
type = types.package;
default = pkgs.jre8;
-
defaultText = "pkgs.jre8";
+
defaultText = literalExpression "pkgs.jre8";
description = ''
The JRE package to use. Check the release notes to ensure it is supported.
'';
···
unifiVideoPackage = mkOption {
type = types.package;
default = pkgs.unifi-video;
-
defaultText = "pkgs.unifi-video";
+
defaultText = literalExpression "pkgs.unifi-video";
description = ''
The unifi-video package to use.
'';
···
mongodbPackage = mkOption {
type = types.package;
default = pkgs.mongodb-4_0;
-
defaultText = "pkgs.mongodb";
+
defaultText = literalExpression "pkgs.mongodb";
description = ''
The mongodb package to use.
'';
+2 -1
nixos/modules/services/wayland/cage.nix
···
options.services.cage.extraArguments = mkOption {
type = types.listOf types.str;
default = [];
-
defaultText = "[]";
+
defaultText = literalExpression "[]";
description = "Additional command line arguments to pass to Cage.";
example = ["-d"];
};
···
options.services.cage.program = mkOption {
type = types.path;
default = "${pkgs.xterm}/bin/xterm";
+
defaultText = literalExpression ''"''${pkgs.xterm}/bin/xterm"'';
description = ''
Program to run in cage.
'';
+2 -2
nixos/modules/services/web-apps/atlassian/confluence.nix
···
package = mkOption {
type = types.package;
default = pkgs.atlassian-confluence;
-
defaultText = "pkgs.atlassian-confluence";
+
defaultText = literalExpression "pkgs.atlassian-confluence";
description = "Atlassian Confluence package to use.";
};
jrePackage = mkOption {
type = types.package;
default = pkgs.oraclejre8;
-
defaultText = "pkgs.oraclejre8";
+
defaultText = literalExpression "pkgs.oraclejre8";
description = "Note that Atlassian only support the Oracle JRE (JRASERVER-46152).";
};
};
+2 -2
nixos/modules/services/web-apps/atlassian/crowd.nix
···
package = mkOption {
type = types.package;
default = pkgs.atlassian-crowd;
-
defaultText = "pkgs.atlassian-crowd";
+
defaultText = literalExpression "pkgs.atlassian-crowd";
description = "Atlassian Crowd package to use.";
};
jrePackage = mkOption {
type = types.package;
default = pkgs.oraclejre8;
-
defaultText = "pkgs.oraclejre8";
+
defaultText = literalExpression "pkgs.oraclejre8";
description = "Note that Atlassian only support the Oracle JRE (JRASERVER-46152).";
};
};
+2 -2
nixos/modules/services/web-apps/atlassian/jira.nix
···
package = mkOption {
type = types.package;
default = pkgs.atlassian-jira;
-
defaultText = "pkgs.atlassian-jira";
+
defaultText = literalExpression "pkgs.atlassian-jira";
description = "Atlassian JIRA package to use.";
};
jrePackage = mkOption {
type = types.package;
default = pkgs.oraclejre8;
-
defaultText = "pkgs.oraclejre8";
+
defaultText = literalExpression "pkgs.oraclejre8";
description = "Note that Atlassian only support the Oracle JRE (JRASERVER-46152).";
};
};
+11 -9
nixos/modules/services/web-apps/bookstack.nix
···
user = mkOption {
type = types.str;
default = user;
-
defaultText = "\${user}";
+
defaultText = literalExpression "user";
description = "Database username.";
};
passwordFile = mkOption {
···
(import ../web-servers/nginx/vhost-options.nix { inherit config lib; }) {}
);
default = {};
-
example = {
-
serverAliases = [
-
"bookstack.\${config.networking.domain}"
-
];
-
# To enable encryption and let let's encrypt take care of certificate
-
forceSSL = true;
-
enableACME = true;
-
};
+
example = literalExpression ''
+
{
+
serverAliases = [
+
"bookstack.''${config.networking.domain}"
+
];
+
# To enable encryption and let let's encrypt take care of certificate
+
forceSSL = true;
+
enableACME = true;
+
}
+
'';
description = ''
With this option, you can customize the nginx virtualHost settings.
'';
+2 -2
nixos/modules/services/web-apps/cryptpad.nix
···
package = mkOption {
default = pkgs.cryptpad;
-
defaultText = "pkgs.cryptpad";
+
defaultText = literalExpression "pkgs.cryptpad";
type = types.package;
description = "
Cryptpad package to use.
···
configFile = mkOption {
type = types.path;
default = "${cfg.package}/lib/node_modules/cryptpad/config/config.example.js";
-
defaultText = "\${cfg.package}/lib/node_modules/cryptpad/config/config.example.js";
+
defaultText = literalExpression ''"''${package}/lib/node_modules/cryptpad/config/config.example.js"'';
description = ''
Path to the JavaScript configuration file.
+1 -1
nixos/modules/services/web-apps/dex.nix
···
settings = mkOption {
type = settingsFormat.type;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
# External url
issuer = "http://127.0.0.1:5556/dex";
+13 -12
nixos/modules/services/web-apps/discourse.nix
···
apply = p: p.override {
plugins = lib.unique (p.enabledPlugins ++ cfg.plugins);
};
-
defaultText = "pkgs.discourse";
+
defaultText = lib.literalExpression "pkgs.discourse";
description = ''
The discourse package to use.
'';
···
config.networking.fqdn
else
config.networking.hostName;
-
defaultText = "config.networking.fqdn";
+
defaultText = lib.literalExpression "config.networking.fqdn";
example = "discourse.example.com";
description = ''
The hostname to serve Discourse on.
···
enableACME = lib.mkOption {
type = lib.types.bool;
default = cfg.sslCertificate == null && cfg.sslCertificateKey == null;
-
defaultText = "true, unless services.discourse.sslCertificate and services.discourse.sslCertificateKey are set.";
+
defaultText = lib.literalDocBook ''
+
<literal>true</literal>, unless <option>services.discourse.sslCertificate</option>
+
and <option>services.discourse.sslCertificateKey</option> are set.
+
'';
description = ''
Whether an ACME certificate should be used to secure
connections to the server.
···
backendSettings = lib.mkOption {
type = with lib.types; attrsOf (nullOr (oneOf [ str int bool float ]));
default = {};
-
example = lib.literalExample ''
+
example = lib.literalExpression ''
{
max_reqs_per_ip_per_minute = 300;
max_reqs_per_ip_per_10_seconds = 60;
···
siteSettings = lib.mkOption {
type = json.type;
default = {};
-
example = lib.literalExample ''
+
example = lib.literalExpression ''
{
required = {
title = "My Cats";
···
notificationEmailAddress = lib.mkOption {
type = lib.types.str;
default = "${if cfg.mail.incoming.enable then "notifications" else "noreply"}@${cfg.hostname}";
-
defaultText = ''
-
"notifications@`config.services.discourse.hostname`" if
-
config.services.discourse.mail.incoming.enable is "true",
-
otherwise "noreply`config.services.discourse.hostname`"
+
defaultText = lib.literalExpression ''
+
"''${if config.services.discourse.mail.incoming.enable then "notifications" else "noreply"}@''${config.services.discourse.hostname}"
'';
description = ''
The <literal>from:</literal> email address used when
···
replyEmailAddress = lib.mkOption {
type = lib.types.str;
default = "%{reply_key}@${cfg.hostname}";
-
defaultText = "%{reply_key}@`config.services.discourse.hostname`";
+
defaultText = lib.literalExpression ''"%{reply_key}@''${config.services.discourse.hostname}"'';
description = ''
Template for reply by email incoming email address, for
example: %{reply_key}@reply.example.com or
···
mailReceiverPackage = lib.mkOption {
type = lib.types.package;
default = pkgs.discourse-mail-receiver;
-
defaultText = "pkgs.discourse-mail-receiver";
+
defaultText = lib.literalExpression "pkgs.discourse-mail-receiver";
description = ''
The discourse-mail-receiver package to use.
'';
···
plugins = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [];
-
example = lib.literalExample ''
+
example = lib.literalExpression ''
with config.services.discourse.package.plugins; [
discourse-canned-replies
discourse-github
+1
nixos/modules/services/web-apps/documize.nix
···
package = mkOption {
type = types.package;
default = pkgs.documize-community;
+
defaultText = literalExpression "pkgs.documize-community";
description = ''
Which package to use for documize.
'';
+33 -32
nixos/modules/services/web-apps/dokuwiki.nix
···
let
inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types maintainers recursiveUpdate;
-
inherit (lib) any attrValues concatMapStrings concatMapStringsSep flatten literalExample;
+
inherit (lib) any attrValues concatMapStrings concatMapStringsSep flatten literalExpression;
inherit (lib) filterAttrs mapAttrs mapAttrs' mapAttrsToList nameValuePair optional optionalAttrs optionalString;
cfg = migrateOldAttrs config.services.dokuwiki;
···
package = mkOption {
type = types.package;
default = pkgs.dokuwiki;
+
defaultText = literalExpression "pkgs.dokuwiki";
description = "Which DokuWiki package to use.";
};
···
List of path(s) to respective plugin(s) which are copied from the 'plugin' directory.
<note><para>These plugins need to be packaged before use, see example.</para></note>
'';
-
example = ''
-
# Let's package the icalevents plugin
-
plugin-icalevents = pkgs.stdenv.mkDerivation {
-
name = "icalevents";
-
# Download the plugin from the dokuwiki site
-
src = pkgs.fetchurl {
-
url = "https://github.com/real-or-random/dokuwiki-plugin-icalevents/releases/download/2017-06-16/dokuwiki-plugin-icalevents-2017-06-16.zip";
-
sha256 = "e40ed7dd6bbe7fe3363bbbecb4de481d5e42385b5a0f62f6a6ce6bf3a1f9dfa8";
+
example = literalExpression ''
+
let
+
# Let's package the icalevents plugin
+
plugin-icalevents = pkgs.stdenv.mkDerivation {
+
name = "icalevents";
+
# Download the plugin from the dokuwiki site
+
src = pkgs.fetchurl {
+
url = "https://github.com/real-or-random/dokuwiki-plugin-icalevents/releases/download/2017-06-16/dokuwiki-plugin-icalevents-2017-06-16.zip";
+
sha256 = "e40ed7dd6bbe7fe3363bbbecb4de481d5e42385b5a0f62f6a6ce6bf3a1f9dfa8";
+
};
+
sourceRoot = ".";
+
# We need unzip to build this package
+
buildInputs = [ pkgs.unzip ];
+
# Installing simply means copying all files to the output directory
+
installPhase = "mkdir -p $out; cp -R * $out/";
};
-
sourceRoot = ".";
-
# We need unzip to build this package
-
buildInputs = [ pkgs.unzip ];
-
# Installing simply means copying all files to the output directory
-
installPhase = "mkdir -p $out; cp -R * $out/";
-
};
-
# And then pass this theme to the plugin list like this:
-
plugins = [ plugin-icalevents ];
+
in [ plugin-icalevents ]
'';
};
···
List of path(s) to respective template(s) which are copied from the 'tpl' directory.
<note><para>These templates need to be packaged before use, see example.</para></note>
'';
-
example = ''
-
# Let's package the bootstrap3 theme
-
template-bootstrap3 = pkgs.stdenv.mkDerivation {
-
name = "bootstrap3";
-
# Download the theme from the dokuwiki site
-
src = pkgs.fetchurl {
-
url = "https://github.com/giterlizzi/dokuwiki-template-bootstrap3/archive/v2019-05-22.zip";
-
sha256 = "4de5ff31d54dd61bbccaf092c9e74c1af3a4c53e07aa59f60457a8f00cfb23a6";
+
example = literalExpression ''
+
let
+
# Let's package the bootstrap3 theme
+
template-bootstrap3 = pkgs.stdenv.mkDerivation {
+
name = "bootstrap3";
+
# Download the theme from the dokuwiki site
+
src = pkgs.fetchurl {
+
url = "https://github.com/giterlizzi/dokuwiki-template-bootstrap3/archive/v2019-05-22.zip";
+
sha256 = "4de5ff31d54dd61bbccaf092c9e74c1af3a4c53e07aa59f60457a8f00cfb23a6";
+
};
+
# We need unzip to build this package
+
buildInputs = [ pkgs.unzip ];
+
# Installing simply means copying all files to the output directory
+
installPhase = "mkdir -p $out; cp -R * $out/";
};
-
# We need unzip to build this package
-
buildInputs = [ pkgs.unzip ];
-
# Installing simply means copying all files to the output directory
-
installPhase = "mkdir -p $out; cp -R * $out/";
-
};
-
# And then pass this theme to the template list like this:
-
templates = [ template-bootstrap3 ];
+
in [ template-bootstrap3 ]
'';
};
+2 -2
nixos/modules/services/web-apps/engelsystem.nix
···
{ config, lib, pkgs, utils, ... }:
let
-
inherit (lib) mkDefault mkEnableOption mkIf mkOption types literalExample;
+
inherit (lib) mkDefault mkEnableOption mkIf mkOption types literalExpression;
cfg = config.services.engelsystem;
in {
options = {
···
package = mkOption {
type = types.package;
-
example = literalExample "pkgs.engelsystem";
description = "Engelsystem package used for the service.";
default = pkgs.engelsystem;
+
defaultText = literalExpression "pkgs.engelsystem";
};
createDatabase = mkOption {
+6 -4
nixos/modules/services/web-apps/fluidd.nix
···
type = types.package;
description = "Fluidd package to be used in the module";
default = pkgs.fluidd;
-
defaultText = "pkgs.fluidd";
+
defaultText = literalExpression "pkgs.fluidd";
};
hostName = mkOption {
···
type = types.submodule
(import ../web-servers/nginx/vhost-options.nix { inherit config lib; });
default = { };
-
example = {
-
serverAliases = [ "fluidd.\${config.networking.domain}" ];
-
};
+
example = literalExpression ''
+
{
+
serverAliases = [ "fluidd.''${config.networking.domain}" ];
+
}
+
'';
description = "Extra configuration for the nginx virtual host of fluidd.";
};
};
+2 -1
nixos/modules/services/web-apps/galene.nix
···
staticDir = mkOption {
type = types.str;
default = "${cfg.package.static}/static";
+
defaultText = literalExpression ''"''${package.static}/static"'';
example = "/var/lib/galene/static";
description = "Web server directory.";
};
···
package = mkOption {
default = pkgs.galene;
-
defaultText = "pkgs.galene";
+
defaultText = literalExpression "pkgs.galene";
type = types.package;
description = ''
Package for running Galene.
+2 -1
nixos/modules/services/web-apps/gerrit.nix
···
package = mkOption {
type = types.package;
default = pkgs.gerrit;
+
defaultText = literalExpression "pkgs.gerrit";
description = "Gerrit package to use";
};
jvmPackage = mkOption {
type = types.package;
default = pkgs.jre_headless;
-
defaultText = "pkgs.jre_headless";
+
defaultText = literalExpression "pkgs.jre_headless";
description = "Java Runtime Environment package to use";
};
+8 -7
nixos/modules/services/web-apps/hedgedoc.nix
···
port = mkOption {
type = types.int;
default = 3000;
-
example = "80";
+
example = 80;
description = ''
Port to listen on.
'';
···
csp = mkOption {
type = types.nullOr types.attrs;
default = null;
-
example = literalExample ''
+
example = literalExpression ''
{
enable = true;
directives = {
···
db = mkOption {
type = types.attrs;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
dialect = "sqlite";
storage = "/var/lib/${name}/db.${name}.sqlite";
···
errorPath = mkOption {
type = types.nullOr types.str;
default = null;
-
defaultText = "./public/views/error.ejs";
+
defaultText = literalExpression "./public/views/error.ejs";
description = ''
Path to the error template file.
(Non-canonical paths are relative to HedgeDoc's base directory)
···
prettyPath = mkOption {
type = types.nullOr types.str;
default = null;
-
defaultText = "./public/views/pretty.ejs";
+
defaultText = literalExpression "./public/views/pretty.ejs";
description = ''
Path to the pretty template file.
(Non-canonical paths are relative to HedgeDoc's base directory)
···
slidePath = mkOption {
type = types.nullOr types.str;
default = null;
-
defaultText = "./public/views/slide.hbs";
+
defaultText = literalExpression "./public/views/slide.hbs";
description = ''
Path to the slide template file.
(Non-canonical paths are relative to HedgeDoc's base directory)
···
uploadsPath = mkOption {
type = types.str;
default = "${cfg.workDir}/uploads";
-
defaultText = "/var/lib/${name}/uploads";
+
defaultText = literalExpression "/var/lib/${name}/uploads";
description = ''
Path under which uploaded files are saved.
'';
···
package = mkOption {
type = types.package;
default = pkgs.hedgedoc;
+
defaultText = literalExpression "pkgs.hedgedoc";
description = ''
Package that provides HedgeDoc.
'';
+1 -1
nixos/modules/services/web-apps/hledger-web.nix
···
port = mkOption {
type = types.port;
default = 5000;
-
example = "80";
+
example = 80;
description = ''
Port to listen on.
'';
+1 -1
nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix
···
modulePackages = mkOption {
type = attrsOf package;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"snow" = icingaweb2Modules.theme-snow;
}
+2 -2
nixos/modules/services/web-apps/isso.nix
···
{ config, lib, pkgs, ... }:
let
-
inherit (lib) mkEnableOption mkIf mkOption types literalExample;
+
inherit (lib) mkEnableOption mkIf mkOption types literalExpression;
cfg = config.services.isso;
···
freeformType = settingsFormat.type;
};
-
example = literalExample ''
+
example = literalExpression ''
{
general = {
host = "http://localhost";
+6 -5
nixos/modules/services/web-apps/jirafeau.nix
···
type = types.submodule
(import ../web-servers/nginx/vhost-options.nix { inherit config lib; });
default = {};
-
example = {
-
serverAliases = [ "wiki.\${config.networking.domain}" ];
-
};
+
example = literalExpression ''
+
{
+
serverAliases = [ "wiki.''${config.networking.domain}" ];
+
}
+
'';
description = "Extra configuration for the nginx virtual host of Jirafeau.";
};
package = mkOption {
type = types.package;
default = pkgs.jirafeau;
-
defaultText = "pkgs.jirafeau";
+
defaultText = literalExpression "pkgs.jirafeau";
description = "Jirafeau package to use";
-
example = "pkgs.jirafeau";
};
poolConfig = mkOption {
+2 -2
nixos/modules/services/web-apps/jitsi-meet.nix
···
config = mkOption {
type = attrs;
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
enableWelcomePage = false;
defaultLang = "fi";
···
interfaceConfig = mkOption {
type = attrs;
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
SHOW_JITSI_WATERMARK = false;
SHOW_WATERMARK_FOR_GUESTS = false;
+2 -1
nixos/modules/services/web-apps/keycloak.nix
···
package = lib.mkOption {
type = lib.types.package;
default = pkgs.keycloak;
+
defaultText = lib.literalExpression "pkgs.keycloak";
description = ''
Keycloak package to use.
'';
···
extraConfig = lib.mkOption {
type = lib.types.attrs;
default = { };
-
example = lib.literalExample ''
+
example = lib.literalExpression ''
{
"subsystem=keycloak-server" = {
"spi=hostname" = {
+5 -5
nixos/modules/services/web-apps/limesurvey.nix
···
let
inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption;
-
inherit (lib) literalExample mapAttrs optional optionalString types;
+
inherit (lib) literalExpression mapAttrs optional optionalString types;
cfg = config.services.limesurvey;
fpm = config.services.phpfpm.pools.limesurvey;
···
port = mkOption {
type = types.int;
default = if cfg.database.type == "pgsql" then 5442 else 3306;
-
defaultText = "3306";
+
defaultText = literalExpression "3306";
description = "Database host port.";
};
···
else if pgsqlLocal then "/run/postgresql"
else null
;
-
defaultText = "/run/mysqld/mysqld.sock";
+
defaultText = literalExpression "/run/mysqld/mysqld.sock";
description = "Path to the unix socket file to use for authentication.";
};
createLocally = mkOption {
type = types.bool;
default = cfg.database.type == "mysql";
-
defaultText = "true";
+
defaultText = literalExpression "true";
description = ''
Create the database and database user locally.
This currently only applies if database type "mysql" is selected.
···
virtualHost = mkOption {
type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
-
example = literalExample ''
+
example = literalExpression ''
{
hostName = "survey.example.org";
adminAddr = "webmaster@example.org";
+1 -1
nixos/modules/services/web-apps/mastodon.nix
···
package = lib.mkOption {
type = lib.types.package;
default = pkgs.mastodon;
-
defaultText = "pkgs.mastodon";
+
defaultText = lib.literalExpression "pkgs.mastodon";
description = "Mastodon package to use.";
};
+10 -8
nixos/modules/services/web-apps/matomo.nix
···
as they don't get backported if they are not security-relevant.
'';
default = pkgs.matomo;
-
defaultText = "pkgs.matomo";
+
defaultText = literalExpression "pkgs.matomo";
};
webServerUser = mkOption {
···
)
);
default = null;
-
example = {
-
serverAliases = [
-
"matomo.\${config.networking.domain}"
-
"stats.\${config.networking.domain}"
-
];
-
enableACME = false;
-
};
+
example = literalExpression ''
+
{
+
serverAliases = [
+
"matomo.''${config.networking.domain}"
+
"stats.''${config.networking.domain}"
+
];
+
enableACME = false;
+
}
+
'';
description = ''
With this option, you can customize an nginx virtualHost which already has sensible defaults for Matomo.
Either this option or the webServerUser option is mandatory.
+6 -5
nixos/modules/services/web-apps/mediawiki.nix
···
let
inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption;
-
inherit (lib) concatStringsSep literalExample mapAttrsToList optional optionals optionalString types;
+
inherit (lib) concatStringsSep literalExpression mapAttrsToList optional optionals optionalString types;
cfg = config.services.mediawiki;
fpm = config.services.phpfpm.pools.mediawiki;
···
package = mkOption {
type = types.package;
default = pkgs.mediawiki;
+
defaultText = literalExpression "pkgs.mediawiki";
description = "Which MediaWiki package to use.";
};
···
Use <literal>null</literal> instead of path to enable extensions that are part of MediaWiki.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
Matomo = pkgs.fetchzip {
url = "https://github.com/DaSchTour/matomo-mediawiki-extension/archive/v4.0.1.tar.gz";
···
socket = mkOption {
type = types.nullOr types.path;
default = if cfg.database.createLocally then "/run/mysqld/mysqld.sock" else null;
-
defaultText = "/run/mysqld/mysqld.sock";
+
defaultText = literalExpression "/run/mysqld/mysqld.sock";
description = "Path to the unix socket file to use for authentication.";
};
createLocally = mkOption {
type = types.bool;
default = cfg.database.type == "mysql";
-
defaultText = "true";
+
defaultText = literalExpression "true";
description = ''
Create the database and database user locally.
This currently only applies if database type "mysql" is selected.
···
virtualHost = mkOption {
type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
-
example = literalExample ''
+
example = literalExpression ''
{
hostName = "mediawiki.example.org";
adminAddr = "webmaster@example.org";
+1 -1
nixos/modules/services/web-apps/miniflux.nix
···
config = mkOption {
type = types.attrsOf types.str;
-
example = literalExample ''
+
example = literalExpression ''
{
CLEANUP_FREQUENCY = "48";
LISTEN_ADDR = "localhost:8080";
+1 -1
nixos/modules/services/web-apps/moinmoin.nix
···
webHost = mkDefault name;
};
}));
-
example = literalExample ''
+
example = literalExpression ''
{
"mywiki" = {
siteName = "Example Wiki";
+5 -5
nixos/modules/services/web-apps/moodle.nix
···
let
inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types;
-
inherit (lib) concatStringsSep literalExample mapAttrsToList optional optionalString;
+
inherit (lib) concatStringsSep literalExpression mapAttrsToList optional optionalString;
cfg = config.services.moodle;
fpm = config.services.phpfpm.pools.moodle;
···
package = mkOption {
type = types.package;
default = pkgs.moodle;
-
defaultText = "pkgs.moodle";
+
defaultText = literalExpression "pkgs.moodle";
description = "The Moodle package to use.";
};
···
mysql = 3306;
pgsql = 5432;
}.${cfg.database.type};
-
defaultText = "3306";
+
defaultText = literalExpression "3306";
};
name = mkOption {
···
if mysqlLocal then "/run/mysqld/mysqld.sock"
else if pgsqlLocal then "/run/postgresql"
else null;
-
defaultText = "/run/mysqld/mysqld.sock";
+
defaultText = literalExpression "/run/mysqld/mysqld.sock";
description = "Path to the unix socket file to use for authentication.";
};
···
virtualHost = mkOption {
type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
-
example = literalExample ''
+
example = literalExpression ''
{
hostName = "moodle.example.org";
adminAddr = "webmaster@example.org";
+2 -2
nixos/modules/services/web-apps/nextcloud.nix
···
phpExtraExtensions = mkOption {
type = with types; functionTo (listOf package);
default = all: [];
-
defaultText = "all: []";
+
defaultText = literalExpression "all: []";
description = ''
Additional PHP extensions to use for nextcloud.
By default, only extensions necessary for a vanilla nextcloud installation are enabled,
but you may choose from the list of available extensions and add further ones.
This is sometimes necessary to be able to install a certain nextcloud app that has additional requirements.
'';
-
example = literalExample ''
+
example = literalExpression ''
all: [ all.pdlib all.bz2 ]
'';
};
+22
nixos/modules/services/web-apps/nexus.nix
···
package = mkOption {
type = types.package;
default = pkgs.nexus;
+
defaultText = literalExpression "pkgs.nexus";
description = "Package which runs Nexus3";
};
···
-Djava.io.tmpdir=${cfg.home}/nexus3/tmp
-Dkaraf.startLocalConsole=false
-Djava.endorsed.dirs=${cfg.package}/lib/endorsed
+
'';
+
defaultText = literalExpression ''
+
'''
+
-Xms1200M
+
-Xmx1200M
+
-XX:MaxDirectMemorySize=2G
+
-XX:+UnlockDiagnosticVMOptions
+
-XX:+UnsyncloadClass
+
-XX:+LogVMOutput
+
-XX:LogFile=''${home}/nexus3/log/jvm.log
+
-XX:-OmitStackTraceInFastThrow
+
-Djava.net.preferIPv4Stack=true
+
-Dkaraf.home=''${package}
+
-Dkaraf.base=''${package}
+
-Dkaraf.etc=''${package}/etc/karaf
+
-Djava.util.logging.config.file=''${package}/etc/karaf/java.util.logging.properties
+
-Dkaraf.data=''${home}/nexus3
+
-Djava.io.tmpdir=''${home}/nexus3/tmp
+
-Dkaraf.startLocalConsole=false
+
-Djava.endorsed.dirs=''${package}/lib/endorsed
+
'''
'';
description = ''
+3 -3
nixos/modules/services/web-apps/node-red.nix
···
package = mkOption {
default = pkgs.nodePackages.node-red;
-
defaultText = "pkgs.nodePackages.node-red";
+
defaultText = literalExpression "pkgs.nodePackages.node-red";
type = types.package;
description = "Node-RED package to use.";
};
···
configFile = mkOption {
type = types.path;
default = "${cfg.package}/lib/node_modules/node-red/settings.js";
-
defaultText = "\${cfg.package}/lib/node_modules/node-red/settings.js";
+
defaultText = literalExpression ''"''${package}/lib/node_modules/node-red/settings.js"'';
description = ''
Path to the JavaScript configuration file.
See <link
···
type = types.attrs;
default = {};
description = "List of settings.js overrides to pass via -D to Node-RED.";
-
example = literalExample ''
+
example = literalExpression ''
{
"logging.console.level" = "trace";
}
+1 -1
nixos/modules/services/web-apps/pgpkeyserver-lite.nix
···
package = mkOption {
default = pkgs.pgpkeyserver-lite;
-
defaultText = "pkgs.pgpkeyserver-lite";
+
defaultText = literalExpression "pkgs.pgpkeyserver-lite";
type = types.package;
description = "
Which webgui derivation to use.
+2
nixos/modules/services/web-apps/plantuml-server.nix
···
package = mkOption {
type = types.package;
default = pkgs.plantuml-server;
+
defaultText = literalExpression "pkgs.plantuml-server";
description = "PlantUML server package to use";
};
···
graphvizPackage = mkOption {
type = types.package;
default = pkgs.graphviz_2_32;
+
defaultText = literalExpression "pkgs.graphviz_2_32";
description = "Package containing the dot executable.";
};
-3
nixos/modules/services/web-apps/restya-board.nix
···
dataDir = mkOption {
type = types.path;
default = "/var/lib/restya-board";
-
example = "/var/lib/restya-board";
description = ''
Data of the application.
'';
···
user = mkOption {
type = types.str;
default = "restya-board";
-
example = "restya-board";
description = ''
User account under which the web-application runs.
'';
···
group = mkOption {
type = types.str;
default = "nginx";
-
example = "nginx";
description = ''
Group account under which the web-application runs.
'';
+1 -3
nixos/modules/services/web-apps/rss-bridge.nix
···
user = mkOption {
type = types.str;
default = "nginx";
-
example = "nginx";
description = ''
User account under which both the service and the web-application run.
'';
···
group = mkOption {
type = types.str;
default = "nginx";
-
example = "nginx";
description = ''
Group under which the web-application run.
'';
···
whitelist = mkOption {
type = types.listOf types.str;
default = [];
-
example = options.literalExample ''
+
example = options.literalExpression ''
[
"Facebook"
"Instagram"
-1
nixos/modules/services/web-apps/selfoss.nix
···
user = mkOption {
type = types.str;
default = "nginx";
-
example = "nginx";
description = ''
User account under which both the service and the web-application run.
'';
+1 -1
nixos/modules/services/web-apps/shiori.nix
···
package = mkOption {
type = types.package;
default = pkgs.shiori;
-
defaultText = "pkgs.shiori";
+
defaultText = literalExpression "pkgs.shiori";
description = "The Shiori package to use.";
};
-2
nixos/modules/services/web-apps/tt-rss.nix
···
root = mkOption {
type = types.path;
default = "/var/lib/tt-rss";
-
example = "/var/lib/tt-rss";
description = ''
Root of the application.
'';
···
user = mkOption {
type = types.str;
default = "tt_rss";
-
example = "tt_rss";
description = ''
User account under which both the update daemon and the web-application run.
'';
+3 -3
nixos/modules/services/web-apps/vikunja.nix
···
package-api = mkOption {
default = pkgs.vikunja-api;
type = types.package;
-
defaultText = "pkgs.vikunja-api";
+
defaultText = literalExpression "pkgs.vikunja-api";
description = "vikunja-api derivation to use.";
};
package-frontend = mkOption {
default = pkgs.vikunja-frontend;
type = types.package;
-
defaultText = "pkgs.vikunja-frontend";
+
defaultText = literalExpression "pkgs.vikunja-frontend";
description = "vikunja-frontend derivation to use.";
};
environmentFiles = mkOption {
···
setupNginx = mkOption {
type = types.bool;
default = config.services.nginx.enable;
-
defaultText = "config.services.nginx.enable";
+
defaultText = literalExpression "config.services.nginx.enable";
description = ''
Whether to setup NGINX.
Further nginx configuration can be done by changing
+1 -1
nixos/modules/services/web-apps/whitebophir.nix
···
package = mkOption {
default = pkgs.whitebophir;
-
defaultText = "pkgs.whitebophir";
+
defaultText = literalExpression "pkgs.whitebophir";
type = types.package;
description = "Whitebophir package to use.";
};
+36 -35
nixos/modules/services/web-apps/wordpress.nix
···
let
inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types;
-
inherit (lib) any attrValues concatMapStringsSep flatten literalExample;
+
inherit (lib) any attrValues concatMapStringsSep flatten literalExpression;
inherit (lib) filterAttrs mapAttrs mapAttrs' mapAttrsToList nameValuePair optional optionalAttrs optionalString;
cfg = migrateOldAttrs config.services.wordpress;
···
package = mkOption {
type = types.package;
default = pkgs.wordpress;
+
defaultText = literalExpression "pkgs.wordpress";
description = "Which WordPress package to use.";
};
···
List of path(s) to respective plugin(s) which are copied from the 'plugins' directory.
<note><para>These plugins need to be packaged before use, see example.</para></note>
'';
-
example = ''
-
# Wordpress plugin 'embed-pdf-viewer' installation example
-
embedPdfViewerPlugin = pkgs.stdenv.mkDerivation {
-
name = "embed-pdf-viewer-plugin";
-
# Download the theme from the wordpress site
-
src = pkgs.fetchurl {
-
url = "https://downloads.wordpress.org/plugin/embed-pdf-viewer.2.0.3.zip";
-
sha256 = "1rhba5h5fjlhy8p05zf0p14c9iagfh96y91r36ni0rmk6y891lyd";
+
example = literalExpression ''
+
let
+
# Wordpress plugin 'embed-pdf-viewer' installation example
+
embedPdfViewerPlugin = pkgs.stdenv.mkDerivation {
+
name = "embed-pdf-viewer-plugin";
+
# Download the theme from the wordpress site
+
src = pkgs.fetchurl {
+
url = "https://downloads.wordpress.org/plugin/embed-pdf-viewer.2.0.3.zip";
+
sha256 = "1rhba5h5fjlhy8p05zf0p14c9iagfh96y91r36ni0rmk6y891lyd";
+
};
+
# We need unzip to build this package
+
nativeBuildInputs = [ pkgs.unzip ];
+
# Installing simply means copying all files to the output directory
+
installPhase = "mkdir -p $out; cp -R * $out/";
};
-
# We need unzip to build this package
-
nativeBuildInputs = [ pkgs.unzip ];
-
# Installing simply means copying all files to the output directory
-
installPhase = "mkdir -p $out; cp -R * $out/";
-
};
-
-
And then pass this theme to the themes list like this:
-
plugins = [ embedPdfViewerPlugin ];
+
# And then pass this theme to the themes list like this:
+
in [ embedPdfViewerPlugin ]
'';
};
···
List of path(s) to respective theme(s) which are copied from the 'theme' directory.
<note><para>These themes need to be packaged before use, see example.</para></note>
'';
-
example = ''
-
# Let's package the responsive theme
-
responsiveTheme = pkgs.stdenv.mkDerivation {
-
name = "responsive-theme";
-
# Download the theme from the wordpress site
-
src = pkgs.fetchurl {
-
url = "https://downloads.wordpress.org/theme/responsive.3.14.zip";
-
sha256 = "0rjwm811f4aa4q43r77zxlpklyb85q08f9c8ns2akcarrvj5ydx3";
+
example = literalExpression ''
+
let
+
# Let's package the responsive theme
+
responsiveTheme = pkgs.stdenv.mkDerivation {
+
name = "responsive-theme";
+
# Download the theme from the wordpress site
+
src = pkgs.fetchurl {
+
url = "https://downloads.wordpress.org/theme/responsive.3.14.zip";
+
sha256 = "0rjwm811f4aa4q43r77zxlpklyb85q08f9c8ns2akcarrvj5ydx3";
+
};
+
# We need unzip to build this package
+
nativeBuildInputs = [ pkgs.unzip ];
+
# Installing simply means copying all files to the output directory
+
installPhase = "mkdir -p $out; cp -R * $out/";
};
-
# We need unzip to build this package
-
nativeBuildInputs = [ pkgs.unzip ];
-
# Installing simply means copying all files to the output directory
-
installPhase = "mkdir -p $out; cp -R * $out/";
-
};
-
-
And then pass this theme to the themes list like this:
-
themes = [ responsiveTheme ];
+
# And then pass this theme to the themes list like this:
+
in [ responsiveTheme ]
'';
};
···
socket = mkOption {
type = types.nullOr types.path;
default = null;
-
defaultText = "/run/mysqld/mysqld.sock";
+
defaultText = literalExpression "/run/mysqld/mysqld.sock";
description = "Path to the unix socket file to use for authentication.";
};
···
virtualHost = mkOption {
type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
-
example = literalExample ''
+
example = literalExpression ''
{
adminAddr = "webmaster@example.org";
forceSSL = true;
+2 -2
nixos/modules/services/web-apps/youtrack.nix
···
https://www.jetbrains.com/help/youtrack/standalone/YouTrack-Java-Start-Parameters.html
for more information.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
"jetbrains.youtrack.overrideRootPassword" = "tortuga";
}
···
'';
type = types.package;
default = pkgs.youtrack;
-
defaultText = "pkgs.youtrack";
+
defaultText = literalExpression "pkgs.youtrack";
};
port = mkOption {
+3 -3
nixos/modules/services/web-apps/zabbix.nix
···
let
inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types;
-
inherit (lib) literalExample mapAttrs optionalString versionAtLeast;
+
inherit (lib) literalExpression mapAttrs optionalString versionAtLeast;
cfg = config.services.zabbixWeb;
fpm = config.services.phpfpm.pools.zabbix;
···
package = mkOption {
type = types.package;
default = pkgs.zabbix.web;
-
defaultText = "zabbix.web";
+
defaultText = literalExpression "zabbix.web";
description = "Which Zabbix package to use.";
};
···
virtualHost = mkOption {
type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
-
example = literalExample ''
+
example = literalExpression ''
{
hostName = "zabbix.example.org";
adminAddr = "webmaster@example.org";
+13 -6
nixos/modules/services/web-servers/apache-httpd/default.nix
···
package = mkOption {
type = types.package;
default = pkgs.apacheHttpd;
-
defaultText = "pkgs.apacheHttpd";
+
defaultText = literalExpression "pkgs.apacheHttpd";
description = ''
Overridable attribute of the Apache HTTP Server package to use.
'';
···
configFile = mkOption {
type = types.path;
default = confFile;
-
defaultText = "confFile";
-
example = literalExample ''pkgs.writeText "httpd.conf" "# my custom config file ..."'';
+
defaultText = literalExpression "confFile";
+
example = literalExpression ''pkgs.writeText "httpd.conf" "# my custom config file ..."'';
description = ''
Override the configuration file used by Apache. By default,
NixOS generates one automatically.
···
extraModules = mkOption {
type = types.listOf types.unspecified;
default = [];
-
example = literalExample ''
+
example = literalExpression ''
[
"proxy_connect"
{ name = "jk"; path = "''${pkgs.tomcat_connectors}/modules/mod_jk.so"; }
···
documentRoot = "${pkg}/htdocs";
};
};
-
example = literalExample ''
+
defaultText = literalExpression ''
+
{
+
localhost = {
+
documentRoot = "''${package.out}/htdocs";
+
};
+
}
+
'';
+
example = literalExpression ''
{
"foo.example.com" = {
forceSSL = true;
···
phpPackage = mkOption {
type = types.package;
default = pkgs.php;
-
defaultText = "pkgs.php";
+
defaultText = literalExpression "pkgs.php";
description = ''
Overridable attribute of the PHP package to use.
'';
+2 -2
nixos/modules/services/web-servers/apache-httpd/vhost-options.nix
···
{ config, lib, name, ... }:
let
-
inherit (lib) literalExample mkOption nameValuePair types;
+
inherit (lib) literalExpression mkOption nameValuePair types;
in
{
options = {
···
locations = mkOption {
type = with types; attrsOf (submodule (import ./location-options.nix));
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"/" = {
proxyPass = "http://localhost:3000";
+2 -3
nixos/modules/services/web-servers/caddy/default.nix
···
inherit config lib;
}));
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
"hydra.example.com" = {
serverAliases = [ "www.hydra.example.com" ];
···
package = mkOption {
default = pkgs.caddy;
-
defaultText = "pkgs.caddy";
-
example = "pkgs.caddy";
+
defaultText = literalExpression "pkgs.caddy";
type = types.package;
description = ''
Caddy package to use.
+7 -5
nixos/modules/services/web-servers/lighttpd/cgit.nix
···
configText = mkOption {
default = "";
-
example = ''
-
source-filter=''${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py
-
about-filter=''${pkgs.cgit}/lib/cgit/filters/about-formatting.sh
-
cache-size=1000
-
scan-path=/srv/git
+
example = literalExpression ''
+
'''
+
source-filter=''${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py
+
about-filter=''${pkgs.cgit}/lib/cgit/filters/about-formatting.sh
+
cache-size=1000
+
scan-path=/srv/git
+
'''
'';
type = types.lines;
description = ''
+1 -1
nixos/modules/services/web-servers/minio.nix
···
package = mkOption {
default = pkgs.minio;
-
defaultText = "pkgs.minio";
+
defaultText = literalExpression "pkgs.minio";
type = types.package;
description = "Minio package to use.";
};
+1 -1
nixos/modules/services/web-servers/molly-brown.nix
···
hostName = mkOption {
type = types.str;
-
example = literalExample "config.networking.hostName";
default = config.networking.hostName;
+
defaultText = literalExpression "config.networking.hostName";
description = ''
The hostname to respond to requests for. Requests for URLs with
other hosts will result in a status 53 (PROXY REQUEST REFUSED)
+5 -5
nixos/modules/services/web-servers/nginx/default.nix
···
package = mkOption {
default = pkgs.nginxStable;
-
defaultText = "pkgs.nginxStable";
+
defaultText = literalExpression "pkgs.nginxStable";
type = types.package;
apply = p: p.override {
modules = p.modules ++ cfg.additionalModules;
···
additionalModules = mkOption {
default = [];
type = types.listOf (types.attrsOf types.anything);
-
example = literalExample "[ pkgs.nginxModules.brotli ]";
+
example = literalExpression "[ pkgs.nginxModules.brotli ]";
description = ''
Additional <link xlink:href="https://www.nginx.com/resources/wiki/modules/">third-party nginx modules</link>
to install. Packaged modules are available in
···
addresses = mkOption {
type = types.listOf types.str;
default = [];
-
example = literalExample ''[ "[::1]" "127.0.0.1:5353" ]'';
+
example = literalExpression ''[ "[::1]" "127.0.0.1:5353" ]'';
description = "List of resolvers to use";
};
valid = mkOption {
···
Defines a group of servers to use as proxy target.
'';
default = {};
-
example = literalExample ''
+
example = literalExpression ''
"backend_server" = {
servers = { "127.0.0.1:8000" = {}; };
extraConfig = ''''
···
default = {
localhost = {};
};
-
example = literalExample ''
+
example = literalExpression ''
{
"hydra.example.com" = {
forceSSL = true;
+1 -1
nixos/modules/services/web-servers/nginx/location-options.nix
···
basicAuth = mkOption {
type = types.attrsOf types.str;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
user = "password";
};
+3 -3
nixos/modules/services/web-servers/nginx/vhost-options.nix
···
sslTrustedCertificate = mkOption {
type = types.nullOr types.path;
default = null;
-
example = "\${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
+
example = literalExpression ''"''${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"'';
description = "Path to root SSL certificate for stapling and client certificates.";
};
···
basicAuth = mkOption {
type = types.attrsOf types.str;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
user = "password";
};
···
inherit lib;
}));
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"/" = {
proxyPass = "http://localhost:3000";
+5 -5
nixos/modules/services/web-servers/phpfpm/default.nix
···
phpPackage = mkOption {
type = types.package;
default = cfg.phpPackage;
-
defaultText = "config.services.phpfpm.phpPackage";
+
defaultText = literalExpression "config.services.phpfpm.phpPackage";
description = ''
The PHP package to use for running this PHP-FPM pool.
'';
···
description = ''
Environment variables used for this PHP-FPM pool.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
HOSTNAME = "$HOSTNAME";
TMP = "/tmp";
···
for details. Note that settings names must be enclosed in quotes (e.g.
<literal>"pm.max_children"</literal> instead of <literal>pm.max_children</literal>).
'';
-
example = literalExample ''
+
example = literalExpression ''
{
"pm" = "dynamic";
"pm.max_children" = 75;
···
phpPackage = mkOption {
type = types.package;
default = pkgs.php;
-
defaultText = "pkgs.php";
+
defaultText = literalExpression "pkgs.php";
description = ''
The PHP package to use for running the PHP-FPM service.
'';
···
pools = mkOption {
type = types.attrsOf (types.submodule poolOpts);
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
mypool = {
user = "php";
+4 -4
nixos/modules/services/web-servers/tomcat.nix
···
package = mkOption {
type = types.package;
default = pkgs.tomcat85;
-
defaultText = "pkgs.tomcat85";
-
example = lib.literalExample "pkgs.tomcat9";
+
defaultText = literalExpression "pkgs.tomcat85";
+
example = lib.literalExpression "pkgs.tomcat9";
description = ''
Which tomcat package to use.
'';
···
webapps = mkOption {
type = types.listOf types.path;
default = [ tomcat.webapps ];
-
defaultText = "[ pkgs.tomcat85.webapps ]";
+
defaultText = literalExpression "[ pkgs.tomcat85.webapps ]";
description = "List containing WAR files or directories with WAR files which are web applications to be deployed on Tomcat";
};
···
jdk = mkOption {
type = types.package;
default = pkgs.jdk;
-
defaultText = "pkgs.jdk";
+
defaultText = literalExpression "pkgs.jdk";
description = "Which JDK to use.";
};
+3 -3
nixos/modules/services/web-servers/traefik.nix
···
staticConfigFile = mkOption {
default = null;
-
example = literalExample "/path/to/static_config.toml";
+
example = literalExpression "/path/to/static_config.toml";
type = types.nullOr types.path;
description = ''
Path to traefik's static configuration to use.
···
dynamicConfigFile = mkOption {
default = null;
-
example = literalExample "/path/to/dynamic_config.toml";
+
example = literalExpression "/path/to/dynamic_config.toml";
type = types.nullOr types.path;
description = ''
Path to traefik's dynamic configuration to use.
···
package = mkOption {
default = pkgs.traefik;
-
defaultText = "pkgs.traefik";
+
defaultText = literalExpression "pkgs.traefik";
type = types.package;
description = "Traefik package to use.";
};
+22 -18
nixos/modules/services/web-servers/trafficserver/default.nix
···
ipAllow = mkOption {
type = types.nullOr yaml.type;
default = builtins.fromJSON (builtins.readFile ./ip_allow.json);
-
defaultText = "upstream defaults";
-
example = literalExample {
-
ip_allow = [{
-
apply = "in";
-
ip_addrs = "127.0.0.1";
-
action = "allow";
-
methods = "ALL";
-
}];
-
};
+
defaultText = literalDocBook "upstream defaults";
+
example = literalExpression ''
+
{
+
ip_allow = [{
+
apply = "in";
+
ip_addrs = "127.0.0.1";
+
action = "allow";
+
methods = "ALL";
+
}];
+
}
+
'';
description = ''
Control client access to Traffic Server and Traffic Server connections
to upstream servers.
···
logging = mkOption {
type = types.nullOr yaml.type;
default = builtins.fromJSON (builtins.readFile ./logging.json);
-
defaultText = "upstream defaults";
-
example = literalExample { };
+
defaultText = literalDocBook "upstream defaults";
+
example = { };
description = ''
Configure logs.
···
in
valueType;
default = { };
-
example = literalExample { proxy.config.proxy_name = "my_server"; };
+
example = { proxy.config.proxy_name = "my_server"; };
description = ''
List of configurable variables used by Traffic Server.
···
sni = mkOption {
type = types.nullOr yaml.type;
default = null;
-
example = literalExample {
-
sni = [{
-
fqdn = "no-http2.example.com";
-
https = "off";
-
}];
-
};
+
example = literalExpression ''
+
{
+
sni = [{
+
fqdn = "no-http2.example.com";
+
https = "off";
+
}];
+
}
+
'';
description = ''
Configure aspects of TLS connection handling for both inbound and
outbound connections.
+1 -1
nixos/modules/services/web-servers/ttyd.nix
···
clientOptions = mkOption {
type = types.attrsOf types.str;
default = {};
-
example = literalExample ''{
+
example = literalExpression ''{
fontSize = "16";
fontFamily = "Fira Code";
+2 -2
nixos/modules/services/web-servers/unit/default.nix
···
package = mkOption {
type = types.package;
default = pkgs.unit;
-
defaultText = "pkgs.unit";
+
defaultText = literalExpression "pkgs.unit";
description = "Unit package to use.";
};
user = mkOption {
···
"applications": {}
}
'';
-
example = literalExample ''
+
example = ''
{
"listeners": {
"*:8300": {
+2 -2
nixos/modules/services/web-servers/uwsgi.nix
···
default = {
type = "normal";
};
-
example = literalExample ''
+
example = literalExpression ''
{
type = "emperor";
vassals = {
···
type = types.listOf types.str;
apply = caps: caps ++ optionals isEmperor imperialPowers;
default = [ ];
-
example = literalExample ''
+
example = literalExpression ''
[
"CAP_NET_BIND_SERVICE" # bind on ports <1024
"CAP_NET_RAW" # open raw sockets
+2 -2
nixos/modules/services/web-servers/varnish/default.nix
···
package = mkOption {
type = types.package;
default = pkgs.varnish;
-
defaultText = "pkgs.varnish";
+
defaultText = literalExpression "pkgs.varnish";
description = ''
The package to use
'';
···
extraModules = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "[ pkgs.varnishPackages.geoip ]";
+
example = literalExpression "[ pkgs.varnishPackages.geoip ]";
description = "
Varnish modules (except 'std').
";
+1 -1
nixos/modules/services/web-servers/zope2.nix
···
services.zope2.instances = mkOption {
default = {};
type = with types; attrsOf (submodule zope2Opts);
-
example = literalExample ''
+
example = literalExpression ''
{
plone01 = {
http_address = "127.0.0.1:8080";
+1 -1
nixos/modules/services/x11/desktop-managers/cde.nix
···
default = with pkgs.xorg; [
xclock bitmap xlsfonts xfd xrefresh xload xwininfo xdpyinfo xwd xwud
];
-
example = literalExample ''
+
defaultText = literalExpression ''
with pkgs.xorg; [
xclock bitmap xlsfonts xfd xrefresh xload xwininfo xdpyinfo xwd xwud
]
+2 -2
nixos/modules/services/x11/desktop-managers/cinnamon.nix
···
sessionPath = mkOption {
default = [];
type = types.listOf types.package;
-
example = literalExample "[ pkgs.gnome.gpaste ]";
+
example = literalExpression "[ pkgs.gnome.gpaste ]";
description = ''
Additional list of packages to be added to the session search path.
Useful for GSettings-conditional autostart.
···
environment.cinnamon.excludePackages = mkOption {
default = [];
-
example = literalExample "[ pkgs.cinnamon.blueberry ]";
+
example = literalExpression "[ pkgs.cinnamon.blueberry ]";
type = types.listOf types.package;
description = "Which packages cinnamon should exclude from the default environment";
};
+10 -8
nixos/modules/services/x11/desktop-managers/gnome.nix
···
sessionPath = mkOption {
default = [];
type = types.listOf types.package;
-
example = literalExample "[ pkgs.gnome.gpaste ]";
+
example = literalExpression "[ pkgs.gnome.gpaste ]";
description = ''
Additional list of packages to be added to the session search path.
Useful for GNOME Shell extensions or GSettings-conditional autostart.
···
internal = true; # this is messy
default = defaultFavoriteAppsOverride;
type = types.lines;
-
example = literalExample ''
-
[org.gnome.shell]
-
favorite-apps=[ 'firefox.desktop', 'org.gnome.Calendar.desktop' ]
+
example = literalExpression ''
+
'''
+
[org.gnome.shell]
+
favorite-apps=[ 'firefox.desktop', 'org.gnome.Calendar.desktop' ]
+
'''
'';
description = "List of desktop files to put as favorite apps into gnome-shell. These need to be installed somehow globally.";
};
···
wmCommand = mkOption {
type = types.str;
description = "The executable of the window manager to use.";
-
example = "\${pkgs.haskellPackages.xmonad}/bin/xmonad";
+
example = literalExpression ''"''${pkgs.haskellPackages.xmonad}/bin/xmonad"'';
};
enableGnomePanel = mkOption {
type = types.bool;
default = true;
-
example = "false";
+
example = false;
description = "Whether to enable the GNOME panel in this session.";
};
};
···
panelModulePackages = mkOption {
default = [ pkgs.gnome.gnome-applets ];
+
defaultText = literalExpression "[ pkgs.gnome.gnome-applets ]";
type = types.listOf types.path;
description = ''
Packages containing modules that should be made available to <literal>gnome-panel</literal> (usually for applets).
If you're packaging something to use here, please install the modules in <literal>$out/lib/gnome-panel/modules</literal>.
'';
-
example = literalExample "[ pkgs.gnome.gnome-applets ]";
};
};
};
environment.gnome.excludePackages = mkOption {
default = [];
-
example = literalExample "[ pkgs.gnome.totem ]";
+
example = literalExpression "[ pkgs.gnome.totem ]";
type = types.listOf types.package;
description = "Which packages gnome should exclude from the default environment";
};
+2 -2
nixos/modules/services/x11/desktop-managers/kodi.nix
···
package = mkOption {
type = types.package;
default = pkgs.kodi;
-
defaultText = "pkgs.kodi";
-
example = "pkgs.kodi.withPackages (p: with p; [ jellyfin pvr-iptvsimple vfs-sftp ])";
+
defaultText = literalExpression "pkgs.kodi";
+
example = literalExpression "pkgs.kodi.withPackages (p: with p; [ jellyfin pvr-iptvsimple vfs-sftp ])";
description = ''
Package that should be used for Kodi.
'';
+1 -1
nixos/modules/services/x11/desktop-managers/lxqt.nix
···
environment.lxqt.excludePackages = mkOption {
default = [];
-
example = literalExample "[ pkgs.lxqt.qterminal ]";
+
example = literalExpression "[ pkgs.lxqt.qterminal ]";
type = types.listOf types.package;
description = "Which LXQt packages to exclude from the default environment";
};
+1 -1
nixos/modules/services/x11/desktop-managers/mate.nix
···
environment.mate.excludePackages = mkOption {
default = [];
-
example = literalExample "[ pkgs.mate.mate-terminal pkgs.mate.pluma ]";
+
example = literalExpression "[ pkgs.mate.mate-terminal pkgs.mate.pluma ]";
type = types.listOf types.package;
description = "Which MATE packages to exclude from the default environment";
};
+2 -2
nixos/modules/services/x11/desktop-managers/pantheon.nix
···
sessionPath = mkOption {
default = [];
type = types.listOf types.package;
-
example = literalExample "[ pkgs.gnome.gpaste ]";
+
example = literalExpression "[ pkgs.gnome.gpaste ]";
description = ''
Additional list of packages to be added to the session search path.
Useful for GSettings-conditional autostart.
···
environment.pantheon.excludePackages = mkOption {
default = [];
-
example = literalExample "[ pkgs.pantheon.elementary-camera ]";
+
example = literalExpression "[ pkgs.pantheon.elementary-camera ]";
type = types.listOf types.package;
description = "Which packages pantheon should exclude from the default environment";
};
+2 -1
nixos/modules/services/x11/desktop-managers/surf-display.nix
···
defaultWwwUri = mkOption {
type = types.str;
default = "${pkgs.surf-display}/share/surf-display/empty-page.html";
+
defaultText = literalExpression ''"''${pkgs.surf-display}/share/surf-display/empty-page.html"'';
example = "https://www.example.com/";
description = "Default URI to display.";
};
···
inactivityInterval = mkOption {
type = types.int;
default = 300;
-
example = "0";
+
example = 0;
description = ''
Setting for internal inactivity timer to restart surf-display if the
user goes inactive/idle to get a fresh session for the next user of
+1 -1
nixos/modules/services/x11/desktop-managers/xfce.nix
···
thunarPlugins = mkOption {
default = [];
type = types.listOf types.package;
-
example = literalExample "[ pkgs.xfce.thunar-archive-plugin ]";
+
example = literalExpression "[ pkgs.xfce.thunar-archive-plugin ]";
description = ''
A list of plugin that should be installed with Thunar.
'';
+2 -2
nixos/modules/services/x11/desktop-managers/xterm.nix
···
services.xserver.desktopManager.xterm.enable = mkOption {
type = types.bool;
-
default = (versionOlder config.system.stateVersion "19.09") && xSessionEnabled;
-
defaultText = if versionOlder config.system.stateVersion "19.09" then "config.services.xserver.enable" else "false";
+
default = versionOlder config.system.stateVersion "19.09" && xSessionEnabled;
+
defaultText = literalExpression ''versionOlder config.system.stateVersion "19.09" && config.services.xserver.enable;'';
description = "Enable a xterm terminal as a desktop manager.";
};
+2 -4
nixos/modules/services/x11/display-managers/default.nix
···
session = mkOption {
default = [];
-
example = literalExample
+
example = literalExpression
''
[ { manage = "desktop";
name = "xterm";
···
execCmd = mkOption {
type = types.str;
-
example = literalExample ''
-
"''${pkgs.lightdm}/bin/lightdm"
-
'';
+
example = literalExpression ''"''${pkgs.lightdm}/bin/lightdm"'';
description = "Command to start the display manager.";
};
+3 -3
nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix
···
package = mkOption {
type = types.package;
default = pkgs.gnome.gnome-themes-extra;
-
defaultText = "pkgs.gnome.gnome-themes-extra";
+
defaultText = literalExpression "pkgs.gnome.gnome-themes-extra";
description = ''
The package path that contains the theme given in the name option.
'';
···
package = mkOption {
type = types.package;
default = pkgs.papirus-icon-theme;
-
defaultText = "pkgs.papirus-icon-theme";
+
defaultText = literalExpression "pkgs.papirus-icon-theme";
description = ''
The package path that contains the icon theme given in the name option.
'';
···
package = mkOption {
type = types.package;
default = pkgs.capitaine-cursors;
-
defaultText = "pkgs.capitaine-cursors";
+
defaultText = literalExpression "pkgs.capitaine-cursors";
description = ''
The package path that contains the cursor theme given in the name option.
'';
+3 -3
nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix
···
package = mkOption {
type = types.package;
default = pkgs.gnome.gnome-themes-extra;
-
defaultText = "pkgs.gnome.gnome-themes-extra";
+
defaultText = literalExpression "pkgs.gnome.gnome-themes-extra";
description = ''
The package path that contains the theme given in the name option.
'';
···
package = mkOption {
type = types.package;
default = pkgs.gnome.adwaita-icon-theme;
-
defaultText = "pkgs.gnome.adwaita-icon-theme";
+
defaultText = literalExpression "pkgs.gnome.adwaita-icon-theme";
description = ''
The package path that contains the icon theme given in the name option.
'';
···
package = mkOption {
type = types.package;
default = pkgs.gnome.adwaita-icon-theme;
-
defaultText = "pkgs.gnome.adwaita-icon-theme";
+
defaultText = literalExpression "pkgs.gnome.adwaita-icon-theme";
description = ''
The package path that contains the cursor theme given in the name option.
'';
+1 -1
nixos/modules/services/x11/display-managers/lightdm.nix
···
background = mkOption {
type = types.path;
# Manual cannot depend on packages, we are actually setting the default in config below.
-
defaultText = "pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath";
+
defaultText = literalExpression "pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath";
description = ''
The background image or color to use.
'';
+6 -8
nixos/modules/services/x11/display-managers/sddm.nix
···
settings = mkOption {
type = iniFmt.type;
default = { };
-
example = ''
-
{
-
Autologin = {
-
User = "john";
-
Session = "plasma.desktop";
-
};
-
}
-
'';
+
example = {
+
Autologin = {
+
User = "john";
+
Session = "plasma.desktop";
+
};
+
};
description = ''
Extra settings merged in and overwritting defaults in sddm.conf.
'';
+1 -1
nixos/modules/services/x11/extra-layouts.nix
···
extraLayouts = mkOption {
type = types.attrsOf (types.submodule layoutOpts);
default = {};
-
example = literalExample
+
example = literalExpression
''
{
mine = {
+11 -9
nixos/modules/services/x11/imwheel.nix
···
rules = mkOption {
type = types.attrsOf types.str;
default = {};
-
example = literalExample ''
-
".*" = '''
-
None, Up, Button4, 8
-
None, Down, Button5, 8
-
Shift_L, Up, Shift_L|Button4, 4
-
Shift_L, Down, Shift_L|Button5, 4
-
Control_L, Up, Control_L|Button4
-
Control_L, Down, Control_L|Button5
-
''';
+
example = literalExpression ''
+
{
+
".*" = '''
+
None, Up, Button4, 8
+
None, Down, Button5, 8
+
Shift_L, Up, Shift_L|Button4, 4
+
Shift_L, Down, Shift_L|Button5, 4
+
Control_L, Up, Control_L|Button4
+
Control_L, Down, Control_L|Button5
+
''';
+
}
'';
description = ''
Window class translation rules.
+1 -1
nixos/modules/services/x11/picom.nix
···
in mkOption {
type = topLevel;
default = { };
-
example = literalExample ''
+
example = literalExpression ''
blur =
{ method = "gaussian";
size = 10;
+1 -1
nixos/modules/services/x11/redshift.nix
···
package = mkOption {
type = types.package;
default = pkgs.redshift;
-
defaultText = "pkgs.redshift";
+
defaultText = literalExpression "pkgs.redshift";
description = ''
redshift derivation to use.
'';
+1 -1
nixos/modules/services/x11/touchegg.nix
···
package = mkOption {
type = types.package;
default = pkgs.touchegg;
-
defaultText = "pkgs.touchegg";
+
defaultText = literalExpression "pkgs.touchegg";
description = "touchegg derivation to use.";
};
};
+1 -1
nixos/modules/services/x11/unclutter-xfixes.nix
···
description = "unclutter-xfixes derivation to use.";
type = types.package;
default = pkgs.unclutter-xfixes;
-
defaultText = "pkgs.unclutter-xfixes";
+
defaultText = literalExpression "pkgs.unclutter-xfixes";
};
timeout = mkOption {
+1 -1
nixos/modules/services/x11/unclutter.nix
···
package = mkOption {
type = types.package;
default = pkgs.unclutter;
-
defaultText = "pkgs.unclutter";
+
defaultText = literalExpression "pkgs.unclutter";
description = "unclutter derivation to use.";
};
+1 -1
nixos/modules/services/x11/urxvtd.nix
···
package = mkOption {
default = pkgs.rxvt-unicode;
-
defaultText = "pkgs.rxvt-unicode";
+
defaultText = literalExpression "pkgs.rxvt-unicode";
description = ''
Package to install. Usually pkgs.rxvt-unicode.
'';
+1 -1
nixos/modules/services/x11/window-managers/awesome.nix
···
default = [];
type = types.listOf types.package;
description = "List of lua packages available for being used in the Awesome configuration.";
-
example = literalExample "[ pkgs.luaPackages.vicious ]";
+
example = literalExpression "[ pkgs.luaPackages.vicious ]";
};
package = mkOption {
+6 -6
nixos/modules/services/x11/window-managers/bspwm.nix
···
package = mkOption {
type = types.package;
default = pkgs.bspwm;
-
defaultText = "pkgs.bspwm";
-
example = "pkgs.bspwm-unstable";
+
defaultText = literalExpression "pkgs.bspwm";
+
example = literalExpression "pkgs.bspwm-unstable";
description = ''
bspwm package to use.
'';
};
configFile = mkOption {
type = with types; nullOr path;
-
example = "${pkgs.bspwm}/share/doc/bspwm/examples/bspwmrc";
+
example = literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/bspwmrc"'';
default = null;
description = ''
Path to the bspwm configuration file.
···
package = mkOption {
type = types.package;
default = pkgs.sxhkd;
-
defaultText = "pkgs.sxhkd";
-
example = "pkgs.sxhkd-unstable";
+
defaultText = literalExpression "pkgs.sxhkd";
+
example = literalExpression "pkgs.sxhkd-unstable";
description = ''
sxhkd package to use.
'';
};
configFile = mkOption {
type = with types; nullOr path;
-
example = "${pkgs.bspwm}/share/doc/bspwm/examples/sxhkdrc";
+
example = literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/sxhkdrc"'';
default = null;
description = ''
Path to the sxhkd configuration file.
+1 -1
nixos/modules/services/x11/window-managers/clfswm.nix
···
package = mkOption {
type = types.package;
default = pkgs.lispPackages.clfswm;
-
defaultText = "pkgs.lispPackages.clfswm";
+
defaultText = literalExpression "pkgs.lispPackages.clfswm";
description = ''
clfswm package to use.
'';
+4 -3
nixos/modules/services/x11/window-managers/exwm.nix
···
loadScript = mkOption {
default = "(require 'exwm)";
type = types.lines;
-
example = literalExample ''
+
example = ''
(require 'exwm)
(exwm-enable)
'';
···
};
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
-
default = self: [];
-
example = literalExample ''
+
default = epkgs: [];
+
defaultText = literalExpression "epkgs: []";
+
example = literalExpression ''
epkgs: [
epkgs.emms
epkgs.magit
+1 -1
nixos/modules/services/x11/window-managers/herbstluftwm.nix
···
package = mkOption {
type = types.package;
default = pkgs.herbstluftwm;
-
defaultText = "pkgs.herbstluftwm";
+
defaultText = literalExpression "pkgs.herbstluftwm";
description = ''
Herbstluftwm package to use.
'';
+3 -3
nixos/modules/services/x11/window-managers/i3.nix
···
package = mkOption {
type = types.package;
default = pkgs.i3;
-
defaultText = "pkgs.i3";
-
example = "pkgs.i3-gaps";
+
defaultText = literalExpression "pkgs.i3";
+
example = literalExpression "pkgs.i3-gaps";
description = ''
i3 package to use.
'';
···
extraPackages = mkOption {
type = with types; listOf package;
default = with pkgs; [ dmenu i3status i3lock ];
-
example = literalExample ''
+
defaultText = literalExpression ''
with pkgs; [
dmenu
i3status
+1 -1
nixos/modules/services/x11/window-managers/wmderland.nix
···
feh
rxvt-unicode
];
-
example = literalExample ''
+
defaultText = literalExpression ''
with pkgs; [
rofi
dunst
+5 -5
nixos/modules/services/x11/window-managers/xmonad.nix
···
with lib;
let
-
inherit (lib) mkOption mkIf optionals literalExample;
+
inherit (lib) mkOption mkIf optionals literalExpression;
cfg = config.services.xserver.windowManager.xmonad;
ghcWithPackages = cfg.haskellPackages.ghcWithPackages;
···
enable = mkEnableOption "xmonad";
haskellPackages = mkOption {
default = pkgs.haskellPackages;
-
defaultText = "pkgs.haskellPackages";
-
example = literalExample "pkgs.haskell.packages.ghc784";
+
defaultText = literalExpression "pkgs.haskellPackages";
+
example = literalExpression "pkgs.haskell.packages.ghc784";
description = ''
haskellPackages used to build Xmonad and other packages.
This can be used to change the GHC version used to build
···
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = self: [];
-
defaultText = "self: []";
-
example = literalExample ''
+
defaultText = literalExpression "self: []";
+
example = literalExpression ''
haskellPackages: [
haskellPackages.xmonad-contrib
haskellPackages.monad-logger
+4 -3
nixos/modules/services/x11/xautolock.nix
···
locker = mkOption {
default = "${pkgs.xlockmore}/bin/xlock"; # default according to `man xautolock`
-
example = "${pkgs.i3lock}/bin/i3lock -i /path/to/img";
+
defaultText = literalExpression ''"''${pkgs.xlockmore}/bin/xlock"'';
+
example = literalExpression ''"''${pkgs.i3lock}/bin/i3lock -i /path/to/img"'';
type = types.str;
description = ''
···
nowlocker = mkOption {
default = null;
-
example = "${pkgs.i3lock}/bin/i3lock -i /path/to/img";
+
example = literalExpression ''"''${pkgs.i3lock}/bin/i3lock -i /path/to/img"'';
type = types.nullOr types.str;
description = ''
···
notifier = mkOption {
default = null;
-
example = "${pkgs.libnotify}/bin/notify-send \"Locking in 10 seconds\"";
+
example = literalExpression ''"''${pkgs.libnotify}/bin/notify-send 'Locking in 10 seconds'"'';
type = types.nullOr types.str;
description = ''
+3 -2
nixos/modules/services/x11/xserver.nix
···
inputClassSections = mkOption {
type = types.listOf types.lines;
default = [];
-
example = literalExample ''
+
example = literalExpression ''
[ '''
Identifier "Trackpoint Wheel Emulation"
MatchProduct "ThinkPad USB Keyboard with TrackPoint"
···
modules = mkOption {
type = types.listOf types.path;
default = [];
-
example = literalExample "[ pkgs.xf86_input_wacom ]";
+
example = literalExpression "[ pkgs.xf86_input_wacom ]";
description = "Packages to be added to the module search path of the X server.";
};
···
xkbDir = mkOption {
type = types.path;
default = "${pkgs.xkeyboard_config}/etc/X11/xkb";
+
defaultText = literalExpression ''"''${pkgs.xkeyboard_config}/etc/X11/xkb"'';
description = ''
Path used for -xkbdir xserver parameter.
'';
+4 -5
nixos/modules/system/activation/activation-script.nix
···
system.activationScripts = mkOption {
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{ stdio.text =
'''
# Needed by some programs.
···
system.userActivationScripts = mkOption {
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{ plasmaSetup = {
text = '''
${pkgs.libsForQt5.kservice}/bin/kbuildsycoca5"
···
environment.usrbinenv = mkOption {
default = "${pkgs.coreutils}/bin/env";
-
example = literalExample ''
-
"''${pkgs.busybox}/bin/env"
-
'';
+
defaultText = literalExpression ''"''${pkgs.coreutils}/bin/env"'';
+
example = literalExpression ''"''${pkgs.busybox}/bin/env"'';
type = types.nullOr types.path;
visible = false;
description = ''
+7 -3
nixos/modules/system/activation/top-level.nix
···
specialisation = mkOption {
default = {};
-
example = lib.literalExample "{ fewJobsManyCores.configuration = { nix.buildCores = 0; nix.maxJobs = 1; }; }";
+
example = lib.literalExpression "{ fewJobsManyCores.configuration = { nix.buildCores = 0; nix.maxJobs = 1; }; }";
description = ''
Additional configurations to build. If
<literal>inheritParentConfig</literal> is true, the system
···
system.replaceRuntimeDependencies = mkOption {
default = [];
-
example = lib.literalExample "[ ({ original = pkgs.openssl; replacement = pkgs.callPackage /path/to/openssl { }; }) ]";
+
example = lib.literalExpression "[ ({ original = pkgs.openssl; replacement = pkgs.callPackage /path/to/openssl { }; }) ]";
type = types.listOf (types.submodule (
{ ... }: {
options.original = mkOption {
···
if config.networking.hostName == ""
then "unnamed"
else config.networking.hostName;
-
defaultText = '''networking.hostName' if non empty else "unnamed"'';
+
defaultText = literalExpression ''
+
if config.networking.hostName == ""
+
then "unnamed"
+
else config.networking.hostName;
+
'';
description = ''
The name of the system used in the <option>system.build.toplevel</option> derivation.
</para><para>
+1 -1
nixos/modules/system/boot/initrd-openvpn.nix
···
</para>
</warning>
'';
-
example = "./configuration.ovpn";
+
example = literalExpression "./configuration.ovpn";
};
};
+1 -1
nixos/modules/system/boot/initrd-ssh.nix
···
authorizedKeys = mkOption {
type = types.listOf types.str;
default = config.users.users.root.openssh.authorizedKeys.keys;
-
defaultText = "config.users.users.root.openssh.authorizedKeys.keys";
+
defaultText = literalExpression "config.users.users.root.openssh.authorizedKeys.keys";
description = ''
Authorized keys for the root user on initrd.
'';
+6 -6
nixos/modules/system/boot/kernel.nix
···
boot.kernel.features = mkOption {
default = {};
-
example = literalExample "{ debug = true; }";
+
example = literalExpression "{ debug = true; }";
internal = true;
description = ''
This option allows to enable or disable certain kernel features.
···
});
# We don't want to evaluate all of linuxPackages for the manual
# - some of it might not even evaluate correctly.
-
defaultText = "pkgs.linuxPackages";
-
example = literalExample "pkgs.linuxKernel.packages.linux_5_10";
+
defaultText = literalExpression "pkgs.linuxPackages";
+
example = literalExpression "pkgs.linuxKernel.packages.linux_5_10";
description = ''
This option allows you to override the Linux kernel used by
NixOS. Since things like external kernel module packages are
···
boot.kernelPatches = mkOption {
type = types.listOf types.attrs;
default = [];
-
example = literalExample "[ pkgs.kernelPatches.ubuntu_fan_4_4 ]";
+
example = literalExpression "[ pkgs.kernelPatches.ubuntu_fan_4_4 ]";
description = "A list of additional patches to apply to the kernel.";
};
···
boot.extraModulePackages = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "[ config.boot.kernelPackages.nvidia_x11 ]";
+
example = literalExpression "[ config.boot.kernelPackages.nvidia_x11 ]";
description = "A list of additional packages supplying kernel modules.";
};
···
system.requiredKernelConfig = mkOption {
default = [];
-
example = literalExample ''
+
example = literalExpression ''
with config.lib.kernelConfig; [
(isYes "MODULES")
(isEnabled "FB_CON_DECOR")
+1 -1
nixos/modules/system/boot/kernel_config.nix
···
settings = mkOption {
type = types.attrsOf kernelItem;
-
example = literalExample '' with lib.kernel; {
+
example = literalExpression '' with lib.kernel; {
"9P_NET" = yes;
USB = option yes;
MMC_BLOCK_MINORS = freeform "32";
+6 -6
nixos/modules/system/boot/loader/grub/grub.nix
···
extraInstallCommands = mkOption {
default = "";
-
example = literalExample ''
+
example = ''
# the example below generates detached signatures that GRUB can verify
# https://www.gnu.org/software/grub/manual/grub/grub.html#Using-digital-signatures
''${pkgs.findutils}/bin/find /boot -not -path "/boot/efi/*" -type f -name '*.sig' -delete
···
extraFiles = mkOption {
type = types.attrsOf types.path;
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{ "memtest.bin" = "''${pkgs.memtest86plus}/memtest.bin"; }
'';
description = ''
···
splashImage = mkOption {
type = types.nullOr types.path;
-
example = literalExample "./my-background.png";
+
example = literalExpression "./my-background.png";
description = ''
Background image used for GRUB.
Set to <literal>null</literal> to run GRUB in text mode.
···
theme = mkOption {
type = types.nullOr types.path;
-
example = literalExample "pkgs.nixos-grub2-theme";
+
example = literalExpression "pkgs.nixos-grub2-theme";
default = null;
description = ''
Grub theme to be used.
···
font = mkOption {
type = types.nullOr types.path;
default = "${realGrub}/share/grub/unicode.pf2";
-
defaultText = ''"''${pkgs.grub2}/share/grub/unicode.pf2"'';
+
defaultText = literalExpression ''"''${pkgs.grub2}/share/grub/unicode.pf2"'';
description = ''
Path to a TrueType, OpenType, or pf2 font to be used by Grub.
'';
···
fontSize = mkOption {
type = types.nullOr types.int;
-
example = literalExample 16;
+
example = 16;
default = null;
description = ''
Font size for the grub menu. Ignored unless <literal>font</literal>
+1 -1
nixos/modules/system/boot/loader/grub/ipxe.nix
···
booting from the GRUB boot menu.
'';
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{ demo = '''
#!ipxe
dhcp
-2
nixos/modules/system/boot/luksroot.nix
···
};
encryptedPass = mkOption {
-
default = "";
type = types.path;
description = "Path to the GPG encrypted passphrase.";
};
publicKey = mkOption {
-
default = "";
type = types.path;
description = "Path to the Public Key.";
};
+4 -8
nixos/modules/system/boot/networkd.nix
···
options = {
wireguardPeerConfig = mkOption {
default = {};
-
example = { };
type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionWireGuardPeer;
description = ''
Each attribute in this set specifies an option in the
···
netdevOptions = commonNetworkOptions // {
netdevConfig = mkOption {
-
default = {};
example = { Name = "mybridge"; Kind = "bridge"; };
type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionNetdev;
description = ''
···
vxlanConfig = mkOption {
default = {};
-
example = { Id = "4"; };
type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionVXLAN;
description = ''
Each attribute in this set specifies an option in the
···
example = {
PrivateKeyFile = "/etc/wireguard/secret.key";
ListenPort = 51820;
-
FwMark = 42;
+
FirewallMark = 42;
};
type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionWireGuard;
description = ''
···
addressOptions = {
options = {
addressConfig = mkOption {
-
default = {};
example = { Address = "192.168.0.100/24"; };
type = types.addCheck (types.attrsOf unitOption) check.network.sectionAddress;
description = ''
···
options = {
routingPolicyRuleConfig = mkOption {
default = { };
-
example = { routingPolicyRuleConfig = { Table = 10; IncomingInterface = "eth1"; Family = "both"; } ;};
+
example = { Table = 10; IncomingInterface = "eth1"; Family = "both"; };
type = types.addCheck (types.attrsOf unitOption) check.network.sectionRoutingPolicyRule;
description = ''
Each attribute in this set specifies an option in the
···
dhcpV6Config = mkOption {
default = {};
-
example = { UseDNS = true; UseRoutes = true; };
+
example = { UseDNS = true; };
type = types.addCheck (types.attrsOf unitOption) check.network.sectionDHCPv6;
description = ''
Each attribute in this set specifies an option in the
···
ipv6Prefixes = mkOption {
default = [];
-
example = { AddressAutoconfiguration = true; OnLink = true; };
+
example = [ { AddressAutoconfiguration = true; OnLink = true; } ];
type = with types; listOf (submodule ipv6PrefixOptions);
description = ''
A list of ipv6Prefix sections to be added to the unit. See
+2 -1
nixos/modules/system/boot/plymouth.nix
···
font = mkOption {
default = "${pkgs.dejavu_fonts.minimal}/share/fonts/truetype/DejaVuSans.ttf";
+
defaultText = literalExpression ''"''${pkgs.dejavu_fonts.minimal}/share/fonts/truetype/DejaVuSans.ttf"'';
type = types.path;
description = ''
Font file made available for displaying text on the splash screen.
···
type = types.path;
# Dimensions are 48x48 to match GDM logo
default = "${nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake-white.png";
-
defaultText = ''pkgs.fetchurl {
+
defaultText = literalExpression ''pkgs.fetchurl {
url = "https://nixos.org/logo/nixos-hires.png";
sha256 = "1ivzgd7iz0i06y36p8m5w48fd8pjqwxhdaavc0pxs7w1g7mcy5si";
}'';
+3 -3
nixos/modules/system/boot/stage-1.nix
···
boot.initrd.enable = mkOption {
type = types.bool;
default = !config.boot.isContainer;
-
defaultText = "!config.boot.isContainer";
+
defaultText = literalExpression "!config.boot.isContainer";
description = ''
Whether to enable the NixOS initial RAM disk (initrd). This may be
needed to perform some initialisation tasks (like mounting
···
then "zstd"
else "gzip"
);
-
defaultText = "zstd if the kernel supports it (5.9+), gzip if not.";
+
defaultText = literalDocBook "<literal>zstd</literal> if the kernel supports it (5.9+), <literal>gzip</literal> if not";
type = types.unspecified; # We don't have a function type...
description = ''
The compressor to use on the initrd image. May be any of:
···
is the path it should be copied from (or null for the same
path inside and out).
'';
-
example = literalExample
+
example = literalExpression
''
{ "/etc/dropbear/dropbear_rsa_host_key" =
./secret-dropbear-key;
+5 -5
nixos/modules/system/boot/systemd.nix
···
systemd.package = mkOption {
default = pkgs.systemd;
-
defaultText = "pkgs.systemd";
+
defaultText = literalExpression "pkgs.systemd";
type = types.package;
description = "The systemd package.";
};
···
systemd.packages = mkOption {
default = [];
type = types.listOf types.package;
-
example = literalExample "[ pkgs.systemd-cryptsetup-generator ]";
+
example = literalExpression "[ pkgs.systemd-cryptsetup-generator ]";
description = "Packages providing systemd units and hooks.";
};
···
services.journald.forwardToSyslog = mkOption {
default = config.services.rsyslogd.enable || config.services.syslog-ng.enable;
-
defaultText = "services.rsyslogd.enable || services.syslog-ng.enable";
+
defaultText = literalExpression "services.rsyslogd.enable || services.syslog-ng.enable";
type = types.bool;
description = ''
Whether to forward log messages to syslog.
···
services.logind.lidSwitchExternalPower = mkOption {
default = config.services.logind.lidSwitch;
-
defaultText = "services.logind.lidSwitch";
+
defaultText = literalExpression "services.logind.lidSwitch";
example = "ignore";
type = logindHandlerType;
···
systemd.tmpfiles.packages = mkOption {
type = types.listOf types.package;
default = [];
-
example = literalExample "[ pkgs.lvm2 ]";
+
example = literalExpression "[ pkgs.lvm2 ]";
apply = map getLib;
description = ''
List of packages containing <command>systemd-tmpfiles</command> rules.
+1 -1
nixos/modules/system/etc/etc.nix
···
environment.etc = mkOption {
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{ example-configuration-file =
{ source = "/nix/store/.../etc/dir/file.conf.example";
mode = "0440";
+1 -1
nixos/modules/tasks/filesystems.nix
···
fileSystems = mkOption {
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{
"/".device = "/dev/hda1";
"/data" = {
+1 -1
nixos/modules/tasks/filesystems/nfs.nix
···
<link xlink:href="https://linux.die.net/man/5/idmapd.conf"/>
for details.
'';
-
example = literalExample ''
+
example = literalExpression ''
{
Translation = {
GSS-Methods = "static,nsswitch";
+2 -3
nixos/modules/tasks/filesystems/zfs.nix
···
readOnly = true;
type = types.package;
default = if config.boot.zfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs;
-
defaultText = "if config.boot.zfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs";
+
defaultText = literalExpression "if config.boot.zfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs";
description = "Configured ZFS userland tools package.";
};
···
devNodes = mkOption {
type = types.path;
default = "/dev/disk/by-id";
-
example = "/dev/disk/by-id";
description = ''
Name of directory from which to import ZFS devices.
···
settings = mkOption {
type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
-
example = literalExample ''
+
example = literalExpression ''
{
ZED_DEBUG_LOG = "/tmp/zed.debug.log";
+1 -1
nixos/modules/tasks/lvm.nix
···
type = types.package;
default = if cfg.dmeventd.enable then pkgs.lvm2_dmeventd else pkgs.lvm2;
internal = true;
-
defaultText = "pkgs.lvm2";
+
defaultText = literalExpression "pkgs.lvm2";
description = ''
This option allows you to override the LVM package that's used on the system
(udev rules, tmpfiles, systemd services).
+9 -10
nixos/modules/tasks/network-interfaces.nix
···
tempAddress = mkOption {
type = types.enum (lib.attrNames tempaddrValues);
default = cfg.tempAddresses;
-
defaultText = literalExample ''config.networking.tempAddresses'';
+
defaultText = literalExpression ''config.networking.tempAddresses'';
description = ''
When IPv6 is enabled with SLAAC, this option controls the use of
temporary address (aka privacy extensions) on this
···
virtualType = mkOption {
default = if hasPrefix "tun" name then "tun" else "tap";
-
defaultText = literalExample ''if hasPrefix "tun" name then "tun" else "tap"'';
+
defaultText = literalExpression ''if hasPrefix "tun" name then "tun" else "tap"'';
type = with types; enum [ "tun" "tap" ];
description = ''
The type of interface to create.
···
The FQDN is required but cannot be determined. Please make sure that
both networking.hostName and networking.domain are set properly.
'';
-
defaultText = literalExample ''''${networking.hostName}.''${networking.domain}'';
+
defaultText = literalExpression ''"''${networking.hostName}.''${networking.domain}"'';
description = ''
The fully qualified domain name (FQDN) of this host. It is the result
of combining networking.hostName and networking.domain. Using this
···
options = {
interfaces = mkOption {
-
example = [ "eth0" "eth1" ];
description = "The physical network interfaces connected by the vSwitch.";
type = with types; attrsOf (submodule vswitchInterfaceOpts);
};
···
'';
in mkOption {
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
bond0 = {
interfaces = [ "eth0" "wlan0" ];
···
driverOptions = mkOption {
type = types.attrsOf types.str;
default = {};
-
example = literalExample driverOptionsExample;
+
example = literalExpression driverOptionsExample;
description = ''
Options for the bonding driver.
Documentation can be found in
···
networking.macvlans = mkOption {
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
wan = {
interface = "enp2s0";
···
networking.sits = mkOption {
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
hurricane = {
remote = "10.0.0.1";
···
networking.vlans = mkOption {
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
vlan0 = {
id = 3;
···
networking.wlanInterfaces = mkOption {
default = { };
-
example = literalExample ''
+
example = literalExpression ''
{
wlan-station0 = {
device = "wlp6s0";
+1 -1
nixos/modules/virtualisation/anbox.nix
···
image = mkOption {
default = pkgs.anbox.image;
-
example = literalExample "pkgs.anbox.image";
+
defaultText = literalExpression "pkgs.anbox.image";
type = types.package;
description = ''
Base android image for Anbox.
+4 -4
nixos/modules/virtualisation/containers.nix
···
let
cfg = config.virtualisation.containers;
-
inherit (lib) mkOption types;
+
inherit (lib) literalExpression mkOption types;
toml = pkgs.formats.toml { };
in
···
containersConf.cniPlugins = mkOption {
type = types.listOf types.package;
-
defaultText = ''
+
defaultText = literalExpression ''
[
pkgs.cni-plugins
]
'';
-
example = lib.literalExample ''
+
example = literalExpression ''
[
pkgs.cniPlugins.dnsname
]
···
policy = mkOption {
default = {};
type = types.attrs;
-
example = lib.literalExample ''
+
example = literalExpression ''
{
default = [ { type = "insecureAcceptAnything"; } ];
transports = {
+4 -4
nixos/modules/virtualisation/cri-o.nix
···
type = types.nullOr types.str;
default = null;
description = "Override the default pause image for pod sandboxes";
-
example = [ "k8s.gcr.io/pause:3.2" ];
+
example = "k8s.gcr.io/pause:3.2";
};
pauseCommand = mkOption {
type = types.nullOr types.str;
default = null;
description = "Override the default pause command";
-
example = [ "/pause" ];
+
example = "/pause";
};
runtime = mkOption {
type = types.nullOr types.str;
default = null;
description = "Override the default runtime";
-
example = [ "crun" ];
+
example = "crun";
};
extraPackages = mkOption {
type = with types; listOf package;
default = [ ];
-
example = literalExample ''
+
example = literalExpression ''
[
pkgs.gvisor
]
+1 -1
nixos/modules/virtualisation/digital-ocean-init.nix
···
options.virtualisation.digitalOcean.defaultConfigFile = mkOption {
type = types.path;
default = defaultConfigFile;
-
defaultText = ''
+
defaultText = literalDocBook ''
The default configuration imports user-data if applicable and
<literal>(modulesPath + "/virtualisation/digital-ocean-config.nix")</literal>.
'';
+2 -1
nixos/modules/virtualisation/docker.nix
···
package = mkOption {
default = pkgs.docker;
+
defaultText = literalExpression "pkgs.docker";
type = types.package;
-
example = pkgs.docker-edge;
+
example = literalExpression "pkgs.docker-edge";
description = ''
Docker package to be used in the module.
'';
+1 -1
nixos/modules/virtualisation/ecs-agent.nix
···
type = types.path;
description = "The ECS agent package to use";
default = pkgs.ecs-agent;
-
defaultText = "pkgs.ecs-agent";
+
defaultText = literalExpression "pkgs.ecs-agent";
};
extra-environment = mkOption {
+2 -1
nixos/modules/virtualisation/libvirtd.nix
···
package = mkOption {
type = types.package;
default = pkgs.libvirt;
-
defaultText = "pkgs.libvirt";
+
defaultText = literalExpression "pkgs.libvirt";
description = ''
libvirt package to use.
'';
···
qemuPackage = mkOption {
type = types.package;
default = pkgs.qemu;
+
defaultText = literalExpression "pkgs.qemu";
description = ''
Qemu package to use with libvirt.
`pkgs.qemu` can emulate alien architectures (e.g. aarch64 on x86)
+3 -3
nixos/modules/virtualisation/lxd.nix
···
package = mkOption {
type = types.package;
default = pkgs.lxd.override { nftablesSupport = config.networking.nftables.enable; };
-
defaultText = "pkgs.lxd";
+
defaultText = literalExpression "pkgs.lxd";
description = ''
The LXD package to use.
'';
···
lxcPackage = mkOption {
type = types.package;
default = pkgs.lxc;
-
defaultText = "pkgs.lxc";
+
defaultText = literalExpression "pkgs.lxc";
description = ''
The LXC package to use with LXD (required for AppArmor profiles).
'';
···
zfsSupport = mkOption {
type = types.bool;
default = config.boot.zfs.enabled;
-
defaultText = "config.boot.zfs.enabled";
+
defaultText = literalExpression "config.boot.zfs.enabled";
description = ''
Enables lxd to use zfs as a storage for containers.
+3 -3
nixos/modules/virtualisation/nixos-containers.nix
···
nixpkgs = mkOption {
type = types.path;
default = pkgs.path;
-
defaultText = "pkgs.path";
+
defaultText = literalExpression "pkgs.path";
description = ''
A path to the nixpkgs that provide the modules, pkgs and lib for evaluating the container.
···
bindMounts = mkOption {
type = with types; attrsOf (submodule bindMountOpts);
default = {};
-
example = literalExample ''
+
example = literalExpression ''
{ "/home" = { hostPath = "/home/alice";
isReadOnly = false; };
}
···
}));
default = {};
-
example = literalExample
+
example = literalExpression
''
{ webserver =
{ path = "/nix/var/nix/profiles/webserver";
+8 -8
nixos/modules/virtualisation/oci-containers.nix
···
You still need to set the <literal>image</literal> attribute, as it
will be used as the image name for docker to start a container.
'';
-
example = literalExample "pkgs.dockerTools.buildDockerImage {...};";
+
example = literalExpression "pkgs.dockerTools.buildDockerImage {...};";
};
login = {
···
type = with types; listOf str;
default = [];
description = "Commandline arguments to pass to the image's entrypoint.";
-
example = literalExample ''
+
example = literalExpression ''
["--port=9000"]
'';
};
···
type = with types; attrsOf str;
default = {};
description = "Environment variables to set for this container.";
-
example = literalExample ''
+
example = literalExpression ''
{
DATABASE_HOST = "db.example.com";
DATABASE_PORT = "3306";
···
type = with types; listOf path;
default = [];
description = "Environment files for this container.";
-
example = literalExample ''
+
example = literalExpression ''
[
/path/to/.env
/path/to/.env.secret
···
<link xlink:href="https://docs.docker.com/engine/reference/run/#expose-incoming-ports">
Docker engine documentation</link> for full details.
'';
-
example = literalExample ''
+
example = literalExpression ''
[
"8080:9000"
]
···
<link xlink:href="https://docs.docker.com/engine/reference/run/#volume-shared-filesystems">
docker engine documentation</link> for details.
'';
-
example = literalExample ''
+
example = literalExpression ''
[
"volume_name:/path/inside/container"
"/path/on/host:/path/inside/container"
···
Use the same name as the attribute under <literal>virtualisation.oci-containers.containers</literal>.
'';
-
example = literalExample ''
+
example = literalExpression ''
virtualisation.oci-containers.containers = {
node1 = {};
node2 = {
···
type = with types; listOf str;
default = [];
description = "Extra options for <command>${defaultBackend} run</command>.";
-
example = literalExample ''
+
example = literalExpression ''
["--network=host"]
'';
};
+1 -1
nixos/modules/virtualisation/openvswitch.nix
···
package = mkOption {
type = types.package;
default = pkgs.openvswitch;
-
defaultText = "pkgs.openvswitch";
+
defaultText = literalExpression "pkgs.openvswitch";
description = ''
Open vSwitch package to use.
'';
+1 -2
nixos/modules/virtualisation/parallels-guest.nix
···
package = mkOption {
type = types.nullOr types.package;
default = config.boot.kernelPackages.prl-tools;
-
defaultText = "config.boot.kernelPackages.prl-tools";
-
example = literalExample "config.boot.kernelPackages.prl-tools";
+
defaultText = literalExpression "config.boot.kernelPackages.prl-tools";
description = ''
Defines which package to use for prl-tools. Override to change the version.
'';
+1 -1
nixos/modules/virtualisation/podman.nix
···
extraPackages = mkOption {
type = with types; listOf package;
default = [ ];
-
example = lib.literalExample ''
+
example = lib.literalExpression ''
[
pkgs.gvisor
]
+1
nixos/modules/virtualisation/qemu-guest-agent.nix
···
package = mkOption {
type = types.package;
default = pkgs.qemu.ga;
+
defaultText = literalExpression "pkgs.qemu.ga";
description = "The QEMU guest agent package.";
};
};
+1 -1
nixos/modules/virtualisation/qemu-vm.nix
···
};
});
default = [];
-
example = lib.literalExample
+
example = lib.literalExpression
''
[ # forward local port 2222 -> 22, to ssh into the VM
{ from = "host"; host.port = 2222; guest.port = 22; }
+3 -4
nixos/modules/virtualisation/railcar.nix
···
description = "Source for the in-container mount";
};
options = mkOption {
-
type = attrsOf (str);
+
type = listOf str;
default = [ "bind" ];
description = ''
Mount options of the filesystem to be used.
···
The defaults have been chosen for simple bindmounts, meaning
that you only need to provide the "source" parameter.
'';
-
example = ''
-
{ "/data" = { source = "/var/lib/data"; }; }
-
'';
+
example = { "/data" = { source = "/var/lib/data"; }; };
};
runType = mkOption {
···
package = mkOption {
type = types.package;
default = pkgs.railcar;
+
defaultText = literalExpression "pkgs.railcar";
description = "Railcar package to use";
};
};
+1 -1
nixos/modules/virtualisation/virtualbox-host.nix
···
package = mkOption {
type = types.package;
default = pkgs.virtualbox;
-
defaultText = "pkgs.virtualbox";
+
defaultText = literalExpression "pkgs.virtualbox";
description = ''
Which VirtualBox package to use.
'';
+4 -4
nixos/modules/virtualisation/xen-dom0.nix
···
virtualisation.xen.package = mkOption {
type = types.package;
-
defaultText = "pkgs.xen";
-
example = literalExample "pkgs.xen-light";
+
defaultText = literalExpression "pkgs.xen";
+
example = literalExpression "pkgs.xen-light";
description = ''
The package used for Xen binary.
'';
···
virtualisation.xen.package-qemu = mkOption {
type = types.package;
-
defaultText = "pkgs.xen";
-
example = literalExample "pkgs.qemu_xen-light";
+
defaultText = literalExpression "pkgs.xen";
+
example = literalExpression "pkgs.qemu_xen-light";
description = ''
The package with qemu binaries for dom0 qemu and xendomains.
'';