From 5c6dba77f0f32d761bfa0da3f7e1a6181aebe5e8 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Sat, 20 Sep 2025 16:18:13 -0700 Subject: [PATCH] [doom] Fix doom sync behavior --- home/modules/emacs/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 ''; };