particle-os-modules/modules/default-flatpaks
xyny be6e4ba5bd
feat: add typespec schemas for modules (#233)
* feat: add typespec for bling and akmods for testing

* chore: temporarily change module source to dev branch

* feat: add missing module typespecs from blue-build/schema

* feat: add schemas for default-flatpaks module

* chore: annotate some parameters as optional

* fix: typo in default-flatpaks schema

* feat: add schema for files module

* feat: add script module schema

* feat: add signing module schema

* docs: add module.yml docs etc.

* fix(default-flatpaks): don't capitalize string in typespec

* feat: add schemas for gnome-extensions

* fix(files): properly declare string: string record type

* chore: add tsp for gschema-overrides

* chore: tsp for systemd module

* chore: add link to systemd tsp to module.yml

* chore: add tsp for yafti module

* feat: add docstrings for files module

* feat: add tsp for chezmoi module

* feat: docstrings for akmods tsp

* feat: docstrings for bling tsp

* feat: docstrings for default flatpaks tsp

* fix: link to files module docs page in files module tsp

* feat: docstrings for fonts module tsp

* feat: add docstrings for gnome extensions tsp

* feat: docstrings for gschema overrides tsp

* feat: docstrings for rpm ostree tsp

* feat: docstrings for script tsp

* feat: docstrings for signing module

* feat: docstrings for systemd tsp

* feat: docstrings for yafti module

* fix: typo in files tsp

* feat: typespec for brew module

* chore: update rpm ostree tsp for keys: prop

* fix: use typespec to declare default values

* fix: errors from previous commit

* docs: add typespec instructions

* docs: chore: add typespec docs link for docs syntax

* chore: switch to semicolon for ending property definitions

* docs: fix: typo inlude -> include

* feat: tsp for justfiles module

* chore: change links to reference main branch

---------

Co-authored-by: fiftydinar <65243233+fiftydinar@users.noreply.github.com>
2024-07-09 16:25:31 +00:00
..
config refactor(default-flatpaks): Switch to standardized BlueBuild location, implement useful docs into files & make flatpak detection + comparison more robust (#122) 2024-02-11 09:33:05 +00:00
user-config refactor(default-flatpaks): Switch to standardized BlueBuild location, implement useful docs into files & make flatpak detection + comparison more robust (#122) 2024-02-11 09:33:05 +00:00
default-flatpaks.sh fix(default-flatpaks): Use separate if condition instead of elif when appending IDs to list 2024-06-19 16:59:11 +02:00
default-flatpaks.tsp feat: add typespec schemas for modules (#233) 2024-07-09 16:25:31 +00:00
module.yml feat: add typespec schemas for modules (#233) 2024-07-09 16:25:31 +00:00
README.md fix(default-flatpaks): Last module definition overwrites the 1st one (#263) 2024-06-19 14:29:54 +00:00
system-flatpak-setup chore(default-flatpaks): Obtain flatpak list of apps without runtimes (#142) 2024-02-25 07:41:26 +00:00
system-flatpak-setup.service refactor: move default-flatpaks files to module directory 2024-01-24 17:55:51 +02:00
user-flatpak-setup chore(default-flatpaks): Obtain flatpak list of apps without runtimes (#142) 2024-02-25 07:41:26 +00:00
user-flatpak-setup.service refactor: move default-flatpaks files to module directory 2024-01-24 17:55:51 +02:00

default-flatpaks

The default-flatpaks module can be used to install or uninstall Flatpaks from a configurable remote on every boot. It skips that operation if no changes are detected. This module first removes the Fedora Flatpaks remote and Flatpaks that come pre-installed in Fedora. A Flatpak remote is configured the first time the module is used, but it can be re-configured in subsequent usages of the module. If no Flatpak remote is specified, the module will default to using Flathub.

Flatpaks can either be installed system-wide or per-user. Per-user Flatpaks will be installed separately for every user on a system. Previously-installed flatpaks can also be removed.

The module uses the following scripts to handle flatpak setup:

  • /usr/bin/system-flatpak-setup
  • /usr/bin/user-flatpak-setup

The scripts are run on every boot by these services:

  • /usr/lib/systemd/system/system-flatpak-setup.service
  • /usr/lib/systemd/user/user-flatpak-setup-service

system-flatpak-setup uninstalls Fedora flatpaks, replaces Fedora repos with your repo choice, checks the Flatpak install/remove lists created by the module & performs the install/uninstall operation according to that. user-flatpak-setup does the same thing for user Flatpaks.

This module stores the Flatpak remote configuration and Flatpak install/remove lists in /usr/share/bluebuild/default-flatpaks/. There are two subdirectories, user and system corresponding with the install level of the Flatpaks and repositories. Each directory has text files containing the IDs of flatpaks to install and remove, plus a repo-info.yml containing the details of the Flatpak repository.

This module also supports disabling & enabling notifications.

Local modification

If a local user is not satisfied with default Flatpak installations and removals in the image, it is possible for them to make modifications to the default configuration through the configuration files located within this directory:

/etc/bluebuild/default-flatpaks/

Folder structure is the same as talked about above, with system & user folders, install & remove files containing explanation on how those should be modified & what they do. The notifications file also contains this explanation for turning notifications on or off.

Known issues

Multiple repos inclusion is currently not supported (planned to implement in the future):
https://github.com/blue-build/modules/issues/146

Flatpak runtimes are not supported due to technical difficulty in implementing those:
https://github.com/blue-build/modules/pull/142#issuecomment-1962458757