1 { config, lib, pkgs, ... }:
4 cfg = config.services.power-profiles-daemon;
13 services.power-profiles-daemon = {
15 enable = lib.mkOption {
16 type = lib.types.bool;
19 Whether to enable power-profiles-daemon, a DBus daemon that allows
20 changing system behavior based upon user-selected power profiles.
24 package = lib.mkPackageOption pkgs "power-profiles-daemon" { };
33 config = lib.mkIf cfg.enable {
36 { assertion = !config.services.tlp.enable;
38 You have set services.power-profiles-daemon.enable = true;
39 which conflicts with services.tlp.enable = true;
42 { assertion = !config.services.auto-cpufreq.enable;
44 You have set services.power-profiles-daemon.enable = true;
45 which conflicts with services.auto-cpufreq.enable = true;
50 environment.systemPackages = [ cfg.package ];
52 services.dbus.packages = [ cfg.package ];
54 services.udev.packages = [ cfg.package ];
56 systemd.packages = [ cfg.package ];