#
# Hypervisor configuration using KVM.
#
# vim: et:ts=2:sw=2:
#
{ pkgs, ... }:
{
  virtualisation.libvirtd.enable = true;

  # Enable USB passthrough.
  virtualisation.spiceUSBRedirection.enable = true;

  environment.systemPackages = with pkgs; [
    libvirt
    virtiofsd
    virt-manager
    spice-gtk
  ];

  boot.kernelModules = [
    "kvm-amd"
    "kvm-intel"
  ];
}
