only use kvm when configured

This commit is contained in:
Max Känner 2024-12-29 00:01:18 +01:00
parent 628b278309
commit 9a921d531a

View File

@ -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 = {