From 2bb7676c165669a355b3fb73159e4d6df536bca3 Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Thu, 11 Dec 2025 18:23:36 +0200 Subject: [PATCH] feat: tlp --- modules/nixos/tlp.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 modules/nixos/tlp.nix diff --git a/modules/nixos/tlp.nix b/modules/nixos/tlp.nix new file mode 100644 index 0000000..6146dd4 --- /dev/null +++ b/modules/nixos/tlp.nix @@ -0,0 +1,17 @@ +{ + flake.modules.nixos.tlp = {...}: { + services.tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + + CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + + START_CHARGE_THRESH_BAT0 = 40; + STOP_CHARGE_THRESH_BAT0 = 80; + }; + }; + }; +} -- 2.44.1