add end script

This commit is contained in:
waveringana 2025-06-15 05:35:32 -04:00
parent eb628e5a74
commit 1a13656f95
3 changed files with 28 additions and 1 deletions

View file

@ -9,8 +9,12 @@
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "uas" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.initrd.kernelModules = [ "vfio" "vfio_iommu_type1" "vfio_pci" ];
boot.kernelModules = [ "kvm-amd" ];
boot.kernelParams = [
"amd_iommu=on"
"vfio-pci.ids=10de:2484,10de228b,1022:149c,15b7:5045,1dbe:5236,1022:149c"
];
boot.extraModulePackages = [ ];
fileSystems."/" =

View file

@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -x
virsh nodedev-reattach pci_0000_0a_00_0
virsh nodedev-reattach pci_0000_0a_00_1
virsh nodedev-reattach pci_0000_06_00_1
virsh nodedev-reattach pci_0000_06_00_3
virsh nodedev-reattach pci_0000_0c_00_3
modprobe -r vfio-pci
modprobe nvidia_modeset
modprobe nvidia_uvm
modprobe nvidia_drm
modprobe nvidia
modprobe -r xhci_pci
modprobe xhci_pci
systemctl restart display-manager

View file

@ -17,6 +17,9 @@
}).fd];
};
};
hooks.qemu = {
end = "./scripts/end.sh";
};
};
users.extraUsers.regent.extraGroups = [ "libvirtd" ];