2024-09-09 05:49:52 -07:00
|
|
|
{ lib, pkgs, ... }:
|
2022-12-24 02:38:10 +03:00
|
|
|
|
|
|
|
{
|
2022-12-28 23:10:35 +03:00
|
|
|
imports = [
|
|
|
|
../../../thinkpad/yoga.nix
|
|
|
|
../../../../common/gpu/amd/default.nix
|
2022-12-24 02:38:10 +03:00
|
|
|
];
|
2022-12-28 23:10:35 +03:00
|
|
|
|
|
|
|
boot.initrd.kernelModules = [ "ideapad_laptop" ];
|
2022-12-24 02:38:10 +03:00
|
|
|
|
2022-12-29 13:52:15 +00:00
|
|
|
# latest kernel needed to make wifi work
|
2024-09-09 05:49:52 -07:00
|
|
|
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest;
|
2022-12-24 02:38:10 +03:00
|
|
|
|
2022-12-28 23:10:35 +03:00
|
|
|
# energy savings
|
2024-09-09 05:49:52 -07:00
|
|
|
boot.kernelParams = [
|
|
|
|
"mem_sleep_default=deep"
|
|
|
|
"pcie_aspm.policy=powersupersave"
|
|
|
|
];
|
2024-06-28 08:30:54 +03:00
|
|
|
|
2024-09-03 08:29:13 -07:00
|
|
|
# Fix for unstable wifi connection on Lenovo laptops
|
|
|
|
boot.extraModprobeConfig = ''
|
|
|
|
options rtw89_pci disable_clkreq=y disable_aspm_l1=y disable_aspm_l1ss=y
|
|
|
|
'';
|
|
|
|
|
2024-09-09 05:49:52 -07:00
|
|
|
hardware.bluetooth.enable = lib.mkDefault true;
|
2022-12-24 02:38:10 +03:00
|
|
|
}
|