1{ config, lib, pkgs, ... }:
2with lib;
3let
4 cfg = config.services.auto-cpufreq;
5in {
6 options = {
7 services.auto-cpufreq = {
8 enable = mkEnableOption (lib.mdDoc "auto-cpufreq daemon");
9 };
10 };
11
12 config = mkIf cfg.enable {
13 environment.systemPackages = [ pkgs.auto-cpufreq ];
14
15 systemd = {
16 packages = [ pkgs.auto-cpufreq ];
17 services.auto-cpufreq = {
18 # Workaround for https://github.com/NixOS/nixpkgs/issues/81138
19 wantedBy = [ "multi-user.target" ];
20 path = with pkgs; [ bash coreutils ];
21 };
22 };
23 };
24}