diff options
author | Daniel Fullmer <danielrf12@gmail.com> | 2020-06-13 23:22:20 -0400 |
---|---|---|
committer | Daniel Fullmer <danielrf12@gmail.com> | 2020-07-06 12:07:49 -0700 |
commit | 4d148268258732a216dc83327fe16073082d1063 (patch) | |
tree | 994e34ec9e12a0af115eaf4bf735c189b0f62e0d /nixos | |
parent | 146e96d9ba7339a287fb03c626d778ae6ddb8d89 (diff) |
qemu-vm: allow bootloader to set EFI vars
Without this, systemd-boot does not add an EFI boot entry for itself. The reason it worked before this fix is because it would fall back to the default installed \EFI\BOOT\BOOTX64.EFI
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/virtualisation/qemu-vm.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index 5a502c3618087..c9061ea0608c8 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -210,6 +210,10 @@ let mkdir /boot mount /dev/vda2 /boot + ${optionalString config.boot.loader.efi.canTouchEfiVariables '' + mount -t efivarfs efivarfs /sys/firmware/efi/efivars + ''} + # This is needed for GRUB 0.97, which doesn't know about virtio devices. mkdir /boot/grub echo '(hd0) /dev/vda' > /boot/grub/device.map |