fix: Use Flathub as default remote for default-flatpaks

This commit is contained in:
zelikos 2023-10-14 11:43:13 -04:00
parent c02b399bf6
commit 30931ed9c2
No known key found for this signature in database
GPG key ID: AA0CB476ECFA09E7
2 changed files with 13 additions and 0 deletions

View file

@ -2,6 +2,8 @@
The `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. 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.
If no Flatpak remote is specified, the module will default to using Flathub.
The module uses the following scripts to handle flatpak setup:
- `/usr/bin/system-flatpak-setup`

View file

@ -23,6 +23,17 @@ configure_flatpak_repo () {
repo_name=$(echo "$1" | yq -I=0 ".$2.repo-name")
repo_title=$(echo "$1" | yq -I=0 ".$2.repo-title")
# Use Flathub as default repo
if [[ $repo_url == "null" ]]; then
repo_url=https://dl.flathub.org/repo/flathub.flatpakrepo
fi
# If repo-name isn't configured, use flathub as fallback
# Checked separately from URL to allow custom naming
if [[ $repo_name == "null" ]]; then
repo_name="flathub"
fi
touch $repo_info
# EOF breaks if the contents are indented,
# so the below lines are intentionally un-indented