summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-21 02:21:56 +0200
committertv <tv@shackspace.de>2015-10-21 02:21:56 +0200
commit9c9a7d611ed9201e84ed49067027e85389313b7c (patch)
treefc7f60add2fec6b8badf5cb452bc8c18f4e4ad2d /krebs
parent226ea391caec5b3f2f112de263dd2db3a0e012f4 (diff)
krebs.nixos-install: bring back chroot wrapper
Because we _do_ need it. :D
Diffstat (limited to 'krebs')
-rw-r--r--krebs/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/krebs/default.nix b/krebs/default.nix
index 5518a4496..5f1cfb95b 100644
--- a/krebs/default.nix
+++ b/krebs/default.nix
@@ -126,6 +126,16 @@ let out = {
} > nixos-install
chmod +x nixos-install
+ # Wrap inserted nix-install into chroot.
+ nix_env=$(cat_src | sed -n '
+ s:.*\(/nix/store/[a-z0-9]*-nix-[0-9.]\+/bin/nix-env\).*:\1:p;T;q
+ ')
+ echo nix-env is $nix_env
+ sed -i '
+ s:^NIX_PATH=:chroot $mountPoint /usr/bin/env &:
+ s:^nix-env:'"$nix_env"':
+ ' nixos-install
+
unset SSL_CERT_FILE
./nixos-install
''}