diff --git a/flake.nix b/flake.nix index 343bfb6..97053c1 100644 --- a/flake.nix +++ b/flake.nix @@ -12,10 +12,12 @@ ]; mkSymlinkActivationScript = {target, source}: '' - if [ -e ${target} ]; then - rm -rf ${target} + if [ -e ${source} ]; then + if [ -e ${target} ]; then + rm -rf ${target} + fi + ln -s ${source} ${target} fi - ln -s ${source} ${target} ''; attrByStrPath = strPath: set: nixpkgs.lib.attrByPath (nixpkgs.lib.strings.splitString "." strPath) null set;