nixos/make-disk-image: add ability to defer bootloader install until image has been flashed

obadz 760b2b90 f9c3076e

+4 -1
+4 -1
nixos/lib/make-disk-image.nix
··· 12 12 # directly. 13 13 partitioned ? true 14 14 15 + # Whether to invoke switch-to-configuration boot during image creation 16 + , installBootLoader ? true 17 + 15 18 , # The root file system type. 16 19 fsType ? "ext4" 17 20 ··· 108 111 # Generate the GRUB menu. 109 112 ln -s vda /dev/xvda 110 113 ln -s vda /dev/sda 111 - chroot /mnt ${config.system.build.toplevel}/bin/switch-to-configuration boot 114 + ${optionalString installBootLoader "chroot /mnt ${config.system.build.toplevel}/bin/switch-to-configuration boot"} 112 115 113 116 umount /mnt/proc /mnt/dev /mnt/sys 114 117 umount /mnt