11.stylix/modules/zed/hm.nix
awwpotato ae74f20cc2
zed: use themes option (#1151)
Use the programs.zed-editor.themes option, introduced in commit [1]
("zed-editor: add themes option (#6832)").

[1]: bb8d286649

Link: https://github.com/danth/stylix/pull/1151

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-04-21 22:28:41 +02:00

35 lines
917 B
Nix

{
config,
lib,
...
}:
{
options.stylix.targets.zed.enable = config.lib.stylix.mkEnableTarget "zed" true;
config =
lib.mkIf
(
config.stylix.enable
&& config.stylix.targets.zed.enable
&& config.programs.zed-editor.enable
)
{
programs.zed-editor = {
userSettings =
let
inherit (config.stylix) fonts;
in
{
"buffer_font_family" = fonts.monospace.name;
"buffer_font_size" = fonts.sizes.terminal * 4.0 / 3.0;
"theme" = "Base16 ${config.lib.stylix.colors.scheme-name}";
"ui_font_family" = fonts.sansSerif.name;
"ui_font_size" = fonts.sizes.applications * 4.0 / 3.0;
};
themes.stylix = config.lib.stylix.colors {
templateRepo = config.stylix.inputs.tinted-zed;
};
};
};
}