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

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

View file

@ -3,9 +3,12 @@
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 = {
enable = true;
settings = {