Can't make xdg-mime default to Nautilus when kitty is installed

I’m using home-manager.

I have tried

xdg.mimeApps = {
  defaultApplications = {
    "inode/directory" = [ "nautilus.desktop" ];
  };
};

And

xdg.mimeApps = {
  associations.removed = {
    "inode/directory" = "kitty-open.desktop";
  };
};

In ~/.local/share/applications/mimeapps.list, the changes is reflected correctly but kitty-open always ordered first in ~/.nix-profile/share/applications/mimeinfo.cache which I’m assuming is why xdg-mime still defaults to kitty-open.

How do I solve this?

Related: After installing kitty "xdg-open ." opens directory in a new terminal · Issue #4850 · kovidgoyal/kitty · GitHub Though, their solution will not work since all files are read-only.

Ok, I’ve checked again and apparently nautilus.desktop is not a thing. I probably assumed the wrong name when I wrote the config ages ago. The actual file is org.gnome.Nautilus.desktop