summaryrefslogtreecommitdiffstats
path: root/krebs/4lib
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-02-21 06:56:57 +0100
committertv <tv@krebsco.de>2016-02-21 06:56:57 +0100
commit05be525be6d0896b155da7305b2cee950fb3530e (patch)
tree0c9c431b3ffd853e334a070e69fa4b54ae9114b9 /krebs/4lib
parentc5f18dfdfe9874ba48834447c8d3259b115c1357 (diff)
krebs.types.user: add uid :: int
Diffstat (limited to 'krebs/4lib')
-rw-r--r--krebs/4lib/default.nix2
-rw-r--r--krebs/4lib/types.nix4
2 files changed, 5 insertions, 1 deletions
diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix
index d5b6d03ac..8e5cab71f 100644
--- a/krebs/4lib/default.nix
+++ b/krebs/4lib/default.nix
@@ -15,7 +15,7 @@ let out = rec {
addNames = mapAttrs addName;
- types = import ./types.nix { inherit lib; };
+ types = import ./types.nix { lib = lib // { inherit genid; }; };
dir.has-default-nix = path: pathExists (path + "/default.nix");
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix
index 41af1cd4f..422627296 100644
--- a/krebs/4lib/types.nix
+++ b/krebs/4lib/types.nix
@@ -179,6 +179,10 @@ types // rec {
pubkey = mkOption {
type = str;
};
+ uid = mkOption {
+ type = int;
+ default = genid config.name;
+ };
};
});