2021-05-09 06:34:31 +00:00
|
|
|
# Power management configuration for the laptops
|
|
|
|
|
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
powerManagement = {
|
|
|
|
enable = true;
|
|
|
|
cpuFreqGovernor = lib.mkDefault "performance";
|
2021-11-16 04:57:23 +00:00
|
|
|
powertop.enable = true; # Enable powertop auto tuning on startup
|
2021-05-09 06:34:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
2021-05-13 01:36:54 +00:00
|
|
|
logind = {
|
|
|
|
lidSwitch = "hybrid-sleep";
|
2021-09-03 11:55:08 +00:00
|
|
|
lidSwitchDocked = "ignore";
|
2021-05-13 01:36:54 +00:00
|
|
|
};
|
2021-06-04 00:32:51 +00:00
|
|
|
tlp.enable = false;
|
2021-05-09 06:34:31 +00:00
|
|
|
upower = {
|
2021-11-16 04:57:23 +00:00
|
|
|
enable = true; # Enable application power managemetn support
|
2021-05-25 06:27:55 +00:00
|
|
|
percentageCritical = 15;
|
2021-09-03 11:55:08 +00:00
|
|
|
percentageAction = 15;
|
2021-05-09 06:34:31 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|