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";