decrypt-parallel

This commit is contained in:
Ryan Mulligan 2025-08-04 09:17:50 -07:00
parent 9edb178786
commit 540a4f1b0c

View file

@ -68,6 +68,7 @@ let
'';
installSecret = secretType: ''
(
${setTruePath secretType}
echo "decrypting '${secretType.file}' to '$_truePath'..."
TMP_FILE="$_truePath.tmp"
@ -98,6 +99,7 @@ let
${optionalString secretType.symlink ''
[ "${secretType.path}" != "${cfg.secretsDir}/${secretType.name}" ] && ln -sfT "${cfg.secretsDir}/${secretType.name}" "${secretType.path}"
''}
) &
'';
testIdentities = map (path: ''
@ -120,6 +122,7 @@ let
[ "echo '[agenix] decrypting secrets...'" ]
++ testIdentities
++ (map installSecret (builtins.attrValues cfg.secrets))
++ [ "wait" ]
++ [ cleanupAndLink ]
);