[niri] - recognize default apps (portals?)

I was using plasma 6, decided to try niri (without disabling plasma6). Just programs.niri.enable + add some programs that niri uses to systemPakages (like fuzzel, swaylock, etc), and run it in sddm. I was able to setup mako for notifications and xwayland-satellite for x11 apps with simple spawn-at-startup in niri’s config file.

However - when I try to open dolphin and open a file with it - not only it doesn’t recognize any default apps that I previously setup, but it doesn’t even list any program to pick. Also - I previously installed zen browser from flatpak (through Discover) - when I try to import passwords from file, it doesn’t open any file picker dialog (so just nothing happends).

I suspect it’s related to portals, but I’m not sure. On niri’s wiki there is a section about portals, but it says it should be enough to just have them installed and they will run on-demand. It mentions portal.conf - I have no idea how to find it. I tried to add kdePackages.xdg-desktop-portal-kde, xdg-desktop-portal-gtk and xdg-desktop-portal-gnome to systemPakages, and to xdg.portal.extraPortals - nothing seems to change.

Also - what pakage should I use to get some authentication agent? Wiki mentions plasma-polkit-agent - what pakage is that?

Have you already tried this?

  xdg.portal = {
    enable = true;
    xdgOpenUsePortal = true;
    extraPortals = [pkgs.xdg-desktop-portal-gtk];
    configPackages = [pkgs.xdg-desktop-portal-gtk];
    config.common.default = "gtk";
  };

That solved problem with zen. Also works with pkgs.kdePakages.xdg-desktop-portal-kde (that one enabled light theme in dolphin and zen for some reason).

But dolphin still don’t show any apps to open application.

its not exactly the ‘nixos’-way, but have you tried to right-click the file, open properties and set the default application there?

also i believe you could do that with pcmanfm, no idea how its with dolphin.

I found this topic and used this overlay.
I don’t really like this solution - it appears to rebuild the whole dolphin package, and it’s too much space in my configuration for a simple fix.
Maybe I’ll look for alternative file manager which doesn’t have this problem (so far I tried nautilus, which looks too bulky for niri and doesn’t automaticly mount my windows partition like dolphin does).