summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 {