feat(default-flatpaks): Better handle multiple uses of module (#74)

* fix(default-flatpaks): Always enable systemd services

Ensures that the module always removes Fedora Flatpaks, even if a
system-wide flatpak remote isn't configured for the module.

* chore(default-flatpaks): Add output for result of repo config

* fix(default-flatpaks): Better handle multiple uses of module

* chore(default-flatpaks): Add label to output of existing config

* docs(default-flatpaks): Mention that Flatpak remote can be re-configured

* docs(default-flatpaks): Add second example to README

* docs(default-flatpaks): Clarify repo config in second example
This commit is contained in:
Patrick Csikos 2023-11-18 07:43:55 -05:00 committed by GitHub
parent 30ecc4cefd
commit f0c0192e10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 69 additions and 22 deletions

View file

@ -1,6 +1,6 @@
# `default-flatpaks` module for startingpoint
The `default-flatpaks` module can be used to install flatpaks from a configurable remote on first boot. 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, and subsequent usages of the module will install flatpaks to the same remote. If no Flatpak remote is specified, the module will default to using Flathub.
The `default-flatpaks` module can be used to install flatpaks from a configurable remote on first boot. 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, though per-user flatpaks will be installed for every user on a system. Previously-installed flatpaks can also be removed.
@ -20,7 +20,7 @@ Flatpak setup can be run again by removing `/etc/ublue-os/system-flatpak-configu
This module stores the Flatpak remote configuration and Flatpak install/remove lists in `/etc/flatpak/`. 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.
## Example configuration
## Example configurations
```yaml
type: default-flatpaks
@ -38,3 +38,18 @@ system:
user:
repo-name: flathub
```
```yaml
# Assuming that the above example is called first in a recipe,
# a subsequent usage might look like this:
type: default-flatpaks
system:
# If the repo-* fields are omitted, the configured repo will
# use the previous configuration. Otherwise, it defaults to Flathub.
install:
- org.kde.kdenlive
user:
# repo-name will overwrite the previously-configured repo-name for the user remote
repo-name: flathub-user
repo-title: "Flathub (User)
```