init
This commit is contained in:
21
modules/laptop/power.nix
Normal file
21
modules/laptop/power.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
# 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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user