Next: (heks-linux packages zypper), Previous: (heks-linux niri), Up: API
The Flatpak application catalog, grouped by the part of the desktop it serves.
An application is declared with flatpak-app: the id that Flathub
uses (the reverse-DNS name, also the desktop file and the sandbox name)
and the remote it comes from. The remote defaults to
flatpak-remote, which is Flathub, so the ordinary entry is just
(flatpak-app "org.gnome.Boxes"); the second argument is there for
the day an application only exists on a beta or vendor remote. Declaring
the remote instead of smuggling it into the id as a string is what lets
the installer add the remote itself, check that the id is actually an
id, and build an argument vector rather than a shell line.
flatpak-remotes maps a remote name to the .flatpakrepo
file that describes it. install-flatpak adds every remote used
by the catalog that is not already configured, with flatpak
remote-add --user --if-not-exists, so a fresh machine does not have to
be bootstrapped by hand. The check looks at every installation, not
only the user one: adding a second flathub remote when the system
installation already has one makes flatpak ambiguous.
The category lists are parameters, so a machine can replace one without
forking the module. install-flatpak reads
$XDG_CONFIG_HOME/heks-linux/flatpak-settings.scm first, which is
where those parameters are set. heks-linux-flatpak is a
procedure rather than a list because it has to observe them: it prepends
heks-linux-extra-flatpak to the categories, drops duplicate ids
and sorts the result, so the order of the groups never matters and two
categories can share an application without installing it twice. The
extras come first on purpose: redeclaring an id there wins, which is how
a machine can move an application to a beta remote without editing the
catalog.
The catalog leans on well-known applications for jobs the rest of Heks
does not cover: an office suite, a password manager, a backup tool, a
torrent client, a remote-desktop client, digital painting, and the
Flatpak manager itself. Everything is installed with flatpak
install --user, in the user installation, the same way the rest of the
Heks applications are.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Default value:
"flathub"
Default value:
(("flathub" . "https://dl.flathub.org/repo/flathub.flatpakrepo") ("flathub-beta" . "https://dl.flathub.org/beta-repo/flathub-beta.flatpakrepo"))
Default value:
(#<<flatpak-app> id: "ai.lmstudio.lm-studio" remote: "flathub"> #<<flatpak-app> id: "com.bardojai.ForgeSparks" remote: "flathub"> #<<flatpak-app> id: "com.github.finefindus.eyedropper" remote: "flathub"> #<<flatpak-app> id: "com.rafaelmardojai.WebfontKitGenerator" remote: "flathub"> #<<flatpak-app> id: "io.github.fizzyizzy05.binary" remote: "flathub"> #<<flatpak-app> id: "io.gitlab.liferooter.TextPieces" remote: "flathub"> #<<flatpak-app> id: "org.gaphor.Gaphor" remote: "flathub"> #<<flatpak-app> id: "org.gnome.Boxes" remote: "flathub"> #<<flatpak-app> id: "org.gnome.design.Emblem" remote: "flathub"> #<<flatpak-app> id: "org.gnome.design.Lorem" remote: "flathub"> #<<flatpak-app> id: "re.sonny.Workbench" remote: "flathub"> #<<flatpak-app> id: "se.sjoerd.Graphs" remote: "flathub">)
Default value:
()
Default value:
(#<<flatpak-app> id: "com.valvesoftware.Steam" remote: "flathub"> #<<flatpak-app> id: "net.retrodeck.retrodeck" remote: "flathub"> #<<flatpak-app> id: "org.libretro.RetroArch" remote: "flathub"> #<<flatpak-app> id: "org.prismlauncher.PrismLauncher" remote: "flathub"> #<<flatpak-app> id: "page.kramo.Cartridges" remote: "flathub">)
Default value:
(#<<flatpak-app> id: "com.github.huluti.Curtail" remote: "flathub"> #<<flatpak-app> id: "fr.handbrake.ghb" remote: "flathub"> #<<flatpak-app> id: "io.github.aandrew_me.ytdn" remote: "flathub"> #<<flatpak-app> id: "io.github.wartybix.Constrict" remote: "flathub"> #<<flatpak-app> id: "io.gitlab.adhami3310.Converter" remote: "flathub"> #<<flatpak-app> id: "org.gnome.gitlab.YaLTeR.VideoTrimmer" remote: "flathub"> #<<flatpak-app> id: "org.kde.kdenlive" remote: "flathub"> #<<flatpak-app> id: "org.kde.krita" remote: "flathub">)
Default value:
(#<<flatpak-app> id: "com.spotify.Client" remote: "flathub"> #<<flatpak-app> id: "de.haeckerfelix.Shortwave" remote: "flathub"> #<<flatpak-app> id: "dev.bragefuglseth.Fretboard" remote: "flathub"> #<<flatpak-app> id: "dev.diegovsky.Riff" remote: "flathub"> #<<flatpak-app> id: "dog.unix.cantata.Cantata" remote: "flathub"> #<<flatpak-app> id: "io.bassi.Amberol" remote: "flathub"> #<<flatpak-app> id: "io.github.htkhiem.Euphonica" remote: "flathub">)
Default value:
(#<<flatpak-app> id: "app.zen_browser.zen" remote: "flathub"> #<<flatpak-app> id: "com.brave.Browser" remote: "flathub"> #<<flatpak-app> id: "com.discordapp.Discord" remote: "flathub"> #<<flatpak-app> id: "com.github.hugolabe.Wike" remote: "flathub"> #<<flatpak-app> id: "com.rtosta.zapzap" remote: "flathub"> #<<flatpak-app> id: "com.rustdesk.RustDesk" remote: "flathub"> #<<flatpak-app> id: "com.usebruno.Bruno" remote: "flathub"> #<<flatpak-app> id: "de.haeckerfelix.Fragments" remote: "flathub"> #<<flatpak-app> id: "engineer.atlas.Nyxt" remote: "flathub"> #<<flatpak-app> id: "io.gitlab.news_flash.NewsFlash" remote: "flathub"> #<<flatpak-app> id: "org.gnome.Epiphany" remote: "flathub"> #<<flatpak-app> id: "org.qbittorrent.qBittorrent" remote: "flathub"> #<<flatpak-app> id: "org.telegram.desktop" remote: "flathub">)
Default value:
(#<<flatpak-app> id: "app.drey.Dialect" remote: "flathub"> #<<flatpak-app> id: "app.drey.Warp" remote: "flathub"> #<<flatpak-app> id: "com.belmoussaoui.Decoder" remote: "flathub"> #<<flatpak-app> id: "com.github.tchx84.Flatseal" remote: "flathub"> #<<flatpak-app> id: "dev.mufeed.Wordbook" remote: "flathub"> #<<flatpak-app> id: "io.github.flattool.Warehouse" remote: "flathub"> #<<flatpak-app> id: "io.github.idevecore.Valuta" remote: "flathub"> #<<flatpak-app> id: "io.gitlab.adhami3310.Impression" remote: "flathub"> #<<flatpak-app> id: "net.nokyan.Resources" remote: "flathub"> #<<flatpak-app> id: "org.gnome.DejaDup" remote: "flathub"> #<<flatpak-app> id: "org.gnome.Solanum" remote: "flathub"> #<<flatpak-app> id: "org.keepassxc.KeePassXC" remote: "flathub"> #<<flatpak-app> id: "org.signal.Signal" remote: "flathub"> #<<flatpak-app> id: "org.zulip.Zulip" remote: "flathub">)
Default value:
(#<<flatpak-app> id: "com.slack.Slack" remote: "flathub"> #<<flatpak-app> id: "org.libreoffice.LibreOffice" remote: "flathub">)
Declare one Flatpak application.
id is the reverse-DNS application id, the name Flathub and
flatpak use everywhere. remote names the remote it
comes from and defaults to flatpak-remote (Flathub). Symbols are
accepted for the convenience of a REPL, but the catalog uses strings.
(flatpak-app "org.gnome.Boxes") ⇒ #<flatpak-app>
Return #t when id can be a Flatpak application id.
The check is deliberately shallow: a non-empty string with a dot and no
whitespace. It catches the mistake that actually happens - a bare
symbol such as Boxes, or a half-copied entry with a space in it -
without pretending to implement Flatpak’s own naming rules, which also
allow underscores in the first segment.
Return the argument vector that installs app for the user.
The id and the remote are separate arguments, never a command string, because a shell would re-parse an id that was already checked and could expand anything that looks like a metacharacter.
Return the argument vector that registers remote for the user.
Return the .flatpakrepo URL registered for remote.
An unknown remote is an error rather than a silent skip: the alternative is an installation that looks like it worked and an empty application list.
Return the whole Flatpak catalog, deduplicated and sorted by id.
The result is the union of heks-linux-extra-flatpak and the
category parameters, read at call time so a local override is observed.
The extras come first, so redeclaring an id there wins; sorting by id
makes the installation order stable and the generated list easy to
inspect.
(map flatpak-app-id (heks-linux-flatpak))
Install every application in (heks-linux-flatpak).
Each remote the catalog uses is registered first when it is not
configured in any installation, so a fresh machine does not have to add
Flathub by hand. Applications are installed into the user installation
with flatpak install --user --assumeyes; an application that is
already present is skipped by Flatpak itself. A failure is reported but
does not stop the rest of the list, because one unavailable application
should not leave the machine without the others.
Per-machine additions live in $XDG_CONFIG_HOME/heks-linux/flatpak-settings.scm, which is evaluated in this module’s scope before the catalog is read:
(heks-linux-extra-flatpak (list (flatpak-app "org.gnome.Boxes")))
Next: (heks-linux packages zypper), Previous: (heks-linux niri), Up: API