infrastructure/scripts/push-to-cache.sh
2024-04-12 22:14:20 +02:00

13 lines
397 B
Bash
Executable file

set -e
set -u
set -o pipefail
ENDPOINT=${ATTIC_ENDPOINT:-https://cachix.dgnum.eu}
@attic@/bin/attic login dgnum "$ENDPOINT" "$ATTIC_TOKEN"
@colmena@/bin/colmena eval -E '{ nodes, lib, ... }: lib.mapAttrsToList (_: v: v.config.system.build.toplevel.drvPath) nodes' |\
@jq@/bin/jq -r '.[]' |\
xargs nix-store -q -R --include-outputs |\
sed '/\.drv$/d' |\
xargs @attic@/bin/attic push dgnum:infra