How do I get Guix to have flatpak application show up in the applications menu whenever I install a flatpak application?

I have to edit the config.scm file in order to achieve this, correct?

I’m using approach I saw at aurtzy/uix-config repo - having whole flatpak as a service.

That way I install flatpak apps only through guix (home), so I’m doing reconfigure anyway.

You can see usage at my systems/kocour.scm - but I’m just beginning with Guix, so probably not best one to follow with advices :slight_smile:

1 Like

You need to make sure your XDG_DATA_DIRS env var is set correctly to include $HOME/.local/share/flatpak/exports/share.

There should be a script .guix-home/profile/etc/profile.d/flatpak.sh that does this for you.

2 Likes

Is .guix-home the same as /gnu/store/XXX-flatpak-version?

I’ve got two versions. How do I get rid of the older one?

Do I need to run this script with sh flatpak.sh?

[edit #1]

Answering my first two questions (with help from trev and others on Libera IRC)

  1. ~/.guix-home
  2. Since I don’t have to look into /gnu/store/.. this no longer applies.

[edit #2]

I can set this in ~/.bash_profile but I’m not sure if this will help:

export XDG_DATA_DIRS=$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share

Doesn’t this run while opening a terminal, while I want this to be run during display manager startup?

[edit #3]

Alright, I think I’ve got it. From the guix manual and looking up what plain-file and local-file means I added this to /etc/config.scm services:

(simple-service 'flatpak-service etc-profile-d-service-type
                (list (local-file "flatpak.sh")))

I have not been able to test this though. I’m receiving an unrelated error during testing that will need a separate thread.