main
1{
2 config,
3 pkgs,
4 ...
5}:
6{
7 boot = {
8 # supportedFilesystems = [ "zfs" ];
9 initrd.availableKernelModules = [
10 "xhci_pci"
11 "ahci"
12 "nvme"
13 "usb_storage"
14 "usbhid"
15 "sd_mod"
16 "sr_mod"
17 ];
18 initrd.kernelModules = [
19 "vfio_pci"
20 "vfio"
21 "vfio_iommu_type1"
22
23 "nvidia"
24 "nvidia_modeset"
25 "nvidia_uvm"
26 "nvidia_drm"
27 ];
28 kernelModules = [
29 "ahci" # sata controller, might not be needed
30 "nvme" # required for nvme disks
31 "thunderbolt" # required for thunderbolt (dock, …)
32 # from thinkpad x1 gen 9
33 "dm-mod"
34 "cryptd" # required for encryption
35 "xhci_pci" # usb controller related
36 "usb_storage" # usb storage related
37 "sd_mod" # block device related
38 "sdhci_pci" # block device related as well
39 "aesni-intel" # advanced encryption for intel
40 "kvm_intel"
41 "kvm-intel"
42 "nvidia"
43 ];
44 extraModulePackages = [
45 config.boot.kernelPackages.nvidiaPackages.stable
46 config.boot.kernelPackages.nvidia_x11
47 ];
48 kernelParams = [
49 "intel_iommu=on"
50 "kvm_intel.nested=1"
51 # ("vfio-pci.ids=" + lib.concatStringsSep "," gpuIDs)
52 ];
53
54 kernelPackages = pkgs.linuxPackages_latest;
55 };
56}