diff --git a/modules/nixos/programs/wezterm.nix b/modules/nixos/programs/wezterm.nix index 58b589b9..42d63e0d 100644 --- a/modules/nixos/programs/wezterm.nix +++ b/modules/nixos/programs/wezterm.nix @@ -2,6 +2,11 @@ let cfg = config.programs.wezterm; + + shellIntegration = '' + source ${pkgs.bash-preexec}/share/bash/bash-preexec.sh + source ${cfg.package}/etc/profile.d/wezterm.sh + ''; in { options.programs.wezterm = { @@ -17,8 +22,7 @@ in environment.systemPackages = [ cfg.package ]; # This is needed for shell integration and applying semantic zones. - environment.interactiveShellInit = '' - . ${cfg.package}/etc/profile.d/wezterm.sh - ''; + programs.bash.interactiveShellInit = lib.mkIf config.programs.bash.enable shellIntegration; + programs.zsh.interactiveShellInit = lib.mkIf config.programs.zsh.enable shellIntegration; }; }