mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
nixos/auto-cpufreq: Avoid touching /etc
This commit is contained in:
parent
deab2b3bf7
commit
04b1a3f847
1 changed files with 5 additions and 2 deletions
|
@ -27,15 +27,18 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.auto-cpufreq ];
|
||||
environment.etc.${cfgFilename}.source = cfgFile;
|
||||
|
||||
systemd = {
|
||||
packages = [ pkgs.auto-cpufreq ];
|
||||
services.auto-cpufreq = {
|
||||
# Workaround for https://github.com/NixOS/nixpkgs/issues/81138
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
restartTriggers = [ cfgFile ];
|
||||
path = with pkgs; [ bash coreutils ];
|
||||
|
||||
serviceConfig.ExecStart = [
|
||||
""
|
||||
"${lib.getExe pkgs.auto-cpufreq} --config ${cfgFile}"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue