Compare commits

...

2 Commits

Author SHA1 Message Date
koenw dd49fc1f2b
Merge fdaa1338f6 into 1381a759b2 2024-04-02 23:53:01 -05:00
Koen Wilde fdaa1338f6
Add support for age plugins 2024-02-28 20:54:57 +01:00
1 changed files with 8 additions and 1 deletions

View File

@ -82,7 +82,7 @@ with lib; let
umask u=r,g=,o=
test -f "${secretType.file}" || echo '[agenix] WARNING: encrypted file ${secretType.file} does not exist!'
test -d "$(dirname "$TMP_FILE")" || echo "[agenix] WARNING: $(dirname "$TMP_FILE") does not exist!"
LANG=${config.i18n.defaultLocale or "C"} ${ageBin} --decrypt "''${IDENTITIES[@]}" -o "$TMP_FILE" "${secretType.file}"
LANG=${config.i18n.defaultLocale or "C"} PATH=${lib.makeBinPath cfg.pluginPackages} ${ageBin} --decrypt "''${IDENTITIES[@]}" -o "$TMP_FILE" "${secretType.file}"
)
chmod ${secretType.mode} "$TMP_FILE"
mv -f "$TMP_FILE" "$_truePath"
@ -198,6 +198,13 @@ in {
The age executable to use.
'';
};
pluginPackages = mkOption {
type = types.listOf types.package;
default = [];
description = ''
List of age plugins that should be available in $PATH during the build.
'';
};
secrets = mkOption {
type = types.attrsOf secretType;
default = {};