feat: add extra power-saving profile
This commit is contained in:
parent
a479e4633c
commit
0608d646c5
2 changed files with 25 additions and 3 deletions
|
@ -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;
|
||||
|
|
22
nixos/services/power_management.service.nix
Normal file
22
nixos/services/power_management.service.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue