summaryrefslogtreecommitdiffstats
path: root/shell.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-07-12 19:11:29 +0200
committerlassulus <lassulus@lassul.us>2017-07-12 19:11:29 +0200
commitf5328676c347a2785d2084628ba40448ec2680e8 (patch)
tree06046d7a2eed347cdd97a6bc81d6299500a3137f /shell.nix
parented9aca322dbcd2fa0484edb22076a56f49781d75 (diff)
parentb4d3d6c7ab2ff197b6dc47f366f698fceeb88242 (diff)
Merge branch 'staging/source'
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/shell.nix b/shell.nix
index 3e7ba81..57957f8 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
@@ -85,18 +87,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' \
- |
+ "$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
@@ -109,7 +112,7 @@ let
NIX_PATH=$(q "$target_path") \
STOCKHOLM_VERSION=$STOCKHOLM_VERSION \
nix-shell \
- --command $(q \
+ --run $(q \
config=$config \
system=$system \
target=$target \
[cgit] Unable to lock slot /tmp/cgit/e3300000.lock: Permission denied (13)