This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
2022-03-24 22:04:31 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let cfg = config.this.system.power;
|
|
|
|
in with lib; {
|
|
|
|
options.this.system.power.enable = mkEnableOption "Power Management";
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
# fan control modules
|
|
|
|
boot.extraModprobeConfig = ''
|
|
|
|
options thinkpad_acpi fan_control=1 experimental=1
|
|
|
|
'';
|
|
|
|
|
|
|
|
# battery optimizations
|
|
|
|
powerManagement.powertop.enable = true;
|
|
|
|
services.upower.enable = true;
|
|
|
|
|
2022-04-25 02:24:53 +00:00
|
|
|
environment.systemPackages = with pkgs; [ powertop tpacpi-bat ];
|
2022-03-24 22:04:31 +00:00
|
|
|
};
|
|
|
|
}
|