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.
nil/modules/system/power.nix
2022-08-13 22:42:16 -04:00

19 lines
489 B
Nix

{ config, lib, pkgs, ... }:
let this = config.my.system.power;
in with lib; {
options.my.system.power.enable = mkEnableOption "Power Management";
config = mkIf this.enable {
# fan control modules
boot.extraModprobeConfig = ''
options thinkpad_acpi fan_control=1 experimental=1
'';
# battery optimizations
powerManagement.powertop.enable = true;
services.upower.enable = true;
environment.systemPackages = with pkgs; [ powertop tpacpi-bat ];
};
}