Skip to content

Commit 20cfd87

Browse files
committed
Add support for age plugins
1 parent db5637d commit 20cfd87

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

modules/age.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ with lib; let
8181
umask u=r,g=,o=
8282
test -f "${secretType.file}" || echo '[agenix] WARNING: encrypted file ${secretType.file} does not exist!'
8383
test -d "$(dirname "$TMP_FILE")" || echo "[agenix] WARNING: $(dirname "$TMP_FILE") does not exist!"
84-
LANG=${config.i18n.defaultLocale or "C"} ${ageBin} --decrypt "''${IDENTITIES[@]}" -o "$TMP_FILE" "${secretType.file}"
84+
LANG=${config.i18n.defaultLocale or "C"} PATH=${lib.makeBinPath cfg.pluginPackages} ${ageBin} --decrypt "''${IDENTITIES[@]}" -o "$TMP_FILE" "${secretType.file}"
8585
)
8686
chmod ${secretType.mode} "$TMP_FILE"
8787
mv -f "$TMP_FILE" "$_truePath"
@@ -187,6 +187,13 @@ in {
187187
The age executable to use.
188188
'';
189189
};
190+
pluginPackages = mkOption {
191+
type = types.listOf types.package;
192+
default = [];
193+
description = ''
194+
List of age plugins that should be available in $PATH during the build.
195+
'';
196+
};
190197
secrets = mkOption {
191198
type = types.attrsOf secretType;
192199
default = {};

0 commit comments

Comments
 (0)