forked from DGNum/lab-infra
20 lines
545 B
Bash
20 lines
545 B
Bash
set -eu -o pipefail
|
|
|
|
cat <<EOF >.netrc
|
|
default
|
|
login $STORE_USER
|
|
password $STORE_PASSWORD
|
|
EOF
|
|
|
|
drv=$("@colmena@/bin/colmena" eval --instantiate -E "{ nodes, ... }: nodes.${BUILD_NODE}.config.system.build.toplevel")
|
|
|
|
# Build the derivation and send it to the great beyond
|
|
nix-store --query --requisites --force-realise --include-outputs "$drv" | grep -v '.*\.drv' >paths.txt
|
|
|
|
nix copy \
|
|
--extra-experimental-features nix-command \
|
|
--to "$STORE_ENDPOINT?compression=none" \
|
|
--netrc-file .netrc \
|
|
"$(nix-store --realise "$drv")"
|
|
|
|
rm .netrc
|