Skip to content

Commit 750d886

Browse files
committed
fix(sops): pass SOPS_AGE_KEY_FILE environment variable instead of invalid CLI flag
1 parent caae41c commit 750d886

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

programs/sops.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ in
2929
${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: secret: ''
3030
if [ -n "${secret.path or ""}" ] && [ ! -e "${secret.path}" ]; then
3131
mkdir -p "$(dirname "${secret.path}")"
32-
$DRY_RUN_CMD ${pkgs.sops}/bin/sops --decrypt \
33-
--age-key-file "${cfg.age.keyFile}" \
32+
SOPS_AGE_KEY_FILE="${cfg.age.keyFile}" $DRY_RUN_CMD ${pkgs.sops}/bin/sops --decrypt \
3433
--extract '["${lib.replaceStrings ["/"] ["\"][\""] name}"]' \
3534
${secret.sopsFile} > "${secret.path}" 2>/dev/null || true
3635
chmod ${secret.mode or "0600"} "${secret.path}"

0 commit comments

Comments
 (0)