diff options
author | Lorenz Leutgeb <lorenz@leutgeb.xyz> | 2023-10-16 21:33:22 +0200 |
---|---|---|
committer | Lorenz Leutgeb <lorenz@leutgeb.xyz> | 2023-10-22 09:40:59 +0200 |
commit | b893b67028c00760bd0a5586eaa3183660f89dc2 (patch) | |
tree | 384229b5402399fd0c7845c0889b1d9783818e38 /nixos/modules/services/hardware | |
parent | a98c93341296b085085e1a875010455d1da5f513 (diff) | |
download | nixpkgs-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.nix | 5 |
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"; }; } |