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