summaryrefslogtreecommitdiffstats
path: root/krebs/4lib/types.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-10-14 00:17:15 +0200
committermakefu <github@syntax-fehler.de>2015-10-14 00:17:15 +0200
commitdf3dc3dac1f6c1cc36dbbea506e3d610aa1b417d (patch)
tree038a837b20d267d0ba5aad837884b6a5a9087613 /krebs/4lib/types.nix
parentf73fe104d84b2f0d2fc3b4f0342c36735b3fb220 (diff)
parent96f4248b65ff1539eded24572ae1805b27c53d50 (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'krebs/4lib/types.nix')
-rw-r--r--krebs/4lib/types.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix
index 039f803e..b3d2c8b7 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 {