fuji/home/zsh: recompile .zwc files when updating zsh

This commit is contained in:
2026-03-23 10:48:04 +01:00
parent 166aaaeef4
commit cf565b8949
2 changed files with 12 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
{ pkgs, lib, ... }: { pkgs, lib, config, ... }:
{ {
home.sessionVariables = { home.sessionVariables = {
/*ZDOTDIR = "\"$HOME/\".config/zsh";*/ /*ZDOTDIR = "\"$HOME/\".config/zsh";*/
@@ -117,4 +117,14 @@
fi 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
''
);
} }

View File

@@ -1,5 +1,6 @@
{ lib { lib
, pkgs , pkgs
, config
, ... , ...
}: }:
let let