From b71f27a2179cdfa58492e2696246d3d8e55f9844 Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Mon, 11 Mar 2024 21:05:53 +0530 Subject: update --- modules/passthrough.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 modules/passthrough.nix (limited to 'modules/passthrough.nix') 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) + ]; + }; +} -- cgit v1.2.3