2024-12-17 12:10:05 +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-12-17 12:10:05 +00:00
|
|
|
let
|
|
|
|
cfg = config.module.services.tlp;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
module.services.tlp = {
|
|
|
|
enable = mkBool;
|
|
|
|
};
|
|
|
|
};
|
2024-11-21 09:24:15 +00:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services = {
|
|
|
|
thermald = True;
|
|
|
|
upower = True;
|
2024-12-17 12:10:05 +00:00
|
|
|
fprintd = True // {
|
|
|
|
# FINGER PRINT
|
2024-11-21 09:24:15 +00:00
|
|
|
package = pkgs.fprintd-tod;
|
2024-12-17 12:10:05 +00:00
|
|
|
tod = True // {
|
|
|
|
driver = pkgs.libfprint-2-tod1-vfs0090;
|
|
|
|
};
|
2024-11-21 09:24:15 +00:00
|
|
|
};
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|