From 6c37763eb80c2b788bae0c0806255954451c1d00 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Sun, 19 May 2024 23:00:02 +0100 Subject: [PATCH] make-disk-image: use OVMF efi always --- lib/make-disk-image.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/make-disk-image.nix b/lib/make-disk-image.nix index e00ec8e..65abef2 100644 --- a/lib/make-disk-image.nix +++ b/lib/make-disk-image.nix @@ -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