summaryrefslogtreecommitdiffstats
path: root/krebs/4lib/infest
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2016-03-10 10:16:11 +0100
committermakefu <github@syntax-fehler.de>2016-03-10 10:16:11 +0100
commitc61496e77e1c13bb779c501f44b82804019a62a7 (patch)
tree6c3da05df41e7f33040dc3b9b696cf1b04f072d7 /krebs/4lib/infest
parent4031bbbb8778875dee6c159520fd3cf019abb66d (diff)
parent4ca96e8b04056ae9d06c2ff2e153d2e592991c15 (diff)
Merge branch 'master' of gum.krebsco.de:stockholm
Diffstat (limited to 'krebs/4lib/infest')
-rw-r--r--krebs/4lib/infest/prepare.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/krebs/4lib/infest/prepare.sh b/krebs/4lib/infest/prepare.sh
index a217e7bed..e265b0e67 100644
--- a/krebs/4lib/infest/prepare.sh
+++ b/krebs/4lib/infest/prepare.sh
@@ -98,6 +98,19 @@ prepare_nixos_iso() {
sed -i "s@^NIX_PATH=\"[^\"]*\"@NIX_PATH=$target_path@" bin/nixos-install
}
+get_nixos_install() {
+ echo "installing nixos-install" 2>&1
+ c=$(mktemp)
+
+ cat <<EOF > $c
+{ fileSystems."/" = {};
+ boot.loader.grub.enable = false;
+}
+EOF
+ export NIXOS_CONFIG=$c
+ nix-env -i -A config.system.build.nixos-install -f "<nixpkgs/nixos>"
+ rm -v $c
+}
prepare_common() {(
if ! getent group nixbld >/dev/null; then
@@ -191,6 +204,7 @@ prepare_common() {(
mount --rbind /mnt/"$target_path" "$target_path"
fi
+ get_nixos_install
mkdir -p bin
rm -f bin/nixos-install
cp "$(type -p nixos-install)" bin/nixos-install