Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zed: added zed hm module #620

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
url = "github:tinted-theming/tinted-foot/fd1b924b6c45c3e4465e8a849e67ea82933fcbe4";
};

tinted-zed = {
flake = false;
url = "github:tinted-theming/base16-zed";
};

tinted-tmux = {
flake = false;
url = "github:tinted-theming/tinted-tmux";
Expand Down
24 changes: 24 additions & 0 deletions modules/zed/hm.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
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 = {
"theme" = "Base16 ${config.lib.stylix.colors.scheme-name}";

"ui_font_family" = config.stylix.fonts.sansSerif.name;
"ui_font_size" = config.stylix.fonts.sizes.applications;
"buffer_font_family" = config.stylix.fonts.monospace.name;
"buffer_font_size" = config.stylix.fonts.sizes.terminal;
};

xdg.configFile."zed/themes/nix.json".source = theme;
};
}
1 change: 1 addition & 0 deletions stylix/templates.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ inputs:
tinted-foot
tinted-kitty
tinted-tmux
tinted-zed
;
};
}
Loading