From 203e8e7d1c41b96880dd406cc9ce202238147cdd Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 20 Aug 2024 11:15:07 +0300 Subject: feat(battery): Added battery charge limit and added a lot of cpu settings --- modules/personal/battery.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/personal/battery.nix b/modules/personal/battery.nix index 417446e..8c6af72 100644 --- a/modules/personal/battery.nix +++ b/modules/personal/battery.nix @@ -5,6 +5,23 @@ services = { upower.enable = true; - tlp.enable = true; + tlp = { + enable = true; + settings = { + START_CHARGE_THRESH_BAT0 = 75; + STOP_CHARGE_THRESH_BAT0 = 85; + + START_CHARGE_THRESH_BAT1 = 75; + STOP_CHARGE_THRESH_BAT1 = 85; + + MEM_SLEEP_ON_AC = "deep"; + MEM_SLEEP_ON_BAT = "deep"; + + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + }; + }; }; } -- cgit v1.3.1-23-gd82d