summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/cluster/k3s/default.nix1
-rw-r--r--nixos/modules/services/mail/postfix.nix2
-rw-r--r--nixos/modules/services/misc/rippled.nix1
-rw-r--r--nixos/modules/services/misc/svnserve.nix1
-rw-r--r--nixos/modules/services/misc/weechat.nix1
-rw-r--r--nixos/modules/services/network-filesystems/netatalk.nix3
-rw-r--r--nixos/modules/services/network-filesystems/openafs/server.nix1
-rw-r--r--nixos/modules/services/networking/bind.nix36
-rw-r--r--nixos/modules/services/networking/ircd-hybrid/default.nix8
-rw-r--r--nixos/modules/services/networking/mailpile.nix4
-rw-r--r--nixos/modules/services/networking/prayer.nix3
-rw-r--r--nixos/modules/services/networking/quassel.nix4
-rw-r--r--nixos/modules/services/networking/radvd.nix1
-rw-r--r--nixos/modules/services/networking/shairport-sync.nix2
-rw-r--r--nixos/modules/services/networking/ssh/lshd.nix6
-rw-r--r--nixos/modules/services/web-apps/mediawiki.nix1
-rw-r--r--nixos/modules/services/web-servers/nginx/default.nix1
-rw-r--r--nixos/modules/services/web-servers/unit/default.nix2
-rw-r--r--nixos/modules/services/x11/desktop-managers/cinnamon.nix1
-rw-r--r--nixos/modules/services/x11/desktop-managers/gnome3.nix1
-rw-r--r--nixos/modules/services/x11/desktop-managers/pantheon.nix1
-rw-r--r--nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix1
-rw-r--r--nixos/modules/tasks/filesystems.nix9
23 files changed, 83 insertions, 8 deletions
diff --git a/nixos/modules/services/cluster/k3s/default.nix b/nixos/modules/services/cluster/k3s/default.nix
index f0317fdbd160..e62fbc94415c 100644
--- a/nixos/modules/services/cluster/k3s/default.nix
+++ b/nixos/modules/services/cluster/k3s/default.nix
@@ -47,6 +47,7 @@ in
extraFlags = mkOption {
description = "Extra flags to pass to the k3s command.";
+ type = types.str;
default = "";
example = "--no-deploy traefik --cluster-cidr 10.24.0.0/16";
};
diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix
index 1dcdcab8d481..63c0961b7568 100644
--- a/nixos/modules/services/mail/postfix.nix
+++ b/nixos/modules/services/mail/postfix.nix
@@ -560,6 +560,7 @@ in
transport = mkOption {
default = "";
+ type = types.lines;
description = "
Entries for the transport map, cf. man-page transport(8).
";
@@ -573,6 +574,7 @@ in
dnsBlacklistOverrides = mkOption {
default = "";
+ type = types.lines;
description = "contents of check_client_access for overriding dnsBlacklists";
};
diff --git a/nixos/modules/services/misc/rippled.nix b/nixos/modules/services/misc/rippled.nix
index ef34e3a779f0..2fce3b9dc94c 100644
--- a/nixos/modules/services/misc/rippled.nix
+++ b/nixos/modules/services/misc/rippled.nix
@@ -389,6 +389,7 @@ in
extraConfig = mkOption {
default = "";
+ type = types.lines;
description = ''
Extra lines to be added verbatim to the rippled.cfg configuration file.
'';
diff --git a/nixos/modules/services/misc/svnserve.nix b/nixos/modules/services/misc/svnserve.nix
index f70e3ca7fef0..5fa262ca3b94 100644
--- a/nixos/modules/services/misc/svnserve.nix
+++ b/nixos/modules/services/misc/svnserve.nix
@@ -24,6 +24,7 @@ in
};
svnBaseDir = mkOption {
+ type = types.str;
default = "/repos";
description = "Base directory from which Subversion repositories are accessed.";
};
diff --git a/nixos/modules/services/misc/weechat.nix b/nixos/modules/services/misc/weechat.nix
index c6ff540ea12f..b71250f62e0f 100644
--- a/nixos/modules/services/misc/weechat.nix
+++ b/nixos/modules/services/misc/weechat.nix
@@ -20,6 +20,7 @@ in
type = types.str;
};
binary = mkOption {
+ type = types.path;
description = "Binary to execute (by default \${weechat}/bin/weechat).";
example = literalExample ''
''${pkgs.weechat}/bin/weechat-headless
diff --git a/nixos/modules/services/network-filesystems/netatalk.nix b/nixos/modules/services/network-filesystems/netatalk.nix
index ca9d32311f5f..33e851210bc6 100644
--- a/nixos/modules/services/network-filesystems/netatalk.nix
+++ b/nixos/modules/services/network-filesystems/netatalk.nix
@@ -46,6 +46,7 @@ in
enable = mkEnableOption "the Netatalk AFP fileserver";
port = mkOption {
+ type = types.port;
default = 548;
description = "TCP port to be used for AFP.";
};
@@ -68,6 +69,7 @@ in
};
path = mkOption {
+ type = types.str;
default = "";
example = "afp-data";
description = "Share not the whole user home but this subdirectory path.";
@@ -75,6 +77,7 @@ in
basedirRegex = mkOption {
example = "/home";
+ type = types.str;
description = "Regex which matches the parent directory of the user homes.";
};
diff --git a/nixos/modules/services/network-filesystems/openafs/server.nix b/nixos/modules/services/network-filesystems/openafs/server.nix
index d782f7821656..4fce650b0133 100644
--- a/nixos/modules/services/network-filesystems/openafs/server.nix
+++ b/nixos/modules/services/network-filesystems/openafs/server.nix
@@ -61,6 +61,7 @@ in {
};
advertisedAddresses = mkOption {
+ type = types.listOf types.str;
default = [];
description = "List of IP addresses this server is advertised under. See NetInfo(5)";
};
diff --git a/nixos/modules/services/networking/bind.nix b/nixos/modules/services/networking/bind.nix
index faad88635759..e507e8ce9eeb 100644
--- a/nixos/modules/services/networking/bind.nix
+++ b/nixos/modules/services/networking/bind.nix
@@ -8,6 +8,35 @@ let
bindUser = "named";
+ bindZoneOptions = {
+ name = mkOption {
+ type = types.str;
+ description = "Name of the zone.";
+ };
+ master = mkOption {
+ description = "Master=false means slave server";
+ type = types.bool;
+ };
+ file = mkOption {
+ type = types.either types.str types.path;
+ description = "Zone file resource records contain columns of data, separated by whitespace, that define the record.";
+ };
+ masters = mkOption {
+ type = types.listOf types.str;
+ description = "List of servers for inclusion in stub and secondary zones.";
+ };
+ slaves = mkOption {
+ type = types.listOf types.str;
+ description = "Addresses who may request zone transfers.";
+ default = [];
+ };
+ extraConfig = mkOption {
+ type = types.str;
+ description = "Extra zone config to be appended at the end of the zone section.";
+ default = "";
+ };
+ };
+
confFile = pkgs.writeText "named.conf"
''
include "/etc/bind/rndc.key";
@@ -72,6 +101,7 @@ in
cacheNetworks = mkOption {
default = ["127.0.0.0/24"];
+ type = types.listOf types.str;
description = "
What networks are allowed to use us as a resolver. Note
that this is for recursive queries -- all networks are
@@ -83,6 +113,7 @@ in
blockedNetworks = mkOption {
default = [];
+ type = types.listOf types.str;
description = "
What networks are just blocked.
";
@@ -90,6 +121,7 @@ in
ipv4Only = mkOption {
default = false;
+ type = types.bool;
description = "
Only use ipv4, even if the host supports ipv6.
";
@@ -97,6 +129,7 @@ in
forwarders = mkOption {
default = config.networking.nameservers;
+ type = types.listOf types.str;
description = "
List of servers we should forward requests to.
";
@@ -120,10 +153,9 @@ in
zones = mkOption {
default = [];
+ type = types.listOf (types.submodule [ { options = bindZoneOptions; } ]);
description = "
List of zones we claim authority over.
- master=false means slave server; slaves means addresses
- who may request zone transfer.
";
example = [{
name = "example.com";
diff --git a/nixos/modules/services/networking/ircd-hybrid/default.nix b/nixos/modules/services/networking/ircd-hybrid/default.nix
index 91d0bf437d69..0781159b6ee7 100644
--- a/nixos/modules/services/networking/ircd-hybrid/default.nix
+++ b/nixos/modules/services/networking/ircd-hybrid/default.nix
@@ -40,6 +40,7 @@ in
serverName = mkOption {
default = "hades.arpa";
+ type = types.str;
description = "
IRCD server name.
";
@@ -47,6 +48,7 @@ in
sid = mkOption {
default = "0NL";
+ type = types.str;
description = "
IRCD server unique ID in a net of servers.
";
@@ -54,6 +56,7 @@ in
description = mkOption {
default = "Hybrid-7 IRC server.";
+ type = types.str;
description = "
IRCD server description.
";
@@ -62,6 +65,7 @@ in
rsaKey = mkOption {
default = null;
example = literalExample "/root/certificates/irc.key";
+ type = types.nullOr types.path;
description = "
IRCD server RSA key.
";
@@ -70,6 +74,7 @@ in
certificate = mkOption {
default = null;
example = literalExample "/root/certificates/irc.pem";
+ type = types.nullOr types.path;
description = "
IRCD server SSL certificate. There are some limitations - read manual.
";
@@ -77,6 +82,7 @@ in
adminEmail = mkOption {
default = "<bit-bucket@example.com>";
+ type = types.str;
example = "<name@domain.tld>";
description = "
IRCD server administrator e-mail.
@@ -86,6 +92,7 @@ in
extraIPs = mkOption {
default = [];
example = ["127.0.0.1"];
+ type = types.listOf types.str;
description = "
Extra IP's to bind.
";
@@ -93,6 +100,7 @@ in
extraPort = mkOption {
default = "7117";
+ type = types.str;
description = "
Extra port to avoid filtering.
";
diff --git a/nixos/modules/services/networking/mailpile.nix b/nixos/modules/services/networking/mailpile.nix
index b79ee11d17db..4673a2580b60 100644
--- a/nixos/modules/services/networking/mailpile.nix
+++ b/nixos/modules/services/networking/mailpile.nix
@@ -21,11 +21,13 @@ in
enable = mkEnableOption "Mailpile the mail client";
hostname = mkOption {
+ type = types.str;
default = "localhost";
description = "Listen to this hostname or ip.";
};
port = mkOption {
- default = "33411";
+ type = types.port;
+ default = 33411;
description = "Listen on this port.";
};
};
diff --git a/nixos/modules/services/networking/prayer.nix b/nixos/modules/services/networking/prayer.nix
index f04dac01d9b8..ae9258b27122 100644
--- a/nixos/modules/services/networking/prayer.nix
+++ b/nixos/modules/services/networking/prayer.nix
@@ -44,7 +44,8 @@ in
enable = mkEnableOption "the prayer webmail http server";
port = mkOption {
- default = "2080";
+ default = 2080;
+ type = types.port;
description = ''
Port the prayer http server is listening to.
'';
diff --git a/nixos/modules/services/networking/quassel.nix b/nixos/modules/services/networking/quassel.nix
index 2958fb9a8b33..bfbd3b46ab4d 100644
--- a/nixos/modules/services/networking/quassel.nix
+++ b/nixos/modules/services/networking/quassel.nix
@@ -45,6 +45,7 @@ in
};
interfaces = mkOption {
+ type = types.listOf types.str;
default = [ "127.0.0.1" ];
description = ''
The interfaces the Quassel daemon will be listening to. If `[ 127.0.0.1 ]',
@@ -54,6 +55,7 @@ in
};
portNumber = mkOption {
+ type = types.port;
default = 4242;
description = ''
The port number the Quassel daemon will be listening to.
@@ -62,6 +64,7 @@ in
dataDir = mkOption {
default = "/home/${user}/.config/quassel-irc.org";
+ type = types.str;
description = ''
The directory holding configuration files, the SQlite database and the SSL Cert.
'';
@@ -69,6 +72,7 @@ in
user = mkOption {
default = null;
+ type = types.nullOr types.str;
description = ''
The existing user the Quassel daemon should run as. If left empty, a default "quassel" user will be created.
'';
diff --git a/nixos/modules/services/networking/radvd.nix b/nixos/modules/services/networking/radvd.nix
index f4b00c9b356e..53fac4b7b72d 100644
--- a/nixos/modules/services/networking/radvd.nix
+++ b/nixos/modules/services/networking/radvd.nix
@@ -33,6 +33,7 @@ in
};
services.radvd.config = mkOption {
+ type = types.lines;
example =
''
interface eth0 {
diff --git a/nixos/modules/services/networking/shairport-sync.nix b/nixos/modules/services/networking/shairport-sync.nix
index b4b86a2d55be..ac526c0e9f6f 100644
--- a/nixos/modules/services/networking/shairport-sync.nix
+++ b/nixos/modules/services/networking/shairport-sync.nix
@@ -28,6 +28,7 @@ in
};
arguments = mkOption {
+ type = types.str;
default = "-v -o pa";
description = ''
Arguments to pass to the daemon. Defaults to a local pulseaudio
@@ -36,6 +37,7 @@ in
};
user = mkOption {
+ type = types.str;
default = "shairport";
description = ''
User account name under which to run shairport-sync. The account
diff --git a/nixos/modules/services/networking/ssh/lshd.nix b/nixos/modules/services/networking/ssh/lshd.nix
index e46d62bf1e82..862ff7df0540 100644
--- a/nixos/modules/services/networking/ssh/lshd.nix
+++ b/nixos/modules/services/networking/ssh/lshd.nix
@@ -29,6 +29,7 @@ in
portNumber = mkOption {
default = 22;
+ type = types.port;
description = ''
The port on which to listen for connections.
'';
@@ -36,6 +37,7 @@ in
interfaces = mkOption {
default = [];
+ type = types.listOf types.str;
description = ''
List of network interfaces where listening for connections.
When providing the empty list, `[]', lshd listens on all
@@ -46,6 +48,7 @@ in
hostKey = mkOption {
default = "/etc/lsh/host-key";
+ type = types.str;
description = ''
Path to the server's private key. Note that this key must
have been created, e.g., using "lsh-keygen --server |
@@ -79,6 +82,7 @@ in
loginShell = mkOption {
default = null;
+ type = types.nullOr types.str;
description = ''
If non-null, override the default login shell with the
specified value.
@@ -88,6 +92,7 @@ in
srpKeyExchange = mkOption {
default = false;
+ type = types.bool;
description = ''
Whether to enable SRP key exchange and user authentication.
'';
@@ -106,6 +111,7 @@ in
};
subsystems = mkOption {
+ type = types.listOf types.path;
description = ''
List of subsystem-path pairs, where the head of the pair
denotes the subsystem name, and the tail denotes the path to
diff --git a/nixos/modules/services/web-apps/mediawiki.nix b/nixos/modules/services/web-apps/mediawiki.nix
index 0a5b6047bb58..1db1652022a3 100644
--- a/nixos/modules/services/web-apps/mediawiki.nix
+++ b/nixos/modules/services/web-apps/mediawiki.nix
@@ -180,6 +180,7 @@ in
};
name = mkOption {
+ type = types.str;
default = "MediaWiki";
example = "Foobar Wiki";
description = "Name of the wiki.";
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index d6f463be9e81..29cb7cedcb0f 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -404,6 +404,7 @@ in
logError = mkOption {
default = "stderr";
+ type = types.str;
description = "
Configures logging.
The first parameter defines a file that will store the log. The
diff --git a/nixos/modules/services/web-servers/unit/default.nix b/nixos/modules/services/web-servers/unit/default.nix
index 894271d1e55e..2a264bf2e9a6 100644
--- a/nixos/modules/services/web-servers/unit/default.nix
+++ b/nixos/modules/services/web-servers/unit/default.nix
@@ -28,10 +28,12 @@ in {
description = "Group account under which unit runs.";
};
stateDir = mkOption {
+ type = types.path;
default = "/var/spool/unit";
description = "Unit data directory.";
};
logDir = mkOption {
+ type = types.path;
default = "/var/log/unit";
description = "Unit log directory.";
};
diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix
index a404143a03d4..14dcf009a7d1 100644
--- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix
+++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix
@@ -25,6 +25,7 @@ in
sessionPath = mkOption {
default = [];
+ type = types.listOf types.package;
example = literalExample "[ pkgs.gnome3.gpaste ]";
description = ''
Additional list of packages to be added to the session search path.
diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix
index a36a47d376b6..671301246a8c 100644
--- a/nixos/modules/services/x11/desktop-managers/gnome3.nix
+++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix
@@ -118,6 +118,7 @@ in
sessionPath = mkOption {
default = [];
+ type = types.listOf types.package;
example = literalExample "[ pkgs.gnome3.gpaste ]";
description = ''
Additional list of packages to be added to the session search path.
diff --git a/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixos/modules/services/x11/desktop-managers/pantheon.nix
index cf02a71248b1..195da75e7443 100644
--- a/nixos/modules/services/x11/desktop-managers/pantheon.nix
+++ b/nixos/modules/services/x11/desktop-managers/pantheon.nix
@@ -42,6 +42,7 @@ in
sessionPath = mkOption {
default = [];
+ type = types.listOf types.package;
example = literalExample "[ pkgs.gnome3.gpaste ]";
description = ''
Additional list of packages to be added to the session search path.
diff --git a/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix b/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix
index de932e6e840a..9c1dc1d1c12d 100644
--- a/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix
+++ b/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix
@@ -88,6 +88,7 @@ in
cursorTheme = {
package = mkOption {
+ type = types.package;
default = pkgs.gnome3.adwaita-icon-theme;
defaultText = "pkgs.gnome3.adwaita-icon-theme";
description = ''
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix
index a055072f9c96..a9b5b134d889 100644
--- a/nixos/modules/tasks/filesystems.nix
+++ b/nixos/modules/tasks/filesystems.nix
@@ -7,8 +7,9 @@ let
addCheckDesc = desc: elemType: check: types.addCheck elemType check
// { description = "${elemType.description} (with check: ${desc})"; };
- nonEmptyStr = addCheckDesc "non-empty" types.str
- (x: x != "" && ! (all (c: c == " " || c == "\t") (stringToCharacters x)));
+
+ isNonEmpty = s: (builtins.match "[ \t\n]*" s) == null;
+ nonEmptyStr = addCheckDesc "non-empty" types.str isNonEmpty;
fileSystems' = toposort fsBefore (attrValues config.fileSystems);
@@ -28,10 +29,10 @@ let
coreFileSystemOpts = { name, config, ... }: {
options = {
-
mountPoint = mkOption {
example = "/mnt/usb";
- type = nonEmptyStr;
+ type = addCheckDesc "non-empty without trailing slash" types.str
+ (s: isNonEmpty s && (builtins.match ".+/" s) == null);
description = "Location of the mounted the file system.";
};