11.stylix/modules/zed/hm.nix
Floryan Simar b47ef3b856
zed: init (#620)
Closes: https://github.com/danth/stylix/issues/348
Link: https://github.com/danth/stylix/pull/620

Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-01-06 16:21:27 +01:00

32 lines
855 B
Nix

{
config,
lib,
...
}:
let
theme = config.lib.stylix.colors {
templateRepo = config.lib.stylix.templates.tinted-zed;
};
in
{
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 = {
"buffer_font_family" = config.stylix.fonts.monospace.name;
"buffer_font_size" = config.stylix.fonts.sizes.terminal;
"theme" = "Base16 ${config.lib.stylix.colors.scheme-name}";
"ui_font_family" = config.stylix.fonts.sansSerif.name;
"ui_font_size" = config.stylix.fonts.sizes.applications;
};
xdg.configFile."zed/themes/nix.json".source = theme;
};
}