1 { config, lib, pkgs, ... }:
3 cfg = config.services.cpupower-gui;
6 services.cpupower-gui = {
7 enable = lib.mkOption {
12 Enables dbus/systemd service needed by cpupower-gui.
13 These services are responsible for retrieving and modifying cpu power
20 config = lib.mkIf cfg.enable {
21 environment.systemPackages = [ pkgs.cpupower-gui ];
22 services.dbus.packages = [ pkgs.cpupower-gui ];
24 services.cpupower-gui-user = {
25 description = "Apply cpupower-gui config at user login";
26 wantedBy = [ "graphical-session.target" ];
29 ExecStart = "${pkgs.cpupower-gui}/bin/cpupower-gui config";
35 description = "Apply cpupower-gui config at boot";
36 wantedBy = [ "multi-user.target" ];
39 ExecStart = "${pkgs.cpupower-gui}/bin/cpupower-gui config";
42 cpupower-gui-helper = {
43 description = "cpupower-gui system helper";
44 aliases = [ "dbus-org.rnd2.cpupower_gui.helper.service" ];
47 BusName = "org.rnd2.cpupower_gui.helper";
48 ExecStart = "${pkgs.cpupower-gui}/lib/cpupower-gui/cpupower-gui-helper";