dotfiles/nixos/configs/virt-host.nix
2024-11-07 16:25:41 -07:00

24 lines
413 B
Nix

#
# Hypervisor configuration using KVM.
#
# vim: et:ts=2:sw=2:
#
{ pkgs, ... }:
{
virtualisation.libvirtd.enable = true;
# Enable USB passthrough.
virtualisation.spiceUSBRedirection.enable = true;
# Set our system to use libvirt, too.
boot.kernelModules = [
"kvm-amd"
"kvm-intel"
];
environment.systemPackages = with pkgs; [
libvirt
virtiofsd
virt-manager
spice-gtk
];
}