nixos/system/home/scripts/shell/ensure-pass.sh
Evie Litherland-Smith ea8e3e2de6 Update ensure-pass.sh to add GitHub API token to secret store
Rename a few variables for consistency

Remove spotifyd credentials since I don't use it anymore
2024-10-30 16:46:50 +00:00

39 lines
1.1 KiB
Bash

# Email
EMAIL="e.litherlandsmith@proton.me"
secret-tool lookup email "$EMAIL" >/dev/null || (
echo "Insert pass from protonmail-bridge"
secret-tool store --label="Proton Mail mbsync" email "$EMAIL"
)
EMAIL="e.litherlandsmith@icloud.com"
secret-tool lookup email "$EMAIL" >/dev/null || (
pass show identity/apple.com/mbsync |
head -n1 |
secret-tool store --label="iCloud mbsync" email "$EMAIL"
)
EMAIL="evie.litherland-smith@ukaea.uk"
secret-tool lookup email "$EMAIL" >/dev/null || (
pass show work/microsoftonline.com |
head -n1 |
secret-tool store --label="Outlook mbsync" email "$EMAIL"
)
# Calendar
URL="dav.xenia.me.uk"
USER="pixelifytica"
secret-tool lookup url "$URL" user "$USER" >/dev/null || (
pass show "server/xenia.me.uk/$URL" |
head -n1 |
secret-tool store --label="Personal calendar vdirsyncer" url "$URL" user "$USER"
)
# GitHub API token
HOST="api.github.com"
USER="pixelifytica^forge"
secret-tool lookup host "$HOST" user "$USER" >/dev/null || (
pass show "api/$HOST" |
head -n1 |
secret-tool store --label="Forge GitHub Token" host "$HOST" user "$USER"
)