Merge pull request #109065 from Technical27/add-auto-cpufreq-module

nixos/auto-cpufreq: init module
This commit is contained in:
Kevin Cox 2021-02-05 13:15:13 -05:00 committed by GitHub
commit 48f6dbe1f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View file

@ -359,6 +359,7 @@
./services/games/terraria.nix
./services/hardware/acpid.nix
./services/hardware/actkbd.nix
./services/hardware/auto-cpufreq.nix
./services/hardware/bluetooth.nix
./services/hardware/bolt.nix
./services/hardware/brltty.nix

View file

@ -0,0 +1,18 @@
{ 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 ];
systemd.services.auto-cpufreq.path = with pkgs; [ bash coreutils ];
};
}