diff --git a/dydns.sh b/dydns.sh index e29729d..ee7accd 100755 --- a/dydns.sh +++ b/dydns.sh @@ -1,7 +1,13 @@ #!/bin/bash + set -euo pipefail +gettoken () +{ + export "`basename $1`"="$(pass show $1)" +} + # Based on https://gist.github.com/benkulbertis/fff10759c2391b6618dd/ -CF_KEY=`gkeyring -n CF_KEY --output secret` +CF_KEY=`gettoken CloudFlare/CF_KEY` CF_EMAIL="capt.n3m0@gmail.com" ZONE_IDENTIFIER="624d0d36f927426fdbeef7fb3770ac43" diff --git a/housekeeping b/housekeeping index 20ec2b6..2351ea5 100755 --- a/housekeeping +++ b/housekeeping @@ -9,4 +9,24 @@ PERSONAL_ROOT="/home/nemo/projects/personal" find $PERSONAL_ROOT -maxdepth 2 -type d -iname .git | xargs -I{} bash -c "cd {}/.. && karn update" # Cleanup yay-cache -find /home/nemo/.cache/yay -iregex '.*\.\(bz2\|tar\|zip\|deb\|xz\|gz\)$' -delete \ No newline at end of file +find /home/nemo/.cache/yay -iregex '.*\.\(bz2\|tar\|zip\|deb\|xz\|gz\)$' -delete + + +# Remove orphan packages +pacman -Rns $(pacman -Qtdq) + +# Clear systemd logs +sudo journalctl --vacuum-size=100M + +# Clear docker stuff +sudo docker system prune -af + +## KEEP ALL NETWORK RELATED STUFF BELOW THIS +echo "Going to try stuff that needs network access now" + +# Push passwords to keybase +pass git push + +# Sync mobile passwords +cd /home/nemo/projects/personal/mobile-passwords +git from && ./runme.sh && git push \ No newline at end of file