add nv gpu passthrough vm setup
This commit is contained in:
@@ -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
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user