From e046b8878ea226c74b1bb39b883971b3da3899ff Mon Sep 17 00:00:00 2001 From: materus Date: Sun, 31 Mar 2024 20:01:34 +0200 Subject: [PATCH] home-profile: prepare for wezterm --- .../host/Old-materusPC/home/materus/default.nix | 2 +- configurations/profile/home/shell/zsh.nix | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/configurations/host/Old-materusPC/home/materus/default.nix b/configurations/host/Old-materusPC/home/materus/default.nix index 6241ad9..de89f4d 100644 --- a/configurations/host/Old-materusPC/home/materus/default.nix +++ b/configurations/host/Old-materusPC/home/materus/default.nix @@ -2,7 +2,7 @@ { home.stateVersion = "22.11"; home.homeDirectory = "/home/materus"; - + programs.wezterm.enable = true; programs.git = { userEmail = "materus@podkos.pl"; userName = "materus"; diff --git a/configurations/profile/home/shell/zsh.nix b/configurations/profile/home/shell/zsh.nix index 395659a..b7c806b 100644 --- a/configurations/profile/home/shell/zsh.nix +++ b/configurations/profile/home/shell/zsh.nix @@ -18,7 +18,7 @@ let if [ ''$${var} = "${val}" ]; then ${ret} fi - ''; + ''; @@ -58,7 +58,12 @@ in pkgs.ripgrep ]; - home.file = builtins.foldl' (a: b: a // b) { } (builtins.map (plugin: { ${plugin.path}.source = plugin.src; }) (builtins.attrValues extraPlugins)); + home.file = lib.mkMerge [ + (builtins.foldl' (a: b: a // b) { } (builtins.map (plugin: { ${plugin.path}.source = plugin.src; }) (builtins.attrValues extraPlugins))) + { "${relToDotDir ".zshrc"}".text = lib.mkAfter '' + ${lib.optionalString config.programs.wezterm.enable "source \"${config.programs.wezterm.package}/etc/profile.d/wezterm.sh\""} + ''; } + ]; programs.zsh = { enable = true; @@ -158,7 +163,7 @@ in ${lib.optionalString config.programs.zsh.history.share "unsetopt SHARE_HISTORY"} alias -- 'zsh'="__MATERUS_HM_ZSH_PRIVATE=0 zsh " '' - + ; };