2024-12-16 12:55:24 +00:00
|
|
|
{ x, pkgs, lib, config, ... }:
|
2024-11-21 09:24:15 +00:00
|
|
|
|
|
|
|
with lib;
|
2024-12-09 01:15:55 +00:00
|
|
|
with x;
|
2024-11-21 09:24:15 +00:00
|
|
|
let cfg = config.module.services.tlp;
|
|
|
|
in {
|
2024-12-09 01:15:55 +00:00
|
|
|
options = { module.services.tlp = { enable = mkBool; }; };
|
2024-11-21 09:24:15 +00:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services = {
|
|
|
|
thermald = True;
|
|
|
|
upower = True;
|
|
|
|
fprintd = True // { # FINGER PRINT
|
|
|
|
package = pkgs.fprintd-tod;
|
|
|
|
tod = True // { driver = pkgs.libfprint-2-tod1-vfs0090; };
|
|
|
|
};
|
|
|
|
tlp = True // {
|
|
|
|
settings = {
|
|
|
|
PLATFORM_PROFILE_ON_AC = "performance";
|
|
|
|
PLATFORM_PROFILE_ON_BAT = "balanced";
|
|
|
|
|
|
|
|
# CPU
|
|
|
|
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 = "balance_performance";
|
|
|
|
|
|
|
|
CPU_BOOST_ON_AC = 1;
|
|
|
|
CPU_BOOST_ON_BAT = 0;
|
|
|
|
|
|
|
|
CPU_MIN_PERF_ON_AC = 0;
|
|
|
|
CPU_MAX_PERF_ON_AC = 100;
|
|
|
|
CPU_MIN_PERF_ON_BAT = 0;
|
|
|
|
CPU_MAX_PERF_ON_BAT = 40;
|
|
|
|
|
|
|
|
# NETWORKING
|
|
|
|
WIFI_PWR_ON_AC = "off";
|
|
|
|
WIFI_PWR_ON_BAT = "on";
|
|
|
|
|
|
|
|
# GRAPHICS
|
|
|
|
RADEON_DPM_STATE_ON_AC = "performance";
|
|
|
|
RADEON_DPM_STATE_ON_BAT = "battery";
|
|
|
|
RADEON_POWER_PROFILE_ON_AC = "default";
|
|
|
|
RADEON_POWER_PROFILE_ON_BAT = "default";
|
|
|
|
|
|
|
|
# IDK
|
|
|
|
TLP_DEFAULT_MODE = "BAT";
|
|
|
|
RUNTIME_PM_ON_AC = "auto";
|
|
|
|
RUNTIME_PM_ON_BAT = "auto";
|
|
|
|
USB_AUTOSUSPEND = 0;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|