diff --git a/home/common/zsh.nix b/home/common/zsh.nix index cdf130b..934ce8a 100644 --- a/home/common/zsh.nix +++ b/home/common/zsh.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ pkgs, lib, config, ... }: { home.sessionVariables = { /*ZDOTDIR = "\"$HOME/\".config/zsh";*/ @@ -117,4 +117,14 @@ fi ''; }; + + home.activation.zshRecompile = lib.mkIf config.programs.zsh.enable ( + lib.hm.dag.entryAfter [ "writeBoundary" ] '' + for f in "$HOME/.zshrc" "$HOME/.zshenv" "$HOME/.zprofile" "$HOME/.zlogin"; do + if [[ -f "$f" ]]; then + ${pkgs.zsh}/bin/zsh -c "zcompile $f" 2>/dev/null || true + fi + done + '' + ); } diff --git a/home/fuji/home.nix b/home/fuji/home.nix index 815fbaf..3eba3e0 100644 --- a/home/fuji/home.nix +++ b/home/fuji/home.nix @@ -1,5 +1,6 @@ { lib , pkgs +, config , ... }: let