feat: add extra power-saving profile

This commit is contained in:
Zhongheng Liu 2024-09-26 16:51:22 +03:00
commit 0608d646c5
No known key found for this signature in database
2 changed files with 25 additions and 3 deletions

View file

@ -1,7 +1,7 @@
{...}: {
#specialisation.powersave.configuration = {
# services.auto-cpufreq.enable = true;
#};
specialisation.powersave.configuration = {
services.auto-cpufreq.enable = true;
};
services = {
upower.enable = true;
udisks2.enable = true;

View file

@ -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;
};
};
}