diff options
author | tv <tv@krebsco.de> | 2016-07-03 19:44:41 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-07-03 19:45:29 +0200 |
commit | 814e823fcd644bfde8a2e320e0f9887e61df122b (patch) | |
tree | fcf127ee72ff55056bee2d20cfd4d4e7f7aeeb26 /krebs | |
parent | 57098e472a1677883b7f95d0d0b5c815ca1b2b3b (diff) |
secret-file: add defaults to all options
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/4lib/types.nix | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index be0acd584..08db42c4c 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -162,11 +162,21 @@ types // rec { secret-file = submodule ({ config, ... }: { options = { - path = mkOption { type = str; }; - mode = mkOption { type = file-mode; default = "0400"; }; + name = mkOption { + type = filename; + default = config._module.args.name; + }; + path = mkOption { + type = absolute-pathname; + default = "/run/keys/${config.name}"; + }; + mode = mkOption { + type = file-mode; + default = "0400"; + }; owner = mkOption { type = user; - default = config.krebs.users.root; + default = users.root; }; group-name = mkOption { type = str; @@ -174,7 +184,7 @@ types // rec { }; source-path = mkOption { type = str; - default = toString <secrets> + "/${config._module.args.name}"; + default = toString <secrets> + "/${config.name}"; }; }; }); |