From 358aa90e30a631c687a7a60150c67eb65b458c37 Mon Sep 17 00:00:00 2001 From: Aamaruvi Yogamani <38222826+Technical27@users.noreply.github.com> Date: Mon, 14 Jun 2021 19:53:47 -0400 Subject: [PATCH] nixos/auto-cpufreq: fix service wantedBy --- nixos/modules/services/hardware/auto-cpufreq.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/hardware/auto-cpufreq.nix b/nixos/modules/services/hardware/auto-cpufreq.nix index 72c4eccaff72..f846476b30b5 100644 --- a/nixos/modules/services/hardware/auto-cpufreq.nix +++ b/nixos/modules/services/hardware/auto-cpufreq.nix @@ -12,7 +12,13 @@ in { config = mkIf cfg.enable { environment.systemPackages = [ pkgs.auto-cpufreq ]; - systemd.packages = [ pkgs.auto-cpufreq ]; - systemd.services.auto-cpufreq.path = with pkgs; [ bash coreutils ]; + 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 ]; + }; + }; }; }