stylix: split mkEnableTarget into mkEnableTargetWith

This commit is contained in:
Matt Sturgeon 2025-05-09 13:31:54 +01:00
parent 92276a14a7
commit a4d92fea87
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

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