23 lines
564 B
Nix
23 lines
564 B
Nix
# Module: Power Management
|
|
# Description: CPU frequency governor and power management settings
|
|
# Services: powerManagement
|
|
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: {
|
|
options.custom.power = {
|
|
enable = lib.mkEnableOption "power management configuration";
|
|
|
|
cpuGovernor = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "powersave";
|
|
description = "CPU frequency governor (powersave, performance, ondemand, etc.)";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.custom.power.enable {
|
|
powerManagement.cpuFreqGovernor = config.custom.power.cpuGovernor;
|
|
};
|
|
}
|