From fa1f06ce31585133a6ba805e97bd8d4151afb1f6 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Tue, 25 Aug 2020 15:16:19 +0200 Subject: [PATCH] Use nix copy to upload to mn4, fixes #15 --- bsc/nix/upload.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 bsc/nix/upload.sh 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