git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/make-disk-image: add ability to defer bootloader install until image has been flashed
commit760b2b9048ea775c319cb348d74447a20dea513e authorobadz <obadz-git@obadz.com> dateMon 15 Aug 2016, 19:39 (10 years ago) parentf9c3076
1 file changed+4−1
nixos/lib/make-disk-image.nix+4−1
nixos/lib/make-disk-image.nix+4−1
@@ -12,6 +12,9 @@
1212 # directly.
1313 partitioned ? true
1414
15+ # Whether to invoke switch-to-configuration boot during image creation
16+, installBootLoader ? true
17+
1518, # The root file system type.
1619 fsType ? "ext4"
1720
@@ -108,7 +111,7 @@ pkgs.vmTools.runInLinuxVM (
108111 # Generate the GRUB menu.
109112 ln -s vda /dev/xvda
110113 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"}
112115
113116 umount /mnt/proc /mnt/dev /mnt/sys
114117 umount /mnt