diff --git a/host/x86_64-linux/max/Power.nix b/host/x86_64-linux/max/Power.nix index caead875..8ffb9034 100644 --- a/host/x86_64-linux/max/Power.nix +++ b/host/x86_64-linux/max/Power.nix @@ -2,7 +2,7 @@ pkgs, ... }: { - hardware.cpu.amd.ryzen-smu.enable = true; + # hardware.cpu.amd.ryzen-smu.enable = true; environment.systemPackages = with pkgs; [ # SRC: https://github.com/FlyGoat/RyzenAdj @@ -13,4 +13,21 @@ # SRC: https://github.com/nbfc-linux/nbfc-linux nbfc-linux ]; + + systemd.services.radj = { + enable = true; + description = "Ryzen Adj temperature limiter."; + serviceConfig.Type = "simple"; + wantedBy = [ "multi-user.target" ]; + path = with pkgs; [ + coreutils + ryzenadj + ]; + script = '' + while true; do + ryzenadj --tctl-temp=50 + sleep 60 + done + ''; + }; }