kamos/system_files/usr/libexec/kamos-install-flatpaks
kmk1971 9fb709cdcd Add KAMOS branding (wallpaper, logo) and easy app customization lists
- packages.list: system packages baked into the image
- flatpaks.list + first-boot service: default apps, auto-installed
- wallpaper stamped over stock desktop wallpapers at build time

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:33:51 +04:00

23 lines
682 B
Bash

#!/usr/bin/env bash
# Installs the default KAMOS Flatpak apps on first boot (runs once).
set -u
LIST=/usr/share/kamos/flatpaks.list
STAMP=/var/lib/kamos-flatpaks-done
[ -f "$STAMP" ] && exit 0
flatpak remote-add --if-not-exists --system flathub \
https://dl.flathub.org/repo/flathub.flatpakrepo || true
ok=1
while IFS= read -r app; do
case "$app" in ''|\#*) continue ;; esac
app="${app%%#*}"; app="$(echo "$app" | xargs)"
[ -z "$app" ] && continue
flatpak install --system --noninteractive --or-update flathub "$app" || ok=0
done < "$LIST"
# Only mark done when everything succeeded, so it retries next boot otherwise
[ "$ok" = 1 ] && touch "$STAMP"
exit 0