nixpkgs/nixos/modules/services/hardware/auto-cpufreq.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
565 B
Nix
Raw Normal View History

2021-01-08 20:57:48 +00:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.auto-cpufreq;
in {
options = {
services.auto-cpufreq = {
enable = mkEnableOption (lib.mdDoc "auto-cpufreq daemon");
2021-01-08 20:57:48 +00:00
};
};
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 ];
};
};
2021-01-08 20:57:48 +00:00
};
}