add nv gpu passthrough vm setup

This commit is contained in:
2026-02-26 02:46:01 +01:00
parent 2332cc1e9d
commit aaba57ee2f

View File

@@ -0,0 +1,23 @@
{ config, lib, system, pkgs, ... }:
{
boot.kernelParams = [
"amd_iommu=on"
"iommu=pt"
"vfio-pci.ids=10de:1b81,10de:10f0"
];
virtualisation.libvirtd = {
enable = true;
onBoot = "ignore";
onShutdown = "shutdown";
qemu.runAsRoot = true;
qemu.swtpm.enable = true;
qemu.package = pkgs.qemu_full;
};
environment.systemPackages = with pkgs; [
virtiofsd
config.virtualisation.libvirtd.qemu.package
looking-glass-client
virt-manager
libguestfs-with-appliance
];
}