Using `home-manager`, too many things open in `chromium`

Hello,

I am using hyprland, and since a little while, everytime I click on a link from a desktop app (except a browser), chromium is the program that opens. Note that I have several browsers installed: librewolf, chromium, and torbrowser.

As far as I understand, the behaviour I experience is this is because of the following XDG setting:

$ xdg-mime query default x-scheme-handler/https
chromium-browser.desktop

In my ~/.nix-profile/share/applications/mimeinfo.cache are listed the different default applications to handle files of certain types.
In particular:

rg /https ~/.nix-profile/share/applications/mimeinfo.cache
347:x-scheme-handler/https=chromium-browser.desktop;librewolf.desktop;torbrowser.desktop;

Reading the rest of the file, it seems that the order in which programs are specified is always alphabetical. Thus, chromium is very often the first one in line for all types that it is able to open.

I would like to re-order these entries, to avoid that being the case.
What is filling this file? Is it some XDG tool (I can’t find HM code writing directly to it)? Could it even be some hyprland sheananigans?

It’s complicated, since the file you’re looking at is really an imperatively managed database (so that chrome can ask you if you’d like to make it your default browser).

home-manager does have settings to change what that file is seeded from, but random things might make additional changes (wine is particularly guilty of this): Appendix A. Home Manager Configuration Options