2023-12-01 15:44:14 +00:00
|
|
|
{lib, config, ...}:
|
2023-01-27 16:34:49 +00:00
|
|
|
{
|
2023-12-01 15:44:14 +00:00
|
|
|
services.tlp = lib.mkIf config.my.includeTLP {
|
2023-01-27 16:34:49 +00:00
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
TLP_DEFAULT_MODE = "AC";
|
|
|
|
|
|
|
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
|
|
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
|
|
|
|
|
|
|
CPU_HWP_ON_AC = "performance";
|
|
|
|
CPU_HWP_ON_BAT = "balance_power";
|
|
|
|
|
|
|
|
WIFI_PWR_ON_AC = "off";
|
|
|
|
WIFI_PWR_ON_BAT = "on";
|
|
|
|
|
|
|
|
SOUND_POWER_SAVE_ON_AC = 0;
|
|
|
|
SOUND_POWER_SAVE_ON_BAT = 1;
|
|
|
|
|
|
|
|
RESTORE_DEVICE_STATE_ON_STARTUP = 1;
|
|
|
|
|
|
|
|
# BAT 0 - Internal battery
|
|
|
|
START_CHARGE_THRESH_BAT0 = 60;
|
2023-07-16 10:58:57 +00:00
|
|
|
STOP_CHARGE_THRESH_BAT0 = 95;
|
2023-01-27 16:34:49 +00:00
|
|
|
|
|
|
|
# BAT 1 - External Battery
|
|
|
|
START_CHARGE_THRESH_BAT1 = 60;
|
2023-07-16 10:58:57 +00:00
|
|
|
STOP_CHARGE_THRESH_BAT1 = 95;
|
2023-01-27 16:34:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|