From df5d588f13674bbe4be63a05e533c8303ea5a465 Mon Sep 17 00:00:00 2001 From: Clemens Fruhwirth Date: Mon, 1 May 2017 17:21:26 +0200 Subject: Introduce virtualisation.libvirtd.qemuOvmf. --- nixos/modules/virtualisation/libvirtd.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'nixos') diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix index c0cebaddec8d..58581eed74a1 100644 --- a/nixos/modules/virtualisation/libvirtd.nix +++ b/nixos/modules/virtualisation/libvirtd.nix @@ -14,6 +14,9 @@ let ${cfg.extraConfig} ''; qemuConfigFile = pkgs.writeText "qemu.conf" '' + ${optionalString cfg.qemuOvmf '' + nvram = ["${pkgs.OVMF}/FV/OVMF_CODE.fd:${pkgs.OVMF}/FV/OVMF_VARS.fd"] + ''} ${cfg.qemuVerbatimConfig} ''; @@ -63,6 +66,15 @@ in { ''; }; + virtualisation.libvirtd.qemuOvmf = mkOption { + type = types.bool; + default = true; + description = '' + Allows libvirtd to take advantage of OVMF when creating new + QEMU VMs with UEFI boot. + ''; + }; + virtualisation.libvirtd.extraOptions = mkOption { type = types.listOf types.str; default = [ ]; -- cgit 1.4.1