{ pkgs, ... }:

# https://wiki.nixos.org/wiki/Virt-manager

{
  programs.virt-manager.enable = true; # can be x-forwarded
  virtualisation.libvirtd.enable = true;
  /* virtualisation.libvirtd.onShutdown = "shutdown"; # default is "suspend" */
  /* virtualisation.libvirtd.shutdownTimeout = 300; */

  #networking.firewall.trustedInterfaces = [
  #  "virbr0"
  #  "virbr0-nic"
  #];

  virtualisation.libvirtd.qemu.package = pkgs.qemu_kvm;

  # Allows libvirtd to use swtpm to create an emulated TPM.
  /* virtualisation.libvirtd.qemu.swtpm.enable = true; */
}
