Add TLP module to all laptops
This commit is contained in:
parent
ac53db2be0
commit
6b69a392cd
31
modules/tlp.nix
Normal file
31
modules/tlp.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
services.tlp = {
|
||||
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;
|
||||
STOP_CHARGE_THRESH_BAT0 = 90;
|
||||
|
||||
# BAT 1 - External Battery
|
||||
START_CHARGE_THRESH_BAT1 = 60;
|
||||
STOP_CHARGE_THRESH_BAT1 = 90;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,3 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
../modules/tlp.nix
|
||||
];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue