diff --git a/docs/secrets-management.md b/docs/secrets-management.md index 1b43406..4d21d01 100644 --- a/docs/secrets-management.md +++ b/docs/secrets-management.md @@ -41,9 +41,7 @@ From your laptop, open the encrypted secrets file: ```bash sops ~/Projects/active/homelab/Core/nixos/secrets.yaml ``` -SOPS reads your local `~/.config/sops/age/keys.txt`, decrypts the file in `$EDITOR`, and automatically re-encrypts the ciphertext using the public recipient keys configured in `Core/.sops.yaml`: -- `*server` (for server boot decryption) -- `*laptop` (for operator editing) +SOPS uses your local age identity to decrypt the file and re-encrypts it for the recipients configured in `Core/.sops.yaml`, including the workstation operator and server runtime identities. ### 2. Commit and Deploy Commit the newly encrypted ciphertext and push to your git remote: diff --git a/home/shell/pdf.sh b/home/shell/pdf.sh index e08aaa9..53c4a00 100644 --- a/home/shell/pdf.sh +++ b/home/shell/pdf.sh @@ -3,20 +3,16 @@ # 1. pdf_dc: Decrypts a password-protected PDF document. # Uses 'qpdf' under the hood. Automatically searches for a default password -# in `$HOME/.config/pdf_decrypt_password` (or `/run/secrets/pdf_decrypt_password`) +# in `$HOME/.config/pdf_decrypt_password` (or via $PDF_PASSWORD_FILE) # if no password argument is supplied. pdf_dc() { local secret_file="${PDF_PASSWORD_FILE:-$HOME/.config/pdf_decrypt_password}" local input_file="$1" local password="$2" - # Attempt to auto-load password from config file if none was provided on the CLI - if [[ -z "$password" ]]; then - if [[ -f "$secret_file" ]]; then - password=$(cat "$secret_file") - elif [[ -f "/run/secrets/pdf_decrypt_password" ]]; then - password=$(cat "/run/secrets/pdf_decrypt_password") - fi + # Attempt to auto-load password from local config file if none was provided on the CLI + if [[ -z "$password" && -f "$secret_file" ]]; then + password=$(cat "$secret_file") fi if [[ -z "$password" ]]; then