From 2799014bd60c44831b47cacbd43c3633553a20c6 Mon Sep 17 00:00:00 2001 From: Suyashtnt Date: Fri, 24 May 2024 07:44:07 +0200 Subject: [PATCH] chore: move tlp to laptop.nix --- systems/EVIL-LAPTOP/config.nix | 19 ------------------- systems/modules/laptop.nix | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/systems/EVIL-LAPTOP/config.nix b/systems/EVIL-LAPTOP/config.nix index 9ad6cf5..0558ce0 100644 --- a/systems/EVIL-LAPTOP/config.nix +++ b/systems/EVIL-LAPTOP/config.nix @@ -44,25 +44,6 @@ ]; 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 = 60; - - #Optional helps save long term battery health - START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge - STOP_CHARGE_THRESH_BAT0 = 100; - }; - }; usbmuxd.enable = true; avahi.enable = true; diff --git a/systems/modules/laptop.nix b/systems/modules/laptop.nix index 0767e40..db890ab 100644 --- a/systems/modules/laptop.nix +++ b/systems/modules/laptop.nix @@ -3,6 +3,26 @@ upower.enable = true; blueman.enable = true; + 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 = 60; + + #Optional helps save long term battery health + START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge + STOP_CHARGE_THRESH_BAT0 = 100; + }; + }; + # for until https://github.com/NixOS/nixpkgs/pull/292115 has been merged pipewire.wireplumber.configPackages = [ (pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/51-bluez-config.lua" ''