summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-07-08 14:58:09 +0200
committertv <tv@krebsco.de>2017-07-08 15:01:48 +0200
commitfc3f5d3d56a299b7b46c1a42d3fec57c536a5917 (patch)
treeb3c22e29127fe2123c667067e949505b26d4daa3
parent1fb964e8412106a5d9b764e86a995aabbcd060c3 (diff)
shell: don't populate when source doesn't evaluate
-rw-r--r--shell.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/shell.nix b/shell.nix
index 83ff7f03..e0c60e33 100644
--- a/shell.nix
+++ b/shell.nix
@@ -85,18 +85,19 @@ let
};
populate = pkgs.writeDash "init.env.populate" ''
set -efu
- ${pkgs.nix}/bin/nix-instantiate \
+ _source=$(${pkgs.nix}/bin/nix-instantiate \
--eval \
--json \
--readonly-mode \
--show-trace \
--strict \
-I nixos-config="$config" \
- -E 'with import <stockholm>; config.krebs.build.source' \
- |
+ -E 'with import <stockholm>; config.krebs.build.source')
+ echo $_source |
${pkgs.populate}/bin/populate \
"$target_user@$target_host:$target_port$target_path" \
>&2
+ unset _source
'';
proxy = pkgs.writeDash "init.env.proxy" ''
set -efu