about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--hm/soispha/files/manifest_json/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/hm/soispha/files/manifest_json/default.nix b/hm/soispha/files/manifest_json/default.nix
index abc2e065..af8d85d2 100644
--- a/hm/soispha/files/manifest_json/default.nix
+++ b/hm/soispha/files/manifest_json/default.nix
@@ -7,7 +7,10 @@
     activation = {
       addManifestJson =
         lib.hm.dag.entryAfter ["writeBoundary"]
-        ''$DRY_RUN_CMD ln -s $VERBOSE_ARG "${./profile}" "${config.xdg.stateHome}/nix/profiles/"'';
+        ''
+          [ -L "${config.xdg.stateHome}/nix/profiles/profile" ] && $DRY_RUN_CMD rm $VERBOSE_ARG "${config.xdg.stateHome}/nix/profiles/profile"
+          $DRY_RUN_CMD ln -s $DRY_RUN_CMD "${./profile}" "${config.xdg.stateHome}/nix/profiles/profile"
+        '';
     };
   };
 }