From a4d92fea8771b608d1b4db27b9b13cb8f84e65f7 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Fri, 9 May 2025 13:31:54 +0100 Subject: [PATCH] stylix: split `mkEnableTarget` into `mkEnableTargetWith` --- stylix/target.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/stylix/target.nix b/stylix/target.nix index ffdb1441..9f521efc 100644 --- a/stylix/target.nix +++ b/stylix/target.nix @@ -38,9 +38,16 @@ in { mkEnableTarget = - humanName: autoEnable: + name: autoEnable: + config.lib.stylix.mkEnableTargetWith { inherit name autoEnable; }; + + mkEnableTargetWith = + { + name, + autoEnable ? true, + }: self.mkEnableIf { - description = "Whether to enable theming for ${humanName}."; + description = "Whether to enable theming for ${name}."; default = cfg.autoEnable && autoEnable; ${if autoEnable then "defaultText" else null} = lib.literalExpression "stylix.autoEnable";