summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-06-30 04:27:02 +0200
committertv <tv@krebsco.de>2017-06-30 04:27:02 +0200
commit849d0ba98f03dc8700e6b9bb724b9afdbde68713 (patch)
tree874dc96b8ed506d62d7ba7971eb87e3e89ad19a0
parentb9c11e44e779769ca0a6b13eedee82782bc63927 (diff)
shell: using proxy implies populated target
-rw-r--r--shell.nix16
1 files changed, 6 insertions, 10 deletions
diff --git a/shell.nix b/shell.nix
index 26db52c32..9cc740663 100644
--- a/shell.nix
+++ b/shell.nix
@@ -64,10 +64,11 @@
export qtarget="$target_user@$target_host:$target_port$target_path"
- ${init.env.populate}
-
- if \test "$target_local" != true && \test "''${DISABLE_PROXY-}" != 1; then
- exec ${init.env.proxy} "$command" "$@"
+ if \test "''${using_proxy-}" != true; then
+ ${init.env.populate}
+ if \test "$target_local" != true; then
+ exec ${init.env.proxy} "$command" "$@"
+ fi
fi
'' // {
parsetarget = pkgs.writeScript "init.env.parsetarget" /* sh */ ''
@@ -94,10 +95,6 @@
populate = pkgs.writeScript "init.env.populate" /* sh */ ''
#! ${pkgs.dash}/bin/dash
set -efu
- if \test "''${DISABLE_POPULATE-}" = 1; then
- exit
- fi
- set -x
${pkgs.nix}/bin/nix-instantiate \
--eval \
--json \
@@ -125,8 +122,7 @@
config=$config \
system=$system \
target=$target \
- DISABLE_POPULATE=1 \
- DISABLE_PROXY=1 \
+ using_proxy=true \
"$*"
)
'';