From 9a921d531ac5f8deed26e4f9efa387adc3f8cb59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20K=C3=A4nner?= Date: Sun, 29 Dec 2024 00:01:18 +0100 Subject: [PATCH] only use kvm when configured --- modules/nixos/qemu.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/nixos/qemu.nix b/modules/nixos/qemu.nix index 2542084..1782277 100644 --- a/modules/nixos/qemu.nix +++ b/modules/nixos/qemu.nix @@ -16,7 +16,10 @@ in { libvirtd = { enable = true; qemu = { - package = lib.mkIf cfg.kvm pkgs.qemu_kvm; + package = + if cfg.kvm + then pkgs.qemu_kvm + else config.virtualisation.libvirtd.qemu.package; runAsRoot = true; swtpm.enable = true; ovmf = {