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 31, 2024
1 parent 63290ea commit 6be9577
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 1 deletion.
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
./wlogout.nix
./yazi.nix
./zathura.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."catppuccin-${cfg.flavour}" = 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;
wlogout.enable = true;
yazi.enable = true;
zathura.enable = true;
Expand Down
6 changes: 5 additions & 1 deletion 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"
},
"wlogout": {
"hash": "sha256-QUSDx5M+BG7YqI4MBsOKFPxvZHQtCa8ibT0Ln4FPQ7I=",
"rev": "b690cee13b944890e43a5fb629ccdff86cffbbb3"
Expand All @@ -183,4 +187,4 @@
"hash": "sha256-l6tztApzYpQ2/CiKuLBf8vI2imM6vPJuFdNDSEi7T/o=",
"rev": "7926c3d3e17d26b3779851a2255b95ee650bd928"
}
}
}
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 6be9577

Please sign in to comment.