infrastructure/scripts/cache.sh

13 lines
304 B
Bash
Raw Normal View History

2024-04-12 19:53:02 +02:00
ENDPOINT=${ATTIC_ENDPOINT:-https://cachix.dgnum.eu}
if [ "$1" == "off" ]; then
echo "Please edit $XDG_CONFIG_HOME/nix/nix.conf to remove the cache"
2024-04-12 19:53:02 +02:00
elif [ "$1" == "on" ]; then
@attic@/bin/attic login dgnum "$ENDPOINT"
@attic@/bin/attic use dgnum:infra
else
echo "Help:"
echo " cache {on|off}"
fi