mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
nixos/flatpak: add docs
This commit is contained in:
parent
21ff482f7d
commit
d614f32e7a
2 changed files with 58 additions and 0 deletions
|
@ -6,6 +6,11 @@ with lib;
|
|||
let
|
||||
cfg = config.services.flatpak;
|
||||
in {
|
||||
meta = {
|
||||
doc = ./flatpak.xml;
|
||||
maintainers = pkgs.flatpak.meta.maintainers;
|
||||
};
|
||||
|
||||
###### interface
|
||||
options = {
|
||||
services.flatpak = {
|
||||
|
|
53
nixos/modules/services/desktops/flatpak.xml
Normal file
53
nixos/modules/services/desktops/flatpak.xml
Normal file
|
@ -0,0 +1,53 @@
|
|||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
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"/></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>:
|
||||
|
||||
<programlisting>
|
||||
<xref linkend="opt-services.flatpak.enable"/> = true;
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<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>:
|
||||
|
||||
<programlisting>
|
||||
<xref linkend="opt-services.flatpak.extraPortals"/> = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<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:
|
||||
|
||||
<programlisting>
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak update
|
||||
</programlisting>
|
||||
|
||||
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:
|
||||
|
||||
<programlisting>
|
||||
flatpak search bustle
|
||||
flatpak install flathub org.freedesktop.Bustle
|
||||
flatpak run org.freedesktop.Bustle
|
||||
</programlisting>
|
||||
|
||||
Again, GNOME Software offers graphical interface for these tasks.
|
||||
</para>
|
||||
</chapter>
|
Loading…
Reference in a new issue