From 6fcc35afb0003f0885994b3c09e401f3178d7a08 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 7 Jun 2016 22:36:40 +0200 Subject: krebs types.uint: init --- krebs/4lib/types.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'krebs') diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index f78d601e3..d4d28bc78 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; }; -- cgit v1.2.3