mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-06 10:33:52 +00:00
39 lines
640 B
Nix
39 lines
640 B
Nix
{
|
|
x,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
with lib;
|
|
with x;
|
|
let
|
|
cfg = config.module.services.autocpu;
|
|
in
|
|
{
|
|
options = {
|
|
module.services.autocpu = {
|
|
enable = mkBool;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.auto-cpufreq = True // {
|
|
settings = {
|
|
charger = {
|
|
# AC MODE
|
|
governor = "performance";
|
|
turbo = "auto";
|
|
};
|
|
battery = {
|
|
# BAT MODE
|
|
governor = "powersave";
|
|
turbo = "auto";
|
|
energy_perf_bias = "balance_power";
|
|
platform_profile = "low-power";
|
|
enable_thresholds = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|