diff options
author | makefu <github@syntax-fehler.de> | 2015-10-14 00:17:15 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2015-10-14 00:17:15 +0200 |
commit | df3dc3dac1f6c1cc36dbbea506e3d610aa1b417d (patch) | |
tree | 038a837b20d267d0ba5aad837884b6a5a9087613 /krebs/4lib/types.nix | |
parent | f73fe104d84b2f0d2fc3b4f0342c36735b3fb220 (diff) | |
parent | 96f4248b65ff1539eded24572ae1805b27c53d50 (diff) |
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'krebs/4lib/types.nix')
-rw-r--r-- | krebs/4lib/types.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index 039f803ef..b3d2c8b70 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -147,6 +147,13 @@ types // rec { merge = mergeOneOption; }; + suffixed-str = suffs: + mkOptionType { + name = "string suffixed by ${concatStringsSep ", " suffs}"; + check = x: isString x && any (flip hasSuffix x) suffs; + merge = mergeOneOption; + }; + user = submodule { options = { mail = mkOption { |