install_os: Fix flake selection

This commit is contained in:
Geoffrey Frogeye 2024-02-18 00:09:08 +01:00
parent 833320e3fa
commit 097d53807d
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -61,7 +61,6 @@ fi
flake="${flake_uri}#${name}"
mountpoint="/mnt/nixos"
mountpoint_flake="${mountpoint}/etc/nixos/flake.nix"
luks_pass_path="luks/$(basename "${name}")"
set -x
@ -99,11 +98,11 @@ echo "{
modules = [ ./hardware-configuration.nix ];
};
};
}" | sudo tee "$mountpoint_flake" > /dev/null
}" | sudo tee "${mountpoint}/etc/nixos/flake.nix" > /dev/null
# Everything there should be covered by (and conflicts with) the repo anyways.
# Install NixOS! Or create a new generation.
sudo nix --extra-experimental-features "nix-command flakes" run "${SCRIPT_DIR}#nixos-install" -- --no-root-password --root "$mountpoint" --flake "${mountpoint_flake}#${name}"
sudo nix --extra-experimental-features "nix-command flakes" run "${SCRIPT_DIR}#nixos-install" -- --no-root-password --root "$mountpoint" --flake "${mountpoint}/etc/nixos#${name}"
# TODO Add this? --flake "$flake"
set +x