2021-02-13 14:23:35 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.auto-cpufreq;
|
|
|
|
in {
|
|
|
|
options = {
|
|
|
|
services.auto-cpufreq = {
|
2022-09-09 14:08:57 +00:00
|
|
|
enable = mkEnableOption (lib.mdDoc "auto-cpufreq daemon");
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ pkgs.auto-cpufreq ];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
systemd = {
|
|
|
|
packages = [ pkgs.auto-cpufreq ];
|
|
|
|
services.auto-cpufreq = {
|
|
|
|
# Workaround for https://github.com/NixOS/nixpkgs/issues/81138
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
path = with pkgs; [ bash coreutils ];
|
|
|
|
};
|
|
|
|
};
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
}
|