diff --git a/modules/misc/xdg-user-dirs.nix b/modules/misc/xdg-user-dirs.nix index c9912812f..1198ea039 100644 --- a/modules/misc/xdg-user-dirs.nix +++ b/modules/misc/xdg-user-dirs.nix @@ -137,7 +137,8 @@ in { home.activation.createXdgUserDirectories = mkIf cfg.createDirectories (let directoriesList = attrValues directories; - mkdir = (dir: ''run mkdir -p $VERBOSE_ARG "${dir}"''); + mkdir = + (dir: ''[[ -L "${dir}" ]] || run mkdir -p $VERBOSE_ARG "${dir}"''); in lib.hm.dag.entryAfter [ "linkGeneration" ] (strings.concatMapStringsSep "\n" mkdir directoriesList)); };