diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-19 16:25:54 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-19 16:26:49 +0200 |
commit | 08822d6f730053c97cfd9c27111b4302d9a94081 (patch) | |
tree | 5dd8260978752785ab3456021c834ff662ae3ec7 | |
parent | df6dc0852edb79874314c4cd0f303a19340034ea (diff) | |
download | Nix-08822d6f730053c97cfd9c27111b4302d9a94081.tar.gz Nix-08822d6f730053c97cfd9c27111b4302d9a94081.tar.zst Nix-08822d6f730053c97cfd9c27111b4302d9a94081.zip |
Add sandbox warning in setup script
-rwxr-xr-x | nixops/scripts/nixops_wrap | 1 | ||||
-rwxr-xr-x | nixops/scripts/setup | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/nixops/scripts/nixops_wrap b/nixops/scripts/nixops_wrap index 2094924..3a894f9 100755 --- a/nixops/scripts/nixops_wrap +++ b/nixops/scripts/nixops_wrap | |||
@@ -29,5 +29,6 @@ done | |||
29 | nixops set-args --argstr privateFiles "$TEMP" | 29 | nixops set-args --argstr privateFiles "$TEMP" |
30 | 30 | ||
31 | source $(dirname $(dirname $DIR))/nix_path_env | 31 | source $(dirname $(dirname $DIR))/nix_path_env |
32 | # __noChroot: ssh-config-file requires relaxed | ||
32 | export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:$NIX_PATH" | 33 | export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:$NIX_PATH" |
33 | nixops "$@" | 34 | nixops "$@" |
diff --git a/nixops/scripts/setup b/nixops/scripts/setup index 929b27a..38cee65 100755 --- a/nixops/scripts/setup +++ b/nixops/scripts/setup | |||
@@ -93,6 +93,19 @@ if [ ! -f /etc/ssh/ssh_rsa_key_nixops ]; then | |||
93 | fi | 93 | fi |
94 | fi | 94 | fi |
95 | 95 | ||
96 | if nix show-config --json | jq -e '.sandbox.value == "true"' >/dev/null; then | ||
97 | cat <<-EOF | ||
98 | There are some impure derivations in the repo currently (grep __noChroot), please put | ||
99 | sandbox = "relaxed" | ||
100 | in /etc/nix/nix.conf | ||
101 | you may also want to add | ||
102 | keep-outputs = true | ||
103 | keep-derivations = true | ||
104 | to prevent garbage collector from deleting build dependencies (they take a lot of time to build) | ||
105 | EOF | ||
106 | exit 1 | ||
107 | fi | ||
108 | |||
96 | if ! which nixops 2>/dev/null >/dev/null; then | 109 | if ! which nixops 2>/dev/null >/dev/null; then |
97 | cat <<-EOF | 110 | cat <<-EOF |
98 | nixops is needed: | 111 | nixops is needed: |