From 82988de84c177c247ebbe80940c4d50b9f073b4e Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 3 Dec 2018 07:45:20 +0100 Subject: lib: genid is genid_unit32 --- lib/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/default.nix b/lib/default.nix index 4cb0332ca..348d47e85 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -13,8 +13,9 @@ let ne = x: y: x != y; mod = x: y: x - y * (x / y); - genid = import ./genid.nix { inherit lib; }; - genid_uint31 = x: ((lib.genid x) + 16777216) / 2; + genid = lib.genid_uint32; # TODO remove + genid_uint31 = x: ((lib.genid_uint32 x) + 16777216) / 2; + genid_uint32 = import ./genid.nix { inherit lib; }; lpad = n: c: s: if lib.stringLength s < n -- cgit v1.2.3 From 8f53937c40a88fc59c02a993315c29d32ff2d09c Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 5 Dec 2018 16:52:32 +0100 Subject: types host: cores can also be 0 --- lib/types.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/types.nix b/lib/types.nix index 016853300..41e75154e 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -19,7 +19,7 @@ rec { default = config._module.args.name; }; cores = mkOption { - type = positive; + type = uint; }; nets = mkOption { type = attrsOf net; -- cgit v1.2.3