diff --git a/nixos/modules/services/hardware/throttled.nix b/nixos/modules/services/hardware/throttled.nix index 99735ff6519d..2d801a7e838f 100644 --- a/nixos/modules/services/hardware/throttled.nix +++ b/nixos/modules/services/hardware/throttled.nix @@ -22,10 +22,10 @@ in { # The upstream package has this in Install, but that's not enough, see the NixOS manual systemd.services.lenovo_fix.wantedBy = [ "multi-user.target" ]; - environment.etc."lenovo_fix.conf".source = + environment.etc."throttled.conf".source = if cfg.extraConfig != "" - then pkgs.writeText "lenovo_fix.conf" cfg.extraConfig - else "${pkgs.throttled}/etc/lenovo_fix.conf"; + then pkgs.writeText "throttled.conf" cfg.extraConfig + else "${pkgs.throttled}/etc/throttled.conf"; # Kernel 5.9 spams warnings whenever userspace writes to CPU MSRs. # See https://github.com/erpalma/throttled/issues/215 diff --git a/pkgs/tools/system/throttled/default.nix b/pkgs/tools/system/throttled/default.nix index 2729a16b8687..efbc9ed3dd3f 100644 --- a/pkgs/tools/system/throttled/default.nix +++ b/pkgs/tools/system/throttled/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "throttled"; - version = "0.9.2"; + version = "0.10.0"; src = fetchFromGitHub { owner = "erpalma"; repo = pname; rev = "v${version}"; - sha256 = "sha256-4aDa6REDHO7gr1czIv6NlepeMVJI93agxJjE2vHiEmk="; + sha256 = "sha256-0MsPp6y4r/uZB2SplKV+SAiJoxIs2jgOQmQoQQ2ZKwI="; }; nativeBuildInputs = [ python3Packages.wrapPython ]; @@ -20,12 +20,12 @@ stdenv.mkDerivation rec { ]; # The upstream unit both assumes the install location, and tries to run in a virtualenv - postPatch = ''sed -e 's|ExecStart=.*|ExecStart=${placeholder "out"}/bin/lenovo_fix.py|' -i systemd/lenovo_fix.service''; + postPatch = ''sed -e 's|ExecStart=.*|ExecStart=${placeholder "out"}/bin/throttled.py|' -i systemd/throttled.service''; installPhase = '' runHook preInstall - install -D -m755 -t $out/bin lenovo_fix.py - install -D -t $out/bin lenovo_fix.py mmio.py + install -D -m755 -t $out/bin throttled.py + install -D -t $out/bin throttled.py mmio.py install -D -m644 -t $out/etc etc/* install -D -m644 -t $out/lib/systemd/system systemd/* runHook postInstall