Files
bootc-images/images/fedora-remote/files/flatpak-system-firstboot
T
Misthios 137091b402
Build containers / Compute changes (push) Successful in 3s
Build containers / fedora-cosmic (44) (push) Skipped
Build containers / fedora-cosmic (rawhide) (push) Skipped
Build containers / fedora-remote (44) (push) Successful in 8m28s
Build containers / Prune old releases and tags (push) Successful in 25s
fedora-remote: install Flatpaks system-wide on first boot
Per-user Flatpaks are only visible to the account that logged in first (and
consumed space per user). Install them into the system installation instead, so
every user including Kanidm accounts sees Firefox.
2026-09-30 19:37:03 +02:00

27 lines
760 B
Bash

#!/usr/bin/env bash
# Install the Flatpaks listed in /usr/share/flatpak/flatpaks.list into the
# system-wide installation on first boot, so every user (including Kanidm
# accounts) sees them.
set -euo pipefail
LIST="/usr/share/flatpak/flatpaks.list"
MARKER="/var/lib/flatpak/.system-firstboot-done"
[[ -f "${LIST}" ]] || exit 0
[[ -f "${MARKER}" ]] && exit 0
# Make Flathub available system-wide.
flatpak remote-add --system --if-not-exists flathub \
https://flathub.org/repo/flathub.flatpakrepo
mapfile -t apps < <(
sed -e 's/#.*//' -e 's/[[:space:]]//g' "${LIST}" | grep -v '^$' || true
)
if [[ ${#apps[@]} -gt 0 ]]; then
flatpak install --system --noninteractive --assumeyes "${apps[@]}"
fi
install -d "$(dirname "${MARKER}")"
touch "${MARKER}"