pop-os / launcher

Modular IPC-based desktop launcher service
Mozilla Public License 2.0
228 stars 45 forks source link

feat(desktop-entries): Nix application paths support #74

Closed mmstick closed 2 years ago

mmstick commented 2 years ago

The Nix system path takes priority over the system path, but below Flatpak and Snap system paths, and the local nix path takes priority over all system paths, but below local Flatpak/Snap/.local paths.

To install nix in a multi-user capacity (system-wide):

sh <(curl -L https://nixos.org/nix/install) --daemon

Then you can install an application per-user and see it installed at ~/.nix-profile/share/applications.

nix-env -i firefox

To install system-wide, switch to root and do the same and you'll find it installed in /nix/var/nix/profiles/default/share/applications

sudo su
bash
nix-env -i firefox
jacobgkau commented 2 years ago

The Nix system path takes priority over the system path, but below Flatpak and Snap system paths, and the local nix path takes priority over all system paths, but below local Flatpak/Snap/.local paths.

After I installed Firefox with Nix, I still see the Flatpak option below it in search results (which seems correct), but I don't see the system-installed Firefox in the results anymore:

Screenshot from 2021-12-21 12-37-29

Is this expected? I would think either I should see all of the Firefox versions (which I'd prefer), or else only one.

mmstick commented 2 years ago

It is expected behavior because the Flatpak has a differing desktop ID from the debian and nix versions of it. The Flatpak uses org.mozilla.firefox and both the debian and nix versions use firefox.