Oh, I found out I was missing some configuration.
So first I need to install flatpak, like their docs say.
guix install flatpak
flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
Then to install apps, I need to run this. The --user flag is important.
flatpak install --user flathub com.logseq.Logseq
You also need to update XDG_DATA_HOME so that it includes Flatpak directories. There is a file Flatpak provides that can do this. The file is located at ~/.guix-profile/etc/profile.d/flatpak.sh. You need to run the commands in flatpak.sh. There’s a bunch of ways of doing this.
I decided to copy the contents of flatpak.sh into my ~/.bash_profile. Apparently, GDM (or GNOME?) reads this file when you’re logging in.
However, I didn’t copy flatpak.sh by hand. I used guix home of course. Here’s what my home.scm file looks like.
(use-modules (gnu home)
(gnu home services shells)
(guix gexp)
(gnu services))
(home-environment
(services
(list
(service home-bash-service-type
(home-bash-configuration
(bash-profile (list (local-file
(string-append (getenv "HOME") "/.guix-profile/etc/profile.d/flatpak.sh")
"flatpak.sh")))))
)))
Alternatively, you can extend ~/.profile, instead of using ~/.bash_profile.
(use-modules (gnu home)
(gnu home services shells)
(guix gexp)
(gnu services))
(home-environment
(services
(list
(simple-service 'flatpak-service
home-shell-profile-service-type
(list (local-file
(string-append (getenv "HOME") "/.guix-profile/etc/profile.d/flatpak.sh")
"flatpak.sh"))))))
Then I ran guix home reconfigure home.scm and rebooted my system just to be sure.
After all of that, the Flatpak apps now appear in GNOME’s app launcher! ![]()
The only thing left to address is running the GNOME Software Center GUI app… aaand this I’m not sure about. The original Flatpak link says:
Note: graphical installation of Flatpak apps may not be possible with GNU Guix.
So… maybe this isn’t possible now? I’m totally fine with using install --user to install apps.