Tweak performance and battery optimisation settings

Based on https://github.com/MatthewCroughan/nixcfg and other sources.
This commit is contained in:
Oliver Davies 2024-06-09 20:51:23 +01:00
parent 00d9a75c3e
commit a87750cd30
2 changed files with 26 additions and 2 deletions

View file

@ -26,6 +26,23 @@ in {
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
services.thermald.enable = true;
services.power-profiles-daemon.enable = false;
services.tlp = {
enable = true;
settings = {
PCIE_ASPM_ON_BAT = "powersupersave";
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_MAX_PERF_ON_AC = "100";
CPU_MAX_PERF_ON_BAT = "30";
STOP_CHARGE_THRESH_BAT1 = "95";
STOP_CHARGE_THRESH_BAT0 = "95";
};
};
systemd.extraConfig = ''
DefaultTimeoutStopSec=10s
'';