diff --git a/home/wezterm/default.nix b/home/wezterm/default.nix index 0b4f65c..300f3b8 100644 --- a/home/wezterm/default.nix +++ b/home/wezterm/default.nix @@ -2,13 +2,21 @@ let inherit (import ../../lib/colors.nix inputs) colors mkLuaSyntax; -in { - home.packages = [ pkgs.wezterm ]; - xdg.configFile."wezterm/wezterm.lua".text = '' + pkg = pkgs.wezterm; + + configStr = '' local font_size = ${if helpers.isDarwin then "14" else "12"}; local is_linux = ${if helpers.isLinux then "true" else "false"}; local zsh_bin = "${pkgs.zsh}/bin/zsh"; local colors = ${mkLuaSyntax colors}; '' + (builtins.readFile ./init.lua); + + shellIntegrationStr = '' + source "${pkg}/etc/profile.d/wezterm.sh" + ''; +in { + home.packages = [pkg]; + xdg.configFile."wezterm/wezterm.lua".text = configStr; + programs.zsh.initExtra = shellIntegrationStr; }