Merge pull request #65728 from Infinisil/types-eithers

lib/types: Add oneOf, extension of either to a list of types
This commit is contained in:
Aaron Andersen
2019-08-13 11:48:42 -04:00
committed by GitHub
17 changed files with 55 additions and 13 deletions
@@ -226,7 +226,7 @@ in rec {
environment = mkOption {
default = {};
type = with types; attrsOf (nullOr (either str (either path package)));
type = with types; attrsOf (nullOr (oneOf [ str path package ]));
example = { PATH = "/foo/bar/bin"; LANG = "nl_NL.UTF-8"; };
description = "Environment variables passed to the service's processes.";
};
+1 -1
View File
@@ -520,7 +520,7 @@ in
};
systemd.globalEnvironment = mkOption {
type = with types; attrsOf (nullOr (either str (either path package)));
type = with types; attrsOf (nullOr (oneOf [ str path package ]));
default = {};
example = { TZ = "CET"; };
description = ''