Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Dec 21, 2021
Merged

Conversation

mmstick
Copy link
Member

@mmstick mmstick commented Dec 20, 2021

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

@mmstick mmstick requested review from a team December 20, 2021 16:10
@jacobgkau
Copy link
Member

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
Copy link
Member Author

mmstick commented Dec 21, 2021

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.

Copy link
Member

@jacobgkau jacobgkau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working as expected. I see Nix and Nix (System) entries in the launcher, with local Nix entries overriding Nix (System) entries, similar to Flatpak.

Launcher regression testing passed on 21.10 and 20.04.

@jackpot51 jackpot51 merged commit 8eb3104 into master Dec 21, 2021
@jackpot51 jackpot51 deleted the nix branch December 21, 2021 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants