system/sandbar: Add vfio for xHCI controller

This commit is contained in:
Artemis Tosini 2024-07-19 21:51:39 +00:00
parent 4c3b933477
commit dcae2c375f
Signed by: artemist
SSH key fingerprint: SHA256:EsuWCwx6fjxxExxf65rX+ocQJJAdw4R1KarpFue6Uwc
3 changed files with 19 additions and 1 deletions

View file

@ -3,7 +3,7 @@
{ {
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
kernelParams = [ "intel_iommu=on" ];
tmp.cleanOnBoot = true; tmp.cleanOnBoot = true;
initrd.systemd.enable = true; initrd.systemd.enable = true;

View file

@ -4,6 +4,7 @@
imports = [ imports = [
./boot-config.nix ./boot-config.nix
./hardware-configuration.nix ./hardware-configuration.nix
./vfio.nix
../../sets/secureBoot.nix ../../sets/secureBoot.nix
../../sets/sshd.nix ../../sets/sshd.nix
../../sets/workstation.nix ../../sets/workstation.nix

17
system/sandbar/vfio.nix Normal file
View file

@ -0,0 +1,17 @@
{ ... }:
{
boot.kernelParams = [
"intel_iommu=on"
"vfio-pci.ids=1b21:1242"
];
boot.initrd.kernelModules = [
"vfio"
"vfio_pci"
"vfio_iommu_type1"
"iommufd"
];
services.udev.extraRules = ''
SUBSYSTEM=="vfio", MODE="660", GROUP="wheel"
'';
}