Skip to content

Commit

Permalink
feat(home-manager): add support for wezterm
Browse files Browse the repository at this point in the history
  • Loading branch information
taranarmo committed Dec 30, 2024
1 parent c56711a commit 9512a18
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/home-manager/all-modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
./tofi.nix
./obs.nix
./waybar.nix
./wezterm.nix
./yazi.nix
./zathura.nix
./zed-editor.nix
Expand Down
26 changes: 26 additions & 0 deletions modules/home-manager/wezterm.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ catppuccinLib }:
{ config, lib, ... }:

let
inherit (config.catppuccin) sources;
cfg = config.catppuccin.wezterm;
in

{
options.catppuccin.wezterm = catppuccinLib.mkCatppuccinOption { name = "wezterm"; };


config = lib.mkIf cfg.enable {
programs.wezterm = {
colorSchemes = lib.importTOML "${sources.wezterm}/dist/catppuccin-${cfg.flavor}.toml";
extraConfig = lib.mkBefore ''
local config = {}
if wezterm.c_builder then
config = wezterm.config_builder()
end
dofile("${sources.wezterm}/plugin/init.lua").apply_to_config(config)
'';
};
};
}
1 change: 1 addition & 0 deletions modules/tests/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
tofi.enable = true;
obs-studio.enable = true;
waybar.enable = true;
wezterm.enable = true;
yazi.enable = true;
zathura.enable = true;
zed-editor.enable = true;
Expand Down
4 changes: 4 additions & 0 deletions pkgs/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@
"hash": "sha256-za0y6hcN2rvN6Xjf31xLRe4PP0YyHu2i454ZPjr+lWA=",
"rev": "ee8ed32b4f63e9c417249c109818dcc05a2e25da"
},
"wezterm": {
"hash": "sha256-McSWoZaJeK+oqdK/0vjiRxZGuLBpEB10Zg4+7p5dIGY=",
"rev": "b1a81bae74d66eaae16457f2d8f151b5bd4fe5da"
},
"yazi": {
"hash": "sha256-UVcPdQFwgBxR6n3/1zRd9ZEkYADkB5nkuom5SxzPTzk=",
"rev": "5d3a1eecc304524e995fe5b936b8e25f014953e8"
Expand Down
7 changes: 7 additions & 0 deletions pkgs/wezterm/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{ buildCatppuccinPort }:

buildCatppuccinPort {
pname = "wezterm";

installTargets = [ "dist" "plugin" ];
}

0 comments on commit 9512a18

Please sign in to comment.