diff options
Diffstat (limited to 'krebs/4lib')
-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 { |