Apps installed with Nix only launch from the terminal

Hello,

I’m having an issue where applications installed with Nix (home-manager or nix-env) create a .desktop shortcut, but fail to launch from the gnome app launcher / dock.

Some applications, such as Obsidian.md, Gnome Secrets and Codium work as intended, but others like Geary, Fractal and Newsflash don’t launch.

I can still run these apps from the terminal, and find no issues with them. If I install the same apps with Flatpak or from the distro’s repos, they also work fine.

Launching apps from the terminal:

Here’s some system information:
(The issue applies on my desktop and laptop)

  • GNOME 46 / 43
  • Arch Linux / Debian Bookworm

Any help would be greatly appreciated.
Thank you.

Update:
I installed gnome-calendar from the Debian repository, and, as expected, the .desktop file is working correctly.
However, when adding gnome-calendar to home-manager, the GNOME menu entry stops working after a reboot.

Update 2:
After testing for a while, I discovered that after a reboot, the issue persists, however, if I log out and back in (using GDM), the Nix-installed apps are working as intended and are able to be ran through the gnome launcher.
After another reboot, the issue reappears.

Excuse me but I haven’t fully understood what the issue is? Do they not appear in your list of applications or do they appear but for some reason fail to launch?

When I install an APP using Nix, and then reboot, an icon for that app appears in the gnome launcher.
When I click on it, nothing happens, the APP does not launch.
However, if I log out and back into GNOME, the APP now works as intended.