programs/wezterm: update shell init config

This commit is contained in:
Gabriel Arazas 2023-06-24 10:26:56 +08:00
parent 7ea15ea9fa
commit d1b6376948
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

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