{ pkgs, config, lib, ... }: with lib; let cfg = config.module.virt.libvirt; in { options = { module.virt.libvirt.enable = mkEnableOption "enables virtualisation"; }; config = mkIf cfg.enable { virtualisation.libvirtd = { enable = true; qemu = { package = pkgs.qemu_kvm; runAsRoot = false; swtpm.enable = true; vhostUserPackages = [pkgs.virtiofsd]; # ovmf = { # enable = true; # packages = [ # (pkgs.OVMF.override { # secureBoot = true; # tpmSupport = true; # }) # .fd # ]; # }; }; }; }; }