Update firstboot.sh

This commit is contained in:
humocs-man
2026-03-02 19:33:46 +01:00
committed by GitHub
parent 3bbb48a392
commit 78547a7381
+2 -31
View File
@@ -1,40 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
echo "[firstboot] Starting first boot initialization" echo "[firstboot] Ensuring Flathub remote exists"
# -------------------------------------------------------------------
# Initialize Homebrew (no updates, no network dependency)
# -------------------------------------------------------------------
if [ -x /home/linuxbrew/.linuxbrew/bin/brew ]; then
echo "[firstboot] Initializing Homebrew environment"
export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"
export HOMEBREW_CELLAR="$HOMEBREW_PREFIX/Cellar"
export HOMEBREW_REPOSITORY="$HOMEBREW_PREFIX/Homebrew"
export PATH="$HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin:$PATH"
brew config >/dev/null
else
echo "[firstboot] Homebrew not present, skipping"
fi
# -------------------------------------------------------------------
# Ensure Flathub exists
# -------------------------------------------------------------------
if ! flatpak remote-list --system | grep -q '^flathub'; then if ! flatpak remote-list --system | grep -q '^flathub'; then
echo "[firstboot] Adding Flathub remote"
flatpak remote-add --system --if-not-exists flathub \ flatpak remote-add --system --if-not-exists flathub \
https://flathub.org/repo/flathub.flatpakrepo https://flathub.org/repo/flathub.flatpakrepo
fi fi
# ------------------------------------------------------------------- echo "[firstboot] Done"
# Flatpak preinstall
# -------------------------------------------------------------------
echo "[firstboot] Installing Flatpaks"
flatpak install --system --noninteractive flathub \
org.mozilla.firefox \
org.gnome.Calculator
echo "[firstboot] First boot initialization complete"