diff options
Diffstat (limited to 'nixos/services/power_management.service.nix')
-rw-r--r-- | nixos/services/power_management.service.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/nixos/services/power_management.service.nix b/nixos/services/power_management.service.nix new file mode 100644 index 0000000..06d638b --- /dev/null +++ b/nixos/services/power_management.service.nix @@ -0,0 +1,22 @@ +{ + pkgs, + config, + lib, + ... +}: { + services.tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + + CPU_MIN_PERF_ON_AC = 0; + CPU_MAX_PERF_ON_AC = 100; + CPU_MIN_PERF_ON_BAT = 0; + CPU_MAX_PERF_ON_BAT = 20; + }; + }; +} |