Merge pull request 'secrets.password-store: optimize secret existence check' (#378) from lassulus-no_facts into main
All checks were successful
checks-impure / test (push) Successful in 13s
checks / test (push) Successful in 24s
assets1 / test (push) Successful in 6s

This commit is contained in:
clan-bot 2023-09-30 07:39:00 +00:00
commit 8d38ba93ff

View File

@ -28,7 +28,7 @@ in
${acc}
# ${n}
# if any of the secrets are missing, we regenerate all connected facts/secrets
(if ! (${lib.concatMapStringsSep " && " (x: "pass show machines/${config.clanCore.machineName}/${x.name} >/dev/null") (lib.attrValues v.secrets)}); then
(if ! (${lib.concatMapStringsSep " && " (x: "test -e ${passwordstoreDir}/machines/${config.clanCore.machineName}/${x.name}.gpg >/dev/null") (lib.attrValues v.secrets)}); then
facts=$(mktemp -d)
trap "rm -rf $facts" EXIT