nixos/system/home/email/mbsync-ensure-pass.sh
Evie Litherland-Smith fe1f5bb6a2 Move GPG config to own file
Move home/services/ files up one level, adjust imports accordingly.
2024-10-05 16:39:27 +01:00

16 lines
426 B
Bash

EMAIL_ADDRESSES=(
e.litherlandsmith@proton.me
e.litherlandsmith@icloud.com
evie.litherland-smith@ukaea.uk
)
LABELS=("Proton" "iCloud" "Outlook")
for i in "${!EMAIL_ADDRESSES[@]}"; do
ADDRESS="${EMAIL_ADDRESSES[$i]}"
LABEL="${LABELS[$i]}"
secret-tool lookup email "$ADDRESS" >/dev/null || (
echo "Setup $LABEL"
secret-tool store --label="$LABEL mail mbsync" email "$ADDRESS"
)
done