summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-21 12:45:50 +0200
committertv <tv@shackspace.de>2015-10-21 12:45:50 +0200
commit48abef60c172bdd5d15e574138824a89b23fa86d (patch)
tree77c15ef5d0b61a609c6d5e7f8f991737304efdef
parent9c9a7d611ed9201e84ed49067027e85389313b7c (diff)
krebs.nixos-install: discover coreutils in /mnt
-rw-r--r--krebs/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/krebs/default.nix b/krebs/default.nix
index 5f1cfb95b..24d9e843b 100644
--- a/krebs/default.nix
+++ b/krebs/default.nix
@@ -130,9 +130,12 @@ let out = {
nix_env=$(cat_src | sed -n '
s:.*\(/nix/store/[a-z0-9]*-nix-[0-9.]\+/bin/nix-env\).*:\1:p;T;q
')
+ coreutils=$(find /mnt/nix/store \
+ -mindepth 1 -maxdepth 1 -type d -name '*-coreutils-*' \
+ | head -n 1 | sed s:^/mnt::)
echo nix-env is $nix_env
sed -i '
- s:^NIX_PATH=:chroot $mountPoint /usr/bin/env &:
+ s:^NIX_PATH=:chroot $mountPoint '"$coreutils"'/bin/env &:
s:^nix-env:'"$nix_env"':
' nixos-install