From 006364274f516eb41def5f711c23b19e0b0a41f8 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(-) diff --git a/lib/default.nix b/lib/default.nix index 4cb0332..348d47e 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 66bcaa6e1bcaa34cc29776fb41f343e696e09fd6 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(-) diff --git a/lib/types.nix b/lib/types.nix index 0168533..41e7515 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