summary refs log tree commit diff
path: root/nixos/modules/services/hardware
diff options
context:
space:
mode:
authorLorenz Leutgeb <lorenz@leutgeb.xyz>2023-10-16 21:33:22 +0200
committerLorenz Leutgeb <lorenz@leutgeb.xyz>2023-10-22 09:40:59 +0200
commitb893b67028c00760bd0a5586eaa3183660f89dc2 (patch)
tree384229b5402399fd0c7845c0889b1d9783818e38 /nixos/modules/services/hardware
parenta98c93341296b085085e1a875010455d1da5f513 (diff)
downloadnixpkgs-b893b67028c00760bd0a5586eaa3183660f89dc2.tar
nixpkgs-b893b67028c00760bd0a5586eaa3183660f89dc2.tar.gz
nixpkgs-b893b67028c00760bd0a5586eaa3183660f89dc2.tar.bz2
nixpkgs-b893b67028c00760bd0a5586eaa3183660f89dc2.tar.lz
nixpkgs-b893b67028c00760bd0a5586eaa3183660f89dc2.tar.xz
nixpkgs-b893b67028c00760bd0a5586eaa3183660f89dc2.tar.zst
nixpkgs-b893b67028c00760bd0a5586eaa3183660f89dc2.zip
nixos/throttled: Use `hardware.cpu.x86.msr`
Diffstat (limited to 'nixos/modules/services/hardware')
-rw-r--r--nixos/modules/services/hardware/throttled.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/nixos/modules/services/hardware/throttled.nix b/nixos/modules/services/hardware/throttled.nix
index afca24d976e..9fa49588611 100644
--- a/nixos/modules/services/hardware/throttled.nix
+++ b/nixos/modules/services/hardware/throttled.nix
@@ -29,8 +29,7 @@ in {
 
     # Kernel 5.9 spams warnings whenever userspace writes to CPU MSRs.
     # See https://github.com/erpalma/throttled/issues/215
-    boot.kernelParams =
-      optional (versionAtLeast config.boot.kernelPackages.kernel.version "5.9")
-      "msr.allow_writes=on";
+    hardware.cpu.x86.msr.settings.allow-writes =
+      mkIf (versionAtLeast config.boot.kernelPackages.kernel.version "5.9") "on";
   };
 }