1# Flatpak {#module-services-flatpak} 2 3*Source:* {file}`modules/services/desktop/flatpak.nix` 4 5*Upstream documentation:* <https://github.com/flatpak/flatpak/wiki> 6 7Flatpak is a system for building, distributing, and running sandboxed desktop 8applications on Linux. 9 10To enable Flatpak, add the following to your {file}`configuration.nix`: 11``` 12 services.flatpak.enable = true; 13``` 14 15For the sandboxed apps to work correctly, desktop integration portals need to 16be installed. If you run GNOME, this will be handled automatically for you; 17in other cases, you will need to add something like the following to your 18{file}`configuration.nix`: 19``` 20 xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; 21``` 22 23Then, you will need to add a repository, for example, 24[Flathub](https://github.com/flatpak/flatpak/wiki), 25either using the following commands: 26```ShellSession 27$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo 28$ flatpak update 29``` 30or by opening the 31[repository file](https://flathub.org/repo/flathub.flatpakrepo) in GNOME Software. 32 33Finally, you can search and install programs: 34```ShellSession 35$ flatpak search bustle 36$ flatpak install flathub org.freedesktop.Bustle 37$ flatpak run org.freedesktop.Bustle 38``` 39Again, GNOME Software offers graphical interface for these tasks.