2024-06-14 14:05:59 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
inputs,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
boot = {
|
|
|
|
initrd = {
|
2024-06-22 12:10:36 -04:00
|
|
|
availableKernelModules = ["nvme" "sd_mod" "usb_storage" "usbhid" "xhci_pci"];
|
2024-06-15 17:47:22 -04:00
|
|
|
kernelModules = ["amdgpu"];
|
2024-06-14 14:05:59 -04:00
|
|
|
};
|
2024-06-22 12:10:36 -04:00
|
|
|
|
2024-06-15 17:47:22 -04:00
|
|
|
kernelModules = ["kvm-amd" "amdgpu"];
|
2024-06-22 12:10:36 -04:00
|
|
|
|
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
2024-06-14 14:05:59 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
hardware = {
|
2024-06-22 12:10:36 -04:00
|
|
|
cpu.amd.updateMicrocode = true;
|
2024-06-14 21:18:00 -04:00
|
|
|
enableAllFirmware = true;
|
|
|
|
|
2024-06-14 14:05:59 -04:00
|
|
|
opengl = {
|
2024-06-19 20:55:54 -04:00
|
|
|
enable = true;
|
2024-06-14 14:05:59 -04:00
|
|
|
driSupport = true;
|
|
|
|
driSupport32Bit = true;
|
2024-06-15 17:47:22 -04:00
|
|
|
extraPackages = with pkgs; [rocmPackages.clr.icd amdvlk];
|
|
|
|
extraPackages32 = with pkgs; [driversi686Linux.amdvlk];
|
2024-06-14 14:05:59 -04:00
|
|
|
};
|
|
|
|
};
|
2024-06-14 21:18:00 -04:00
|
|
|
|
2024-06-14 14:05:59 -04:00
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
2024-06-22 12:10:36 -04:00
|
|
|
|
|
|
|
services.fstrim.enable = true;
|
2024-06-14 14:05:59 -04:00
|
|
|
}
|