~ruther/nixos-config

61beed4911f2fa8028829250b6890391c4089561 — Frantisek Bohacek 1 year, 4 months ago 5fc78c9
feat(qemu): add uefi secure boot support
1 files changed, 13 insertions(+), 0 deletions(-)

M modules/desktop/virtualisation/qemu.nix
M modules/desktop/virtualisation/qemu.nix => modules/desktop/virtualisation/qemu.nix +13 -0
@@ 13,6 13,8 @@
      enable = true;                          # Virtual drivers
      #qemuPackage = pkgs.qemu_kvm;           # Default
      qemu = {
        ovmf.enable = true;
        ovmf.packages = [ pkgs.OVMFFull.fd ];
        verbatimConfig = ''
         nvram = [ "${pkgs.OVMF}/FV/OVMF.fd:${pkgs.OVMF}/FV/OVMF_VARS.fd" ]
        '';


@@ 22,7 24,18 @@
    spiceUSBRedirection.enable = true;        # USB passthrough
  };


  environment = {
    etc = {
      "ovmf/edk2-x86_64-secure-code.fd" = {
        source = config.virtualisation.libvirtd.qemu.package + "/share/qemu/edk2-x86_64-secure-code.fd";
      };

      "ovmf/edk2-i386-vars.fd" = {
        source = config.virtualisation.libvirtd.qemu.package + "/share/qemu/edk2-i386-vars.fd";
      };
    };

    systemPackages = with pkgs; [
      virt-manager
      virt-viewer

Do not follow this link