{ config, pkgs, lib, ... }: { config = lib.mkIf (config.networking.hostName == "FredOS-Gaming") { # KVM-based VM stack for running a Windows guest (mainly: the DR client # mod is wine-incompatible and has to run on real Windows). virt-manager # is the GUI; OVMFFull provides UEFI firmware with the Secure Boot bits # Win11 needs, and swtpm gives the guest a software TPM 2.0 to satisfy # Win11's install check. virtualisation.libvirtd = { enable = true; qemu = { swtpm.enable = true; ovmf = { enable = true; packages = [ pkgs.OVMFFull.fd ]; }; }; }; programs.virt-manager.enable = true; users.users.fred.extraGroups = [ "libvirtd" ]; environment.systemPackages = with pkgs; [ virt-viewer virtio-win ]; }; }