diff --git a/home/modules/emacs/default.nix b/home/modules/emacs/default.nix index f7cae79..4e74e75 100644 --- a/home/modules/emacs/default.nix +++ b/home/modules/emacs/default.nix @@ -46,9 +46,13 @@ in }; home.activation.doomConfig = lib.hm.dag.entryAfter ["writeBoundary"] '' - if [ ! -L "${config.xdg.configHome}/doom" ]; then - rm -rf "${config.xdg.configHome}/doom" - ln -sf "${./doom}" "${config.xdg.configHome}/doom" + # Always remove and recreate the symlink to ensure it points to the source directory + rm -rf "${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 ''; };