diff --git a/customOptions.nix b/customOptions.nix index f700842..9e8f259 100644 --- a/customOptions.nix +++ b/customOptions.nix @@ -5,4 +5,10 @@ options.my.highDPI = lib.mkOption { default = true; type = lib.types.bool; }; + +options.my.includeTLP = lib.mkOption { + description = "If the device should get TLP"; + default = true; + type = lib.types.bool; + }; } diff --git a/modules/tlp.nix b/modules/tlp.nix index a91aa82..a2ebd57 100644 --- a/modules/tlp.nix +++ b/modules/tlp.nix @@ -1,5 +1,6 @@ +{lib, config, ...}: { - services.tlp = { + services.tlp = lib.mkIf config.my.includeTLP { enable = true; settings = { TLP_DEFAULT_MODE = "AC";