fuji/home/zsh: recompile .zwc files when updating zsh
This commit is contained in:
@@ -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
|
||||
''
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user