This commit is contained in:
Harivansh Rathi 2026-03-13 12:49:57 -04:00
parent 32f8cc2a28
commit f01ee2d84b
6 changed files with 58 additions and 9 deletions

View file

@ -4,6 +4,19 @@
pkgs,
...
}: {
home.activation.removeLegacyZshLinks = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
for path in "$HOME/.zshenv" "$HOME/.zshrc"; do
if [ -L "$path" ]; then
target="$(readlink "$path")"
case "$target" in
dots/zsh/*|"$HOME"/dots/zsh/*)
rm -f "$path"
;;
esac
fi
done
'';
home.activation.ensureOhMyZshCache = lib.hm.dag.entryAfter ["writeBoundary"] ''
mkdir -p "${config.xdg.cacheHome}/oh-my-zsh"
'';