NixOS 23.11 and Flaking
This commit is contained in:
@@ -36,9 +36,10 @@ mount "${disk}1" /mnt
|
||||
# Bootstrap system
|
||||
nixos-generate-config --root /mnt
|
||||
curl -o /mnt/etc/nixos/configuration.nix "http://${host}:${port}/configuration.nix"
|
||||
curl -o /mnt/etc/nixos/flake.nix "http://${host}:${port}/flake.nix"
|
||||
sed -i -E -e "s,@BOOT_DEVICE@,${disk}," /mnt/etc/nixos/configuration.nix
|
||||
sed -i -E -e 's,(.*device = "/dev/disk/).*(".*),\1by-label/root\2,' /mnt/etc/nixos/hardware-configuration.nix
|
||||
nixos-install --no-root-password
|
||||
nixos-install --no-root-password --flake "/mnt/etc/nixos/#vagrant"
|
||||
|
||||
# Run stuff in the chroot
|
||||
curl -o /mnt/root/in-chroot.sh "http://${host}:${port}/in-chroot.sh"
|
||||
|
||||
Reference in New Issue
Block a user