From 1fb964e8412106a5d9b764e86a995aabbcd060c3 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 8 Jul 2017 15:00:30 +0200 Subject: shell: call proxy nix-shell with --run --- shell.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell.nix') diff --git a/shell.nix b/shell.nix index 3e7ba81c1..83ff7f039 100644 --- a/shell.nix +++ b/shell.nix @@ -109,7 +109,7 @@ let NIX_PATH=$(q "$target_path") \ STOCKHOLM_VERSION=$STOCKHOLM_VERSION \ nix-shell \ - --command $(q \ + --run $(q \ config=$config \ system=$system \ target=$target \ -- cgit v1.2.3 From fc3f5d3d56a299b7b46c1a42d3fec57c536a5917 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 8 Jul 2017 14:58:09 +0200 Subject: shell: don't populate when source doesn't evaluate --- shell.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'shell.nix') diff --git a/shell.nix b/shell.nix index 83ff7f039..e0c60e330 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 ; config.krebs.build.source' \ - | + -E 'with import ; 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 -- cgit v1.2.3 From 7fdc46bb9d911838edfa723d985ede6a604c0c5a Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 6 Jul 2017 21:47:47 +0200 Subject: move source config from module system to 1systems/*/source.nix --- shell.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'shell.nix') diff --git a/shell.nix b/shell.nix index e0c60e330..57957f823 100644 --- a/shell.nix +++ b/shell.nix @@ -43,9 +43,11 @@ let ''; init.env = pkgs.writeText "init.env" /* sh */ '' - config=''${config-$LOGNAME/1systems/$system.nix} + config=''${config-$LOGNAME/1systems/$system/config.nix} + source=''${source-$LOGNAME/1systems/$system/source.nix} export config + export source export system export target @@ -92,7 +94,7 @@ let --show-trace \ --strict \ -I nixos-config="$config" \ - -E 'with import ; config.krebs.build.source') + "$source") echo $_source | ${pkgs.populate}/bin/populate \ "$target_user@$target_host:$target_port$target_path" \ -- cgit v1.2.3