mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
Move powersave configuration to the laptop hardware config
This commit is contained in:
parent
f20832f8e7
commit
fc79c0b5bd
4 changed files with 16 additions and 30 deletions
|
|
@ -9,7 +9,6 @@
|
|||
./auto-gc.nix
|
||||
./sops.nix
|
||||
./bluetooth.nix
|
||||
./optimization.nix
|
||||
./x-input.nix
|
||||
./de.nix
|
||||
./dm.nix
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.optimization.mode = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.myConfig.optimization.mode == "powersave") {
|
||||
services.auto-cpufreq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
charger = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
energy_performance_preference = "power";
|
||||
};
|
||||
battery = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
energy_performance_preference = "power";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue