diff options
author | tv <tv@krebsco.de> | 2016-02-21 05:27:37 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-02-21 05:27:37 +0100 |
commit | b5fbca3a365b1188c1274e3288ba39a88ecad2e3 (patch) | |
tree | 4f4e631b9ddf17e8092a12392fac7cc53e238096 /krebs/4lib/types.nix | |
parent | d8d39f5c4a9925f2098e58dc80e36920ece6ac71 (diff) |
krebs.secret: init
Diffstat (limited to 'krebs/4lib/types.nix')
-rw-r--r-- | krebs/4lib/types.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index 7fb206928..55301add5 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -143,6 +143,19 @@ types // rec { merge = mergeOneOption; }; + secret-file = submodule ({ config, ... }: { + options = { + path = mkOption { type = str; }; + mode = mkOption { type = str; default = "0400"; }; + owner-name = mkOption { type = str; default = "root"; }; + group-name = mkOption { type = str; default = "root"; }; + source-path = mkOption { + type = str; + default = toString <secrets> + "/${config._module.args.name}"; + }; + }; + }); + suffixed-str = suffs: mkOptionType { name = "string suffixed by ${concatStringsSep ", " suffs}"; |