diff options
author | tv <tv@krebsco.de> | 2017-06-30 04:27:02 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2017-06-30 04:27:02 +0200 |
commit | b21d3900221a573e9998a3c4f059cf6f3f11eb79 (patch) | |
tree | 220881630b5871147f430fbe4c4436a5b854eeb0 /shell.nix | |
parent | eabfaedf0842a72eb097d6fc5469832c0ec057a4 (diff) |
shell: using proxy implies populated target
Diffstat (limited to 'shell.nix')
-rw-r--r-- | shell.nix | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -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 \ "$*" ) ''; |