krebs lib.types += suffixed-str

This commit is contained in:
tv 2015-10-09 14:07:29 +02:00
parent 87fa7792e3
commit f15864623a

View File

@ -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 {