particle-os-modules/modules/default-flatpaks
xyny ea2720ba4e
feat: support versioning modules (#240)
* feat: add nu script that generates build matrix for github action

* chore: push initial version of new github action for testing

* fix: properly close github template sequence

* chore: screw this i'll write the whole build in nu (nu build script started, continue later)

* fix: individual misspellings and such

(yeah, i'm tired)

* fix: containerfile path

* fix: docker arg syntax

* fix: docker build path?

* feat: code structure, buildx, pushing to registry

* fix: tag image properly

* fix: split arguments properly

* fix: use registry properly

* refactor: move docker build to a separate par-each

* feat: correctly tag versioned modules

* feat: cosign signing, better logging

* fix: cosign syntax

* fix: differentiate log types with more expressive colors

* chore: fix cosign syntax in logs

* fix: capture errors, colocate logs while running paraller

* chore: partly revert "fix: capture errors, colocate logs while running paraller"

This reverts commit 9238a0f1d68183e712b567fc50849964cc964c78.

* chore: bring back capture errors, keep order in logs

apparently do --capture-errors is required for nushell to catch external commands errors

* chore: Revert "chore: bring back capture errors, keep order in logs"

These changes didn't do anything...
This reverts commit 020b9a1bce9456f2167397b49aa24a65f6bec8e6.

* fix: properly tag images in PRs and secondary branches

* fix: use tags-variable instead of "tags" string

* chore: change default-flatpaks module folder structure to be versioned

* fix: also log generated tags for versioned modules

* fix: don't add tags meant for latest image for every version of versioned module

* fix: better logging and inline docs

* fix: better logging pt2

* feat: build-unified for building the legacy modules container with just the latest versions

* fix: correct workflow names

* fix: add missing ansi resets

* chore: add nushell extension to recommendations

* fix: update unified job name

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>

* chore: remove matrix output left over from a previous version

---------

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-08-11 11:20:10 +00:00
..
v1 feat: support versioning modules (#240) 2024-08-11 11:20:10 +00:00
default-flatpaks.tsp feat: add typespec schemas for modules (#233) 2024-07-09 16:25:31 +00:00
module.yml chore: remove raw github URLs from module.ymls (unneeded after recent refactor) 2024-07-26 16:02:32 +03:00
README.md fix(default-flatpaks): Last module definition overwrites the 1st one (#263) 2024-06-19 14:29:54 +00: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