commit 5e72ddcf969139fa810dab50210494ceb4345aff
parent f566f05cca4d062ae2142ad317f37bdf3d2e9722
Author: Katja (ctucx) <git@ctu.cx>
Date: Fri, 7 Mar 2025 12:52:56 +0100
parent f566f05cca4d062ae2142ad317f37bdf3d2e9722
Author: Katja (ctucx) <git@ctu.cx>
Date: Fri, 7 Mar 2025 12:52:56 +0100
configurations/nixos/configure/mobile-device: replace `tlp` with `power-profiles-daemon`
1 file changed, 12 insertions(+), 45 deletions(-)
M
|
57
++++++++++++---------------------------------------------
diff --git a/configurations/nixos/configure/mobile-device.nix b/configurations/nixos/configure/mobile-device.nix @@ -1,54 +1,21 @@ -{ config, pkgs, lib, ... }: +{ lib, ... }: -let - cfg = config.ctucxConfig.configure.mobileDevice; +{ -in { - - options = { - ctucxConfig.configure.mobileDevice = lib.mkEnableOption "mobile device"; + powerManagement = { + enable = true; + cpuFreqGovernor = lib.mkDefault "powersave"; }; - config = lib.mkIf cfg { - powerManagement = { - enable = true; - cpuFreqGovernor = lib.mkDefault "powersave"; - }; - - services = { - upower.enable = true; - # throttled.enable = true; - - logind.lidSwitch = "lock"; - logind.extraConfig = "HandlePowerKey=suspend"; - - tlp = { - enable = true; - settings = { - CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - - START_CHARGE_THRESH_BAT0 = 95; - STOP_CHARGE_THRESH_BAT0 = 100; - - - CPU_SCALING_MIN_FREQ_ON_AC = 800000; - CPU_SCALING_MAX_FREQ_ON_AC = 3000000; - CPU_SCALING_MIN_FREQ_ON_BAT = 800000; - CPU_SCALING_MAX_FREQ_ON_BAT = 2000000; - - SOUND_POWER_SAVE_ON_AC = 0; - SOUND_POWER_SAVE_ON_BAT = 1; + services = { + upower.enable = true; +# throttled.enable = true; - RUNTIME_PM_ON_AC = "on"; - RUNTIME_PM_ON_BAT = "auto"; + logind.lidSwitch = "suspend"; + logind.lidSwitchExternalPower = "lock"; + logind.extraConfig = "HandlePowerKey=suspend"; - NATACPI_ENABLE = 1; - TPACPI_ENABLE = 1; - TPSMAPI_ENABLE = 1; - }; - }; - }; + power-profiles-daemon.enable = true; }; }