NixOS-Configs/hosts/workstation/auto-cpufreq.nix
2026-05-16 22:36:47 -05:00

24 lines
578 B
Nix

{ pkgs, inputs, config, lib, ... }:
with lib;
let cfg = config.roles.auto-cpufreq;
in {
# options.roles.auto-cpufreq = { enable = mkEnableOption "roles auto-cpufreq"; };
config = mkIf cfg.enable {
services.auto-cpufreq = {
enable = true;
settings = {
battery = {
governor = "powersave";
turbo = "never";
enable_thresholds = true;
start_threshold = 50;
stop_threshold = 80;
};
charger = {
governor = "performance";
turbo = "auto";
};
};
};
};
}