diff --git a/bsc/nix/upload.sh b/bsc/nix/upload.sh new file mode 100755 index 0000000..00286e5 --- /dev/null +++ b/bsc/nix/upload.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# This post build hook sends the closure of the just built derivation to the +# target machine. In our case this is the MareNostrum4 cluster. + +# set -e fails as the profile runs some erroring programs +# We need the profile to load nix in the $PATH +. /etc/profile + +set -eu +set -f # disable globbing +export IFS=' ' +nixroot=/gpfs/projects/bsc15/nix +store=$nixroot/nix/store +target=ssh://mn + +nix copy --to $target $OUT_PATHS