From 849d0ba98f03dc8700e6b9bb724b9afdbde68713 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Jun 2017 04:27:02 +0200 Subject: shell: using proxy implies populated target --- shell.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'shell.nix') diff --git a/shell.nix b/shell.nix index 26db52c3..9cc74066 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 \ "$*" ) ''; -- cgit v1.2.3