mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 04:49:01 +02:00
nixos/flatpak: convert manual chapter to MD
This commit is contained in:
parent
453b2bed05
commit
8422592cf8
39
nixos/modules/services/desktops/flatpak.md
Normal file
39
nixos/modules/services/desktops/flatpak.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Flatpak {#module-services-flatpak}
|
||||
|
||||
*Source:* {file}`modules/services/desktop/flatpak.nix`
|
||||
|
||||
*Upstream documentation:* <https://github.com/flatpak/flatpak/wiki>
|
||||
|
||||
Flatpak is a system for building, distributing, and running sandboxed desktop
|
||||
applications on Linux.
|
||||
|
||||
To enable Flatpak, add the following to your {file}`configuration.nix`:
|
||||
```
|
||||
services.flatpak.enable = true;
|
||||
```
|
||||
|
||||
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
|
||||
{file}`configuration.nix`:
|
||||
```
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
```
|
||||
|
||||
Then, you will need to add a repository, for example,
|
||||
[Flathub](https://github.com/flatpak/flatpak/wiki),
|
||||
either using the following commands:
|
||||
```ShellSession
|
||||
$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
$ flatpak update
|
||||
```
|
||||
or by opening the
|
||||
[repository file](https://flathub.org/repo/flathub.flatpakrepo) in GNOME Software.
|
||||
|
||||
Finally, you can search and install programs:
|
||||
```ShellSession
|
||||
$ flatpak search bustle
|
||||
$ flatpak install flathub org.freedesktop.Bustle
|
||||
$ flatpak run org.freedesktop.Bustle
|
||||
```
|
||||
Again, GNOME Software offers graphical interface for these tasks.
|
|
@ -7,6 +7,8 @@ let
|
|||
cfg = config.services.flatpak;
|
||||
in {
|
||||
meta = {
|
||||
# Don't edit the docbook xml directly, edit the md and generate it:
|
||||
# `pandoc flatpak.md -t docbook --top-level-division=chapter --extract-media=media -f markdown+smart --lua-filter ../../../../doc/build-aux/pandoc-filters/myst-reader/roles.lua --lua-filter ../../../../doc/build-aux/pandoc-filters/docbook-writer/rst-roles.lua > flatpak.xml`
|
||||
doc = ./flatpak.xml;
|
||||
maintainers = pkgs.flatpak.meta.maintainers;
|
||||
};
|
||||
|
|
|
@ -1,56 +1,57 @@
|
|||
<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>
|
||||
<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" role="uri">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>
|
||||
<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>
|
||||
<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>
|
||||
<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:
|
||||
<screen>
|
||||
<prompt>$ </prompt>flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
<prompt>$ </prompt>flatpak update
|
||||
</screen>
|
||||
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:
|
||||
<screen>
|
||||
<prompt>$ </prompt>flatpak search bustle
|
||||
<prompt>$ </prompt>flatpak install flathub org.freedesktop.Bustle
|
||||
<prompt>$ </prompt>flatpak run org.freedesktop.Bustle
|
||||
</screen>
|
||||
Again, GNOME Software offers graphical interface for these tasks.
|
||||
</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:
|
||||
</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>
|
||||
|
|
Loading…
Reference in a new issue