vuls: init at 0.27.0 (#348530)
[NixPkgs.git] / nixos / modules / services / desktops / flatpak.md
blob5299b32a03c7aa031d90272e92e02a09c8b084a0
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
8 applications on Linux.
10 To enable Flatpak, add the following to your {file}`configuration.nix`:
11 ```nix
13   services.flatpak.enable = true;
15 ```
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`:
21 ```nix
23   xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
24   xdg.portal.config.common.default = "gtk";
26 ```
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:
31 ```ShellSession
32 $ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
33 $ flatpak update
34 ```
35 or by opening the
36 [repository file](https://flathub.org/repo/flathub.flatpakrepo) in GNOME Software.
38 Finally, you can search and install programs:
39 ```ShellSession
40 $ flatpak search bustle
41 $ flatpak install flathub org.freedesktop.Bustle
42 $ flatpak run org.freedesktop.Bustle
43 ```
44 Again, GNOME Software offers graphical interface for these tasks.