secret-file: add defaults to all options

This commit is contained in:
tv 2016-07-03 19:44:41 +02:00
parent 57098e472a
commit 814e823fcd
1 changed files with 14 additions and 4 deletions

View File

@ -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}";
};
};
});