nixos-config/modules/virtual/vfio.nix
2025-09-04 10:21:17 +02:00

19 lines
429 B
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{lib, ...}: {
# Ajoute dans linitrd sans auto-référencer loption
boot = {
initrd.kernelModules = lib.mkAfter [
"vfio_pci"
"vfio"
"vfio_iommu_type1"
];
# Ajoute les params IOMMU proprement
kernelParams = lib.mkAfter [
"amd_iommu=on"
"iommu=pt"
];
# Valeur par défaut (sans référencer config.*)
kernel.sysctl."vm.nr_hugepages" = lib.mkDefault 1024;
};
}