› XDG_UTILS_DEBUG_LEVEL=2 xdg-mime query default application/pdf
Checking /home/tilli/.config/mimeapps.list
Checking /home/tilli/.local/share/applications/mimeapps.list
Checking /home/tilli/.local/share/applications/defaults.list and /home/tilli/.local/share/applications/mimeinfo.cache
Checking /home/tilli/.local/share/applications/defaults.list and /home/tilli/.local/share/applications/mimeinfo.cache
Checking /nix/store/gwy6kafcc59irnc07j5i5agpb2bfv81x-sway-1.9/share/applications/defaults.list and /nix/store/gwy6kafcc59irnc07j5i5agpb2bfv81x-sway-1.9/share/applications/mimeinfo.cache
Checking /nix/store/gwy6kafcc59irnc07j5i5agpb2bfv81x-sway-1.9/share/applications/defaults.list and /nix/store/gwy6kafcc59irnc07j5i5agpb2bfv81x-sway-1.9/share/applications/mimeinfo.cache
Checking /nix/store/4qvv1l5jirm3351784kb5j8krsqql1si-gsettings-desktop-schemas-46.0/share/gsettings-schemas/gsettings-desktop-schemas-46.0/applications/defaults.list and /nix/store/4qvv1l5jirm3351784kb5j8krsqql1si-gsettings-desktop-schemas-46.0/share/gsettings-schemas/gsettings-desktop-schemas-46.0/applications/mimeinfo.cache
Checking /nix/store/4qvv1l5jirm3351784kb5j8krsqql1si-gsettings-desktop-schemas-46.0/share/gsettings-schemas/gsettings-desktop-schemas-46.0/applications/defaults.list and /nix/store/4qvv1l5jirm3351784kb5j8krsqql1si-gsettings-desktop-schemas-46.0/share/gsettings-schemas/gsettings-desktop-schemas-46.0/applications/mimeinfo.cache
Checking /nix/store/nx27cp48ylj2bmrf1r72ncl3pcq7w5df-gtk+3-3.24.41/share/gsettings-schemas/gtk+3-3.24.41/applications/defaults.list and /nix/store/nx27cp48ylj2bmrf1r72ncl3pcq7w5df-gtk+3-3.24.41/share/gsettings-schemas/gtk+3-3.24.41/applications/mimeinfo.cache
Checking /nix/store/nx27cp48ylj2bmrf1r72ncl3pcq7w5df-gtk+3-3.24.41/share/gsettings-schemas/gtk+3-3.24.41/applications/defaults.list and /nix/store/nx27cp48ylj2bmrf1r72ncl3pcq7w5df-gtk+3-3.24.41/share/gsettings-schemas/gtk+3-3.24.41/applications/mimeinfo.cache
Checking /nix/store/3bwmjk2pai9yn6jykgg4lxxc70kpykxw-desktops/share/applications/defaults.list and /nix/store/3bwmjk2pai9yn6jykgg4lxxc70kpykxw-desktops/share/applications/mimeinfo.cache
Checking /nix/store/3bwmjk2pai9yn6jykgg4lxxc70kpykxw-desktops/share/applications/defaults.list and /nix/store/3bwmjk2pai9yn6jykgg4lxxc70kpykxw-desktops/share/applications/mimeinfo.cache
Checking /home/tilli/.local/share/flatpak/exports/share/applications/defaults.list and /home/tilli/.local/share/flatpak/exports/share/applications/mimeinfo.cache
Checking /home/tilli/.local/share/flatpak/exports/share/applications/defaults.list and /home/tilli/.local/share/flatpak/exports/share/applications/mimeinfo.cache
Checking /var/lib/flatpak/exports/share/applications/defaults.list and /var/lib/flatpak/exports/share/applications/mimeinfo.cache
Checking /var/lib/flatpak/exports/share/applications/defaults.list and /var/lib/flatpak/exports/share/applications/mimeinfo.cache
Checking /home/tilli/.nix-profile/share/applications/defaults.list and /home/tilli/.nix-profile/share/applications/mimeinfo.cache
Checking /home/tilli/.nix-profile/share/applications/defaults.list and /home/tilli/.nix-profile/share/applications/mimeinfo.cache
Checking /nix/profile/share/applications/defaults.list and /nix/profile/share/applications/mimeinfo.cache
Checking /nix/profile/share/applications/defaults.list and /nix/profile/share/applications/mimeinfo.cache
Checking /home/tilli/.local/state/nix/profile/share/applications/defaults.list and /home/tilli/.local/state/nix/profile/share/applications/mimeinfo.cache
Checking /home/tilli/.local/state/nix/profile/share/applications/defaults.list and /home/tilli/.local/state/nix/profile/share/applications/mimeinfo.cache
Checking /etc/profiles/per-user/tilli/share/applications/defaults.list and /etc/profiles/per-user/tilli/share/applications/mimeinfo.cache
chromium-browser.desktop
The definitions in /home/tilli/.config/mimeapps.list look just right. What the eff is still causing this?
I suffer with the same problem. For whatever reason xdg-open checks many different files and only one of them has wrong values. Only this file is used it seems. Since it is located in /etc directory it is read only and thus I can’t do anything about it. Rebuilding multiple times simply does not work.
The first to files are symlinks to the file mimeapps file generated by home-manager where image/png=nomacs.desktop is defined, so these are okay.
But the kde-mimeapps.list file has the KDE default values and is a symlink to /nix/store/jcsasyx5jnjiappxnygq2hqgvk9rbgsq-plasma-desktop-6.0.5/share/applications/kde-mimeapps.list. Furthermore, I cannot change the default app using the KDE settings, probably because it also wants to change a file in the nix store.