fix: Update secrets.sh to decrypt and output .conf files instead of removing .gpg files

This commit is contained in:
Menno van Leeuwen 2024-08-23 00:03:10 +02:00
parent 522f05c48a
commit d79da84e3a
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ if [[ "$2" == "decrypt" ]]; then
for file in ~/.ssh/config.d/*.gpg; do
filename=$(basename $file .gpg)
gpg --quiet --batch --yes --decrypt --passphrase="$password" --output ~/.ssh/config.d/$filename $file
gpg --quiet --batch --yes --decrypt --passphrase="$password" --output ~/.ssh/config.d/$filename.conf $file
done
elif [[ "$2" == "encrypt" ]]; then
printfe "%s\n" "cyan" "Encrypting .ssh/config.d/ files..."

View File

@ -1,4 +1,4 @@
Host *
IdentityAgent ~/.1password/agent.sock
Include ~/.ssh/config.d/*
Include ~/.ssh/config.d/*.conf