1 # Flatpak {#module-services-flatpak}
3 *Source:* {file}`modules/services/desktop/flatpak.nix`
5 *Upstream documentation:* <https://github.com/flatpak/flatpak/wiki>
7 Flatpak is a system for building, distributing, and running sandboxed desktop
10 To enable Flatpak, add the following to your {file}`configuration.nix`:
13 services.flatpak.enable = true;
17 For the sandboxed apps to work correctly, desktop integration portals need to
18 be installed. If you run GNOME, this will be handled automatically for you;
19 in other cases, you will need to add something like the following to your
20 {file}`configuration.nix`:
23 xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
24 xdg.portal.config.common.default = "gtk";
28 Then, you will need to add a repository, for example,
29 [Flathub](https://github.com/flatpak/flatpak/wiki),
30 either using the following commands:
32 $ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
36 [repository file](https://flathub.org/repo/flathub.flatpakrepo) in GNOME Software.
38 Finally, you can search and install programs:
40 $ flatpak search bustle
41 $ flatpak install flathub org.freedesktop.Bustle
42 $ flatpak run org.freedesktop.Bustle
44 Again, GNOME Software offers graphical interface for these tasks.