25 lines
575 B
Nix
25 lines
575 B
Nix
{ config, lib, pkgs, ... }:
|
|
let
|
|
commonKernelParams = [
|
|
"amd_iommu=on"
|
|
"iommu=pt"
|
|
];
|
|
in {
|
|
boot = {
|
|
kernelPackages = pkgs.linuxPackages_6_14;
|
|
kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:1f82,10de:10fa" ];
|
|
|
|
# Load into GPU before video driver
|
|
initrd.kernelModules = [
|
|
"vfio"
|
|
"vfio_pci"
|
|
"vfio_iommu_type1"
|
|
];
|
|
|
|
# Secure boot
|
|
lanzaboote.enable = true;
|
|
};
|
|
|
|
# Use second GPU on boot
|
|
specialisation.gputwo.configuration.boot.kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:2504,10de:228e" ];
|
|
}
|