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>
This commit is contained in:
awwpotato 2025-04-21 13:28:41 -07:00 committed by GitHub
parent 039e938b29
commit ae74f20cc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 16 deletions

6
flake.lock generated
View file

@ -224,11 +224,11 @@
]
},
"locked": {
"lastModified": 1744637364,
"narHash": "sha256-ZVINTNMJS6W3fqPYV549DSmjYQW5I9ceKBl83FwPP7k=",
"lastModified": 1745198506,
"narHash": "sha256-0hVbHuqAnZUnnGaBTqNes0P0kfH+KKyup2boWDST0iI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "337541447773985f825512afd0f9821a975186be",
"rev": "b0cc092405da805da6fa964f5a178343658ceaf0",
"type": "github"
},
"original": {

View file

@ -14,20 +14,22 @@
&& 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;
};
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;
};
xdg.configFile."zed/themes/nix.json".source = config.lib.stylix.colors {
templateRepo = config.stylix.inputs.tinted-zed;
themes.stylix = config.lib.stylix.colors {
templateRepo = config.stylix.inputs.tinted-zed;
};
};
};
}