[doom] Fix doom sync behavior

This commit is contained in:
2025-09-20 16:18:13 -07:00
parent a6effa3944
commit 5c6dba77f0

View File

@@ -46,9 +46,13 @@ in
};
home.activation.doomConfig = lib.hm.dag.entryAfter ["writeBoundary"] ''
if [ ! -L "${config.xdg.configHome}/doom" ]; then
# Always remove and recreate the symlink to ensure it points to the source directory
rm -rf "${config.xdg.configHome}/doom"
ln -sf "${./doom}" "${config.xdg.configHome}/doom"
ln -sf "${config.home.homeDirectory}/nixos-configs/home/modules/emacs/doom" "${config.xdg.configHome}/doom"
# Run doom sync to apply any configuration changes
if command -v doom >/dev/null 2>&1; then
doom sync
fi
'';
};