Merge pull request #643 from MatthewCroughan/mc/ovmf

make-disk-image: use OVMF efi always
This commit is contained in:
lassulus 2024-05-21 13:38:12 +02:00 committed by GitHub
commit f1654e0772
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,7 +73,8 @@ let
${systemToInstall.config.system.build.nixos-install}/bin/nixos-install --root ${systemToInstall.config.disko.rootMountPoint} --system ${systemToInstall.config.system.build.toplevel} --keep-going --no-channel-copy -v --no-root-password --option binary-caches ""
umount -Rv ${systemToInstall.config.disko.rootMountPoint}
'';
QEMU_OPTS = lib.concatMapStringsSep " " (disk: "-drive file=${disk.name}.raw,if=virtio,cache=unsafe,werror=report,format=raw") (lib.attrValues nixosConfig.config.disko.devices.disk);
QEMU_OPTS = "-drive if=pflash,format=raw,unit=0,readonly=on,file=${pkgs.OVMF.firmware}" + " " + (lib.concatMapStringsSep " " (disk: "-drive file=${disk.name}.raw,if=virtio,cache=unsafe,werror=report,format=raw") (lib.attrValues nixosConfig.config.disko.devices.disk));
in
{
pure = vmTools.runInLinuxVM (pkgs.runCommand name