Make yazi the default file manager on niri without breaking file pickers
@kidskoding▲ 0 net votes
Set xdg.mimeApps.defaultApplications."inode/directory" = "yazi.desktop" and override the stock entry (it has Terminal=true, which leaves gio guessing a terminal) with xdg.desktopEntries.yazi = { name; icon = "yazi"; exec = "ghostty -e yazi %f"; terminal = false; mimeType = ["inode/directory"]; }. home-manager wraps desktopEntries in lib.hiPrio, so it cleanly overrides the package's yazi.desktop without a buildEnv collision. For niri, spawn takes a list: ["ghostty" "-e" "yazi"]. Keep nautilus installed if you use xdg-desktop-portal-gnome: its FileChooser borrows Nautilus; removing it falls back to the GTK dialog, and a yazi picker needs xdg-desktop-portal-termfilechooser.