stylix: set defaultText in font size options

This commit is contained in:
Matt Sturgeon 2025-06-13 10:17:16 +01:00 committed by awwpotato
parent ab2f48fc3a
commit 84f02caad3

View file

@ -58,7 +58,12 @@ in
mkFontSizeOption =
{ default, target }:
lib.mkOption {
inherit default;
default = if builtins.isInt default then default else cfg.sizes.${default};
defaultText =
if builtins.isInt default then
default
else
lib.literalExpression "config.stylix.fonts.sizes.${default}";
description = ''
The font size used for ${target}.
@ -94,12 +99,12 @@ in
terminal = mkFontSizeOption {
target = "terminals and text editors";
default = cfg.sizes.applications;
default = "applications";
};
popups = mkFontSizeOption {
target = "notifications, popups, and other overlay elements of the desktop";
default = cfg.sizes.desktop;
default = "desktop";
};
};