Additional secrets prefixing stuff

This commit is contained in:
kat witch 2021-08-08 19:46:14 +01:00
parent aecc7fa78d
commit 5dd38fac70
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
2 changed files with 11 additions and 1 deletions

View file

@ -9,7 +9,7 @@ with lib;
options.externalSecret = mkEnableOption "Is ths secret to be templated into a command provided?";
config = mkIf config.externalSecret {
type = "string";
value.shellCommand = "${tf.commandPrefix} ${escapeShellArg name}";
value.shellCommand = "${tf.commandPrefix} ${tf.folderPrefix}${tf.folderDivider}${escapeShellArg name}";
};
}));
};
@ -17,5 +17,13 @@ with lib;
type = types.nullOr types.str;
default = null;
};
folderPrefix = mkOption {
type = types.str;
default = "";
};
folderDivider = mkOption {
type = types.str;
default = "";
};
};
}

View file

@ -2,6 +2,8 @@
{
commandPrefix = "pass";
folderPrefix = "secrets";
folderDivider = "/";
variables.hcloud_token = {
type = "string";