From 13ceb5f40cb230f178ac05ca15933fef2e6cc02f Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 28 Dec 2025 17:48:33 +0200 Subject: feat(modules)!: Complete reorganisation and renaming of module groups --- modules/personal/hw-battery.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 modules/personal/hw-battery.nix (limited to 'modules/personal/hw-battery.nix') diff --git a/modules/personal/hw-battery.nix b/modules/personal/hw-battery.nix new file mode 100644 index 0000000..7d94f9a --- /dev/null +++ b/modules/personal/hw-battery.nix @@ -0,0 +1,30 @@ +{ pkgs, ... }: { + environment.systemPackages = with pkgs; [ + powertop + upower + acpid + tlp + ]; + + services = { + upower.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-26-gb76a