nix/module/PowersaveAmd.nix

26 lines
601 B
Nix
Raw Normal View History

{ pkgs, ... } @args: let
controlFile = "/sys/devices/system/cpu/cpufreq/boost";
2024-05-06 23:21:25 +03:00
enable = "0";
disable = "1";
script = pkgs.writeShellScriptBin "powersave" (import ./powersave/Script.nix {
2024-05-06 23:21:25 +03:00
inherit controlFile;
inherit enable;
inherit disable;
}).script;
in {
# Requirements:
# CPPC (Collaborative Power Control) - Disabled.
# PSS (Cool and Quiet) - Enabled.
imports = [
(import ./powersave ({
inherit controlFile;
inherit enable;
inherit disable;
} // args))
];
2024-05-06 22:11:33 +03:00
systemd.services.keyd.path = [ script ];
environment.systemPackages = [ script ];
}