PCI passthrough: Difference between revisions
Detailed configuration instructions on how to set everything required to configure pci passthrough |
m fix style |
||
| (One intermediate revision by one other user not shown) | |||
| Line 25: | Line 25: | ||
{{file|/etc/nixos/configuration.nix|nix| | {{file|/etc/nixos/configuration.nix|nix| | ||
<nowiki> | <nowiki> | ||
boot.initrd.kernelModules = [ | |||
"vfio_pci" | |||
"vfio" | |||
"vfio_iommu_type1" | |||
"i915" # replace or remove with your device's driver as needed | |||
]; | |||
</nowiki> | </nowiki> | ||
}} | }} | ||
| Line 58: | Line 58: | ||
{{file|/etc/nixos/configuration.nix|nix| | {{file|/etc/nixos/configuration.nix|nix| | ||
<nowiki> | <nowiki> | ||
boot.kernelParams = [ | |||
"intel_iommu=on" # or "amd_iommu=on" | |||
"vfio-pci.ids=1002:67b0,1002:aac8,144d:a80a" | |||
]; | |||
</nowiki> | </nowiki> | ||
}} | }} | ||
| Line 73: | Line 73: | ||
{{file|/etc/nixos/configuration.nix|nix| | {{file|/etc/nixos/configuration.nix|nix| | ||
<nowiki> | <nowiki> | ||
programs.virt-manager.enable = true; | |||
virtualisation.spiceUSBRedirection.enable = true; | |||
virtualisation.libvirtd = { | |||
enable = true; | |||
qemu = { | |||
package = pkgs.qemu_kvm; | |||
runAsRoot = true; | |||
swtpm.enable = true; | |||
}; | }; | ||
}; | |||
</nowiki> | </nowiki> | ||
}} | }} | ||
| Line 101: | Line 94: | ||
{{file|/etc/nixos/configuration.nix|nix| | {{file|/etc/nixos/configuration.nix|nix| | ||
<nowiki> | <nowiki> | ||
users.extraUsers.myUser.extraGroups = [ "libvirtd" ]; | |||
</nowiki> | </nowiki> | ||
}} | }} | ||