summaryrefslogtreecommitdiffstats
path: root/krebs/4lib
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-06-07 22:36:40 +0200
committertv <tv@krebsco.de>2016-06-07 22:36:58 +0200
commit6fcc35afb0003f0885994b3c09e401f3178d7a08 (patch)
tree31b9dedeecf9598c964e6b073241e0ed99a53875 /krebs/4lib
parentb5bdd9aed4530924bca3d515eedeed215cfd64c2 (diff)
krebs types.uint: init
Diffstat (limited to 'krebs/4lib')
-rw-r--r--krebs/4lib/types.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix
index f78d601e..d4d28bc7 100644
--- a/krebs/4lib/types.nix
+++ b/krebs/4lib/types.nix
@@ -154,6 +154,12 @@ types // rec {
merge = mergeOneOption;
};
+ uint = mkOptionType {
+ name = "unsigned integer";
+ check = x: isInt x && x >= 0;
+ merge = mergeOneOption;
+ };
+
secret-file = submodule ({ config, ... }: {
options = {
path = mkOption { type = str; };