nixops set-args --argstr privateFiles "$TEMP"
source $(dirname $(dirname $DIR))/nix_path_env
+# __noChroot: ssh-config-file requires relaxed
export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:$NIX_PATH"
nixops "$@"
fi
fi
+if nix show-config --json | jq -e '.sandbox.value == "true"' >/dev/null; then
+ cat <<-EOF
+ There are some impure derivations in the repo currently (grep __noChroot), please put
+ sandbox = "relaxed"
+ in /etc/nix/nix.conf
+ you may also want to add
+ keep-outputs = true
+ keep-derivations = true
+ to prevent garbage collector from deleting build dependencies (they take a lot of time to build)
+ EOF
+ exit 1
+fi
+
if ! which nixops 2>/dev/null >/dev/null; then
cat <<-EOF
nixops is needed: