depot/third_party/nixpkgs/nixos/modules/services/hardware/power-profiles-daemon.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

55 lines
984 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.power-profiles-daemon;
package = pkgs.power-profiles-daemon;
in
{
###### interface
options = {
services.power-profiles-daemon = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable power-profiles-daemon, a DBus daemon that allows
changing system behavior based upon user-selected power profiles.
'';
};
};
};
###### implementation
config = mkIf cfg.enable {
assertions = [
{ assertion = !config.services.tlp.enable;
message = ''
You have set services.power-profiles-daemon.enable = true;
which conflicts with services.tlp.enable = true;
'';
}
];
environment.systemPackages = [ package ];
services.dbus.packages = [ package ];
services.udev.packages = [ package ];
systemd.packages = [ package ];
};
}