11.stylix/modules/zed/hm.nix
Flameopathic 3fce9fb038
treewide: propagate inputs and remove templates (#926)
Closes: https://github.com/danth/stylix/issues/238
Link: https://github.com/danth/stylix/pull/926

Reviewed-by: Daniel Thwaites <danth@danth.me>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-03-09 15:46:36 +01:00

32 lines
872 B
Nix

{
config,
lib,
...
}:
let
theme = config.lib.stylix.colors {
templateRepo = config.stylix.inputs.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 * 4.0 / 3.0;
"theme" = "Base16 ${config.lib.stylix.colors.scheme-name}";
"ui_font_family" = config.stylix.fonts.sansSerif.name;
"ui_font_size" = config.stylix.fonts.sizes.applications * 4.0 / 3.0;
};
xdg.configFile."zed/themes/nix.json".source = theme;
};
}