minor updates

This commit is contained in:
Nemo 2018-12-25 14:54:25 +05:30
parent 347a6e5b03
commit f3aceb0f46
2 changed files with 28 additions and 2 deletions

View File

@ -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"

View File

@ -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
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