infrastructure/scripts/push-to-cache.sh

14 lines
403 B
Bash
Raw Normal View History

2024-04-12 19:53:02 +02:00
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 '.[]' |\
2024-07-24 12:32:39 +02:00
xargs -n 10 nix-store -q -R --include-outputs |\
2024-04-12 19:53:02 +02:00
sed '/\.drv$/d' |\
xargs @attic@/bin/attic push dgnum:infra