From c23775319c4d5f7023eb8e35cbbd3c8df746d3b3 Mon Sep 17 00:00:00 2001 From: fleaz Date: Fri, 1 Dec 2023 16:44:14 +0100 Subject: [PATCH] modules/tlp: Make optional via custom options --- customOptions.nix | 6 ++++++ modules/tlp.nix | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) 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";