summaryrefslogtreecommitdiffstats
path: root/krebs/4lib
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/4lib')
-rw-r--r--krebs/4lib/default.nix7
-rw-r--r--krebs/4lib/types.nix11
2 files changed, 9 insertions, 9 deletions
diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix
index 8e5cab71f..e23e42b19 100644
--- a/krebs/4lib/default.nix
+++ b/krebs/4lib/default.nix
@@ -1,4 +1,4 @@
-{ lib, ... }:
+{ config, lib, ... }:
with builtins;
with lib;
@@ -15,7 +15,10 @@ let out = rec {
addNames = mapAttrs addName;
- types = import ./types.nix { lib = lib // { inherit genid; }; };
+ types = import ./types.nix {
+ inherit config;
+ 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 7792b31d5..fcb6ff3d3 100644
--- a/krebs/4lib/types.nix
+++ b/krebs/4lib/types.nix
@@ -1,4 +1,4 @@
-{ lib, ... }:
+{ config, lib, ... }:
with builtins;
with lib;
@@ -22,11 +22,7 @@ types // rec {
owner = mkOption {
type = user;
- # TODO proper user
- default = {
- name = "krebs";
- mail = "spam@krebsco.de";
- };
+ default = config.krebs.users.krebs;
};
extraZones = mkOption {
@@ -183,7 +179,8 @@ types // rec {
default = config._module.args.name;
};
pubkey = mkOption {
- type = str;
+ type = nullOr str;
+ default = null;
};
uid = mkOption {
type = int;