lol

nixos/flatpak: convert manual chapter to MD

pennae 8422592c 453b2bed

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