841d9c7fc1
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
24 lines
553 B
Nix
24 lines
553 B
Nix
{ config, lib, pkgs, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.services.auto-cpufreq;
|
|
in {
|
|
options = {
|
|
services.auto-cpufreq = {
|
|
enable = mkEnableOption "auto-cpufreq daemon";
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = [ pkgs.auto-cpufreq ];
|
|
|
|
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 ];
|
|
};
|
|
};
|
|
};
|
|
}
|