Personal Nix setup

Fix wezterm to zsh integration

Changed files
+11 -3
home
wezterm
+11 -3
home/wezterm/default.nix
···
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;
}