nixos/system/home/scripts/shell/ensure-pass.sh

32 lines
790 B
Bash

# Email
EMAILS=(
"e.litherlandsmith@proton.me"
"e.litherlandsmith@icloud.com"
"evie.litherland-smith@ukaea.uk"
)
for EMAIL in "${EMAILS[@]}"; do
LABEL="$EMAIL"
secret-tool lookup email "$EMAIL" >/dev/null || (
echo "Insert pass for $LABEL"
secret-tool store --label="$LABEL" email "$EMAIL"
)
done
# Calendar
URL="dav.xenia.me.uk"
USER="pixelifytica"
LABEL="$USER@$URL"
secret-tool lookup url "$URL" user "$USER" >/dev/null || (
echo "Insert pass for $LABEL"
secret-tool store --label="$LABEL" url "$URL" user "$USER"
)
# GitHub API token
HOST="api.github.com"
USER="pixelifytica^forge"
LABEL="$USER@$HOST"
secret-tool lookup host "$HOST" user "$USER" >/dev/null || (
echo "Insert pass for $LABEL"
secret-tool store --label="$LABEL" host "$HOST" user "$USER"
)