+5
-1
hosts/focalor/hardware.nix
+5
-1
hosts/focalor/hardware.nix
···
9
9
];
10
10
11
11
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "uas" "usbhid" "sd_mod" ];
12
-
boot.initrd.kernelModules = [ ];
12
+
boot.initrd.kernelModules = [ "vfio" "vfio_iommu_type1" "vfio_pci" ];
13
13
boot.kernelModules = [ "kvm-amd" ];
14
+
boot.kernelParams = [
15
+
"amd_iommu=on"
16
+
"vfio-pci.ids=10de:2484,10de228b,1022:149c,15b7:5045,1dbe:5236,1022:149c"
17
+
];
14
18
boot.extraModulePackages = [ ];
15
19
16
20
fileSystems."/" =
+20
hosts/focalor/scripts/end.sh
+20
hosts/focalor/scripts/end.sh
···
1
+
#!/usr/bin/env bash
2
+
set -x
3
+
4
+
virsh nodedev-reattach pci_0000_0a_00_0
5
+
virsh nodedev-reattach pci_0000_0a_00_1
6
+
virsh nodedev-reattach pci_0000_06_00_1
7
+
virsh nodedev-reattach pci_0000_06_00_3
8
+
virsh nodedev-reattach pci_0000_0c_00_3
9
+
10
+
modprobe -r vfio-pci
11
+
12
+
modprobe nvidia_modeset
13
+
modprobe nvidia_uvm
14
+
modprobe nvidia_drm
15
+
modprobe nvidia
16
+
17
+
modprobe -r xhci_pci
18
+
modprobe xhci_pci
19
+
20
+
systemctl restart display-manager