2023-08-24 18:27:05 +07:00
|
|
|
{ hardware
|
2023-10-24 00:17:53 +07:00
|
|
|
, pkgs
|
2023-12-09 00:38:25 +07:00
|
|
|
, lib
|
2023-08-24 18:27:05 +07:00
|
|
|
, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = with hardware; [
|
|
|
|
common-pc-ssd # enables fstrim
|
|
|
|
common-cpu-amd # microcode
|
|
|
|
common-cpu-amd-pstate # amd-pstate
|
|
|
|
common-gpu-amd # configures drivers
|
|
|
|
common-pc-laptop # enables tlp
|
|
|
|
];
|
|
|
|
common.resolution = "1920x1080";
|
|
|
|
vfio.pciIDs = [ "1002:73df" "1002:ab28" ];
|
|
|
|
boot = {
|
2023-12-09 00:38:25 +07:00
|
|
|
kernelPackages = lib.mkDefault (pkgs.linuxPackagesFor pkgs.linux_latest);
|
2023-08-24 18:27:05 +07:00
|
|
|
initrd.availableKernelModules = [ "nvme" "xhci_pci" ];
|
|
|
|
kernelParams = [
|
|
|
|
# disable PSR to *hopefully* avoid random hangs
|
|
|
|
# this one didnt help
|
|
|
|
"amdgpu.dcdebugmask=0x10"
|
|
|
|
# maybe this one will?
|
|
|
|
"amdgpu.noretry=0"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|