-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: default-flatpaks module #57
Conversation
For now, I've gone ahead and added the files into a subdirectory in the module, for easier testing of the module. If the proper approach long-term is something else, do let me know. |
Hey, thanks for working on this in such a quick time span! I'm wondering if a name like
I've been meaning to move the default yafti config to bling, too. I think that is the approach you should take here. Then, in the module docs (README), just document where a user should put files to override. The primary way to configure here would be the yml, which writes into the files in /etc/ which are used by the main flatpak manager script like bluefin/bazzite do. Edit: and the bin files should be put into place by this module, obviously (IMO), as they are literally the purpose of the module. |
I've moved the files in with the rest of the bling files, and updated the module script to move them into the image from the new locations. Also renamed the module to On that note, from the OP:
You mentioned I'll of course touch up the README once we've decided on the scope here |
There won't be anything to remove unless the module is called more than once, and if it's called more than once, the user would expect every Flatpak to be in the respective lists, so there's no need to call rm -f on it.
Would be great to add removal of fedora-testing repo too |
I've marked this as ready for review. The needed files are in with the other bling files, and moved on to the image by the module script. All configuration is handled in the yml. One thing I want to address in the future is to enable flatpak setup to run again automatically when the module configuration changes (like yafti), but I'm not really sure how to do so. |
...instead of having duplicated code between system flatpaks and user flatpaks configuration.
In a774b67 I tried to explain a bit more about the structure of |
This PR really looks like it could replace yafti for me entirely, so cheers for that! ❤️ |
There are some updates for this in bluefin before merging though: ublue-os/bluefin#583 |
Thanks for this list. I'm wondering if bazzite-flatpak-manager has had changes too.
|
Also a note that you need to quit Gnome Software before removing third-party repo prompt: Before this: # Opt out of and remove Fedora's flatpak repo
if grep -qz 'fedora' <<< $(flatpak remotes); then
/usr/lib/fedora-third-party/fedora-third-party-opt-out
/usr/bin/fedora-third-party disable
flatpak remote-delete fedora --force
fi |
That explains the structure perfectly. Thanks!
Will get to work on doing these next |
They -should- already get removed when the Fedora remote is, but in case any remain, remove them.
Updates from bluefin have been added:
Fixes and updates to repo configuration:
|
Added the |
See #56
default-flatpaks
module for startingpointThe
default-flatpaks
module removes the Fedora Flatpaks remote that comes pre-installed by Fedora, and can be used to install flatpaks from a configurable remote on first boot. The 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.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.
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 first boot and login by these services:
/usr/lib/systemd/system/system-flatpak-setup.service
/usr/lib/systemd/user/user-flatpak-setup-service
system-flatpak-setup
checks the flatpak repo information and install/remove lists created by the module. It also checks for the existence of/etc/ublue-os/system-flatpak-configured
before running.user-flatpak-setup
functions the same for user flatpaks, but checks for$HOME/.config/ublue-os/user-flatpak-configured
instead.Flatpak setup can be run again by removing
/etc/ublue-os/system-flatpak-configured
for system-wide flatpaks, or$HOME/.config/ublue-os/user-flatpak-configured
for user flatpaks.This module stores the Flatpak remote configuration and Flatpak install/remove lists in
/etc/flatpak/
. There are two subdirectories,user
andsystem
corresponding with the install level of the Flatpaks and repositories. Each directory has text files containing the IDs of flatpaks toinstall
andremove
, plus arepo-info.yml
containing the details of the Flatpak repository.Example configuration