diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2024-03-11 21:05:53 +0530 |
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-03-11 21:05:53 +0530 |
| commit | b71f27a2179cdfa58492e2696246d3d8e55f9844 (patch) | |
| tree | 7a86e0e83e8e9a989115a6bc05d5899389eaac53 /modules | |
| parent | 44861481073bc3cdad0a5c7794c77f60e42d5ba1 (diff) | |
update
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/passthrough.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/passthrough.nix b/modules/passthrough.nix new file mode 100644 index 0000000..23afa88 --- /dev/null +++ b/modules/passthrough.nix @@ -0,0 +1,25 @@ +{ pkgs, lib, config, ... }: +let + # RTX 3070 Ti + gpuIDs = [ + "10de:28e0" # Graphics + "10de:22be" # Audio + ]; +in { + boot = { + initrd.kernelModules = [ + "vfio_pci" + "vfio" + "vfio_iommu_type1" + + "nvidia" + "nvidia_modeset" + "nvidia_uvm" + "nvidia_drm" + ]; + + kernelParams = [ + ("vfio-pci.ids=" + lib.concatStringsSep "," gpuIDs) + ]; + }; +} |
