2024-12-11 07:30:56 +03:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
2024-12-11 10:39:21 +03:00
|
|
|
# hardware.cpu.amd.ryzen-smu.enable = true;
|
2024-12-11 09:41:25 +03:00
|
|
|
|
2024-12-11 07:30:56 +03:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
# SRC: https://github.com/FlyGoat/RyzenAdj
|
|
|
|
# ./ryzenadj --stapm-limit=45000 --fast-limit=45000 --slow-limit=45000 --tctl-temp=90
|
|
|
|
# ryzenAdj --info
|
2024-12-11 09:35:06 +03:00
|
|
|
ryzenadj
|
2024-12-11 07:30:56 +03:00
|
|
|
|
|
|
|
# SRC: https://github.com/nbfc-linux/nbfc-linux
|
|
|
|
nbfc-linux
|
|
|
|
];
|
2024-12-11 10:39:21 +03:00
|
|
|
|
|
|
|
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
|
2024-12-12 03:41:28 +03:00
|
|
|
ryzenadj --tctl-temp=45
|
2024-12-11 10:39:21 +03:00
|
|
|
sleep 60
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
};
|
2024-12-11 07:30:56 +03:00
|
|
|
}
|