From 75aa4f74cfc7483015f07ed0542fe6a84e481a37 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Mon, 25 Aug 2025 00:46:52 +0200 Subject: [PATCH] add battery saving options --- nixos/configuration.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 84c432d..86afee9 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -53,6 +53,16 @@ }; }; }; + services.tlp = { + enable = true; + settings = { + CPU_BOOST_ON_BAT = 0; + CPU_SCALING_GOVERNOR_ON_BATTERY = "powersave"; + START_CHARGE_THRESH_BAT0 = 90; + STOP_CHARGE_THRESH_BAT0 = 97; + RUNTIME_PM_ON_BAT = "auto"; + }; + }; environment.systemPackages = with pkgs; [ grim