summary refs log tree commit diff
path: root/nixos/modules/services/desktops/flatpak.xml
blob: 6230a7b1fa04485d5f3db682471e3d7eccfb62d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="module-services-flatpak">
  <title>Flatpak</title>
  <para>
    <emphasis>Source:</emphasis>
    <filename>modules/services/desktop/flatpak.nix</filename>
  </para>
  <para>
    <emphasis>Upstream documentation:</emphasis>
    <link xlink:href="https://github.com/flatpak/flatpak/wiki">https://github.com/flatpak/flatpak/wiki</link>
  </para>
  <para>
    Flatpak is a system for building, distributing, and running
    sandboxed desktop applications on Linux.
  </para>
  <para>
    To enable Flatpak, add the following to your
    <filename>configuration.nix</filename>:
  </para>
  <programlisting>
  services.flatpak.enable = true;
</programlisting>
  <para>
    For the sandboxed apps to work correctly, desktop integration
    portals need to be installed. If you run GNOME, this will be handled
    automatically for you; in other cases, you will need to add
    something like the following to your
    <filename>configuration.nix</filename>:
  </para>
  <programlisting>
  xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
</programlisting>
  <para>
    Then, you will need to add a repository, for example,
    <link xlink:href="https://github.com/flatpak/flatpak/wiki">Flathub</link>,
    either using the following commands:
  </para>
  <programlisting>
$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
$ flatpak update
</programlisting>
  <para>
    or by opening the
    <link xlink:href="https://flathub.org/repo/flathub.flatpakrepo">repository
    file</link> in GNOME Software.
  </para>
  <para>
    Finally, you can search and install programs:
  </para>
  <programlisting>
$ flatpak search bustle
$ flatpak install flathub org.freedesktop.Bustle
$ flatpak run org.freedesktop.Bustle
</programlisting>
  <para>
    Again, GNOME Software offers graphical interface for these tasks.
  </para>
</chapter>