Skip to content

Commit fdaa133

Browse files
committed
Add support for age plugins
1 parent 8cb01a0 commit fdaa133

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
@@ -82,7 +82,7 @@ with lib; let
8282
umask u=r,g=,o=
8383
test -f "${secretType.file}" || echo '[agenix] WARNING: encrypted file ${secretType.file} does not exist!'
8484
test -d "$(dirname "$TMP_FILE")" || echo "[agenix] WARNING: $(dirname "$TMP_FILE") does not exist!"
85-
LANG=${config.i18n.defaultLocale or "C"} ${ageBin} --decrypt "''${IDENTITIES[@]}" -o "$TMP_FILE" "${secretType.file}"
85+
LANG=${config.i18n.defaultLocale or "C"} PATH=${lib.makeBinPath cfg.pluginPackages} ${ageBin} --decrypt "''${IDENTITIES[@]}" -o "$TMP_FILE" "${secretType.file}"
8686
)
8787
chmod ${secretType.mode} "$TMP_FILE"
8888
mv -f "$TMP_FILE" "$_truePath"
@@ -198,6 +198,13 @@ in {
198198
The age executable to use.
199199
'';
200200
};
201+
pluginPackages = mkOption {
202+
type = types.listOf types.package;
203+
default = [];
204+
description = ''
205+
List of age plugins that should be available in $PATH during the build.
206+
'';
207+
};
201208
secrets = mkOption {
202209
type = types.attrsOf secretType;
203210
default = {};

0 commit comments

Comments
 (0)