krebs lib.types += suffixed-str
This commit is contained in:
parent
87fa7792e3
commit
f15864623a
@ -147,6 +147,13 @@ types // rec {
|
|||||||
merge = mergeOneOption;
|
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 {
|
user = submodule {
|
||||||
options = {
|
options = {
|
||||||
mail = mkOption {
|
mail = mkOption {
|
||||||
|
Loading…
Reference in New Issue
Block a user