mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-20 20:01:13 +00:00
cleanup
This commit is contained in:
parent
fc8675e1b0
commit
550fca2383
13 changed files with 151 additions and 163 deletions
29
home/migration.nix
Normal file
29
home/migration.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{lib, ...}: {
|
||||
# Transitional cleanup for files previously owned by ~/dots. Keeping this
|
||||
# separate from steady-state modules makes it obvious what can be deleted
|
||||
# once every managed path has been fully handed over to Home Manager.
|
||||
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.removeLegacyTmuxLink = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
|
||||
path="$HOME/.config/tmux/tmux.conf"
|
||||
if [ -L "$path" ]; then
|
||||
target="$(readlink "$path")"
|
||||
case "$target" in
|
||||
../../dots/tmux/*|dots/tmux/*|"$HOME"/dots/tmux/*)
|
||||
rm -f "$path"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue