From 814e823fcd644bfde8a2e320e0f9887e61df122b Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 3 Jul 2016 19:44:41 +0200 Subject: secret-file: add defaults to all options --- krebs/4lib/types.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'krebs/4lib') 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 + "/${config._module.args.name}"; + default = toString + "/${config.name}"; }; }; }); -- cgit v1.2.3