Improve clarity of the optimization option

This commit is contained in:
SebastianStork 2024-03-18 16:06:16 +01:00
parent ad3f4782dd
commit a3f4c3d6a6
3 changed files with 7 additions and 4 deletions

View file

@ -24,7 +24,7 @@
vpn.lgs.enable = true; vpn.lgs.enable = true;
comma.enable = true; comma.enable = true;
sops.enable = true; sops.enable = true;
auto-cpufreq.enable = true; optimization.mode = "powersave";
doas.enable = false; doas.enable = false;
nix-helper.enable = true; nix-helper.enable = true;
}; };

View file

@ -9,7 +9,7 @@
./auto-gc.nix ./auto-gc.nix
./sops.nix ./sops.nix
./bluetooth.nix ./bluetooth.nix
./auto-cpufreq.nix ./optimization.nix
./x-input.nix ./x-input.nix
./de.nix ./de.nix
./dm.nix ./dm.nix

View file

@ -3,9 +3,12 @@
lib, lib,
... ...
}: { }: {
options.myConfig.auto-cpufreq.enable = lib.mkEnableOption ""; options.myConfig.optimization.mode = lib.mkOption {
type = lib.types.str;
default = "";
};
config = lib.mkIf config.myConfig.auto-cpufreq.enable { config = lib.mkIf (config.myConfig.optimization.mode == "powersave") {
services.auto-cpufreq = { services.auto-cpufreq = {
enable = true; enable = true;
settings = { settings = {