Add flatpaks

This commit is contained in:
2026-04-11 05:29:20 -07:00
parent 3605a5d6d9
commit 3769527869
9 changed files with 60 additions and 6 deletions
+1 -3
View File
@@ -147,10 +147,8 @@ EOF
# Add calamares installer and related packages to the live image
on_chroot << EOF
apt-get install --no-install-recommends -y \
calamares calamares-settings-vesperos \
apt-get install -y calamares calamares-settings-vesperos \
libcrack2 cracklib-runtime \
squashfs-tools \
grub-efi-amd64 grub-pc-bin efibootmgr \
parted gdisk dosfstools e2fsprogs
EOF
+11
View File
@@ -45,6 +45,8 @@ sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/preferences.d/apt-vespero
# Add additional architectures if needed, update and upgrade and cache policy
on_chroot <<- \EOF
SYSTEM_ARCH="$(dpkg --print-architecture)"
# If we're building for rpi, we want to add both armhf and arm64 architectures to allow installing packages from both architectures
if [ "${PLATFORM}" == "rpi" ]; then
if [ "$SYSTEM_ARCH" = "armhf" ]; then
dpkg --add-architecture arm64
@@ -52,6 +54,15 @@ on_chroot <<- \EOF
dpkg --add-architecture armhf
fi
fi
# If we're building for amd64, we want to add i386 architecture to allow installing packages from both architectures
if [ "$SYSTEM_ARCH" = "amd64" ]; then
dpkg --add-architecture i386
elif [ "$SYSTEM_ARCH" = "i386" ]; then
dpkg --add-architecture amd64
fi
# Update and upgrade packages and show cache policy
apt-get update
apt-get dist-upgrade -y
apt-cache policy
+1
View File
@@ -0,0 +1 @@
tailscale-repo
+1
View File
@@ -1,6 +1,7 @@
gstreamer1.0-x gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav
gtk2-engines alsa-utils
plymouth plymouth-themes desktop-base
flatpak
git
gvfs
rfkill
+2 -2
View File
@@ -1,3 +1,3 @@
firefox-esr
spice-vdagent
open-vm-tools-desktop
steam-installer
spice-vdagent open-vm-tools-desktop
+1 -1
View File
@@ -1,2 +1,2 @@
gnome-session gnome-shell libpam-gnome-keyring gnome-control-center gnome-software network-manager-gnome pulseaudio gnome-terminal gnome-online-accounts gnome-initial-setup gnome-tweaks gnome-shell-extension-manager gnome-shell-extension-user-theme vesperos-taskbar gnome-shell-extension-no-annoyance gnome-shell-extension-gsconnect gnome-shell-extension-dash-to-panel gnome-shell-extension-appindicator
gnome-session gnome-shell libpam-gnome-keyring gnome-control-center gnome-software gnome-software-plugin-flatpak network-manager-gnome pulseaudio gnome-terminal gnome-online-accounts gnome-initial-setup gnome-tweaks gnome-shell-extension-manager gnome-shell-extension-user-theme vesperos-taskbar gnome-shell-extension-no-annoyance gnome-shell-extension-gsconnect gnome-shell-extension-dash-to-panel gnome-shell-extension-appindicator
#gnome-shell-extension-desktop-icons-ng
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
# Install the default flatpak repos and pre-install apps in chroot
on_chroot <<- EOF
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
EOF
# Copy app list
# Format: "repo: app.id1 app.id2 ..." — lines starting with "#" are comments
mkdir -p "${ROOTFS_DIR}/etc/flatpak"
install -m 644 files/flatpack-apps.txt "${ROOTFS_DIR}/etc/flatpak/apps.txt"
# Pre-install flatpaks in chroot (post-install apply_extra scripts may fail without bwrap,
# but apps are fully usable — a first-boot service runs flatpak update to complete them)
on_chroot <<- EOF
while IFS=: read -r repo apps; do
[[ "\$repo" =~ ^[[:space:]]*# ]] && continue
[ -z "\${repo// /}" ] && continue
flatpak install -y --noninteractive "\${repo// /}" \$apps
done < /etc/flatpak/apps.txt
EOF
# First-boot service: runs flatpak update once network is available to complete
# any apply_extra steps (e.g. openh264) that couldn't run in the chroot
install -m 644 files/flatpak-firstboot.service "${ROOTFS_DIR}/etc/systemd/system/flatpak-firstboot.service"
on_chroot <<- EOF
systemctl enable flatpak-firstboot.service
EOF
@@ -0,0 +1 @@
flathub: org.gnome.Loupe com.bitwarden.desktop org.mozilla.Thunderbird
@@ -0,0 +1,14 @@
[Unit]
Description=Complete Flatpak post-install steps on first boot
After=network-online.target
Wants=network-online.target
ConditionPathExists=!/var/lib/flatpak-firstboot-done
[Service]
Type=oneshot
ExecStart=flatpak update -y --noninteractive
ExecStartPost=/bin/touch /var/lib/flatpak-firstboot-done
ExecStartPost=/bin/systemctl disable flatpak-firstboot.service
[Install]
WantedBy=multi-user.target