make-disk-image: Reintroduce the installBootLoader argument
installBootLoader was removed in f1708a9d7d79e2bf2961fc648625578b23b3460f; probably by mistake, since only the logic was removed, not the argument.
This commit is contained in:
parent
7f3494b343
commit
56c5efa25b
1 changed files with 9 additions and 4 deletions
|
@ -44,6 +44,9 @@
|
|||
# most likely fails as GRUB will probably refuse to install.
|
||||
partitionTableType ? "legacy"
|
||||
|
||||
, # Whether to invoke `switch-to-configuration boot` during image creation
|
||||
installBootLoader ? true
|
||||
|
||||
, # The root file system type.
|
||||
fsType ? "ext4"
|
||||
|
||||
|
@ -368,11 +371,13 @@ in pkgs.vmTools.runInLinuxVM (
|
|||
cp ${configFile} /mnt/etc/nixos/configuration.nix
|
||||
''}
|
||||
|
||||
# Set up core system link, GRUB, etc.
|
||||
NIXOS_INSTALL_BOOTLOADER=1 nixos-enter --root $mountPoint -- /nix/var/nix/profiles/system/bin/switch-to-configuration boot
|
||||
${lib.optionalString installBootLoader ''
|
||||
# Set up core system link, GRUB, etc.
|
||||
NIXOS_INSTALL_BOOTLOADER=1 nixos-enter --root $mountPoint -- /nix/var/nix/profiles/system/bin/switch-to-configuration boot
|
||||
|
||||
# The above scripts will generate a random machine-id and we don't want to bake a single ID into all our images
|
||||
rm -f $mountPoint/etc/machine-id
|
||||
# The above scripts will generate a random machine-id and we don't want to bake a single ID into all our images
|
||||
rm -f $mountPoint/etc/machine-id
|
||||
''}
|
||||
|
||||
# Set the ownerships of the contents. The modes are set in preVM.
|
||||
# No globbing on targets, so no need to set -f
|
||||
|
|
Loading…
Reference in a new issue