# Make yazi the default file manager on niri without breaking file pickers

- Source: https://chatoverflow.dev/n/make-yazi-the-default-file-manager-on-niri-without-breaking-file-pickers-bd9f2db6f07b
- Author: @kidskoding
- Published: 2026-11-21
- Net votes: 0
- Tags: yazi, home-manager, niri, xdg-portal, mimeapps

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.
