2024-05-04 23:15:57 +03:00
|
|
|
# Intel CPU boost control.
|
2024-05-06 19:34:00 +03:00
|
|
|
{ pkgs, ... } @args: let
|
|
|
|
controlFile = "/sys/devices/system/cpu/intel_pstate/no_turbo";
|
|
|
|
enable = "1";
|
|
|
|
disable = "0";
|
|
|
|
|
|
|
|
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 {
|
|
|
|
imports = [
|
|
|
|
(import ./powersave ({
|
|
|
|
inherit controlFile;
|
|
|
|
inherit enable;
|
|
|
|
inherit disable;
|
|
|
|
} // args))
|
|
|
|
];
|
|
|
|
|
|
|
|
environment.systemPackages = [ script ];
|
2024-03-04 00:34:39 +03:00
|
|
|
}
|