Reorder stages: scripts before uv-projects

Swap stage 06 and 07 so that custom scripts (Bitwarden SSH loader,
custom binaries) are deployed before git clone operations that
need SSH keys.

- Renamed 06-uv-projects.sh → 07-uv-projects.sh
- Renamed 07-scripts.sh → 06-scripts.sh
- Updated provision.sh STAGES array and README
- Updated stage reference numbers in 08-systemd and 09-desktop
- Removed mempi-sync.timer (not needed without automated refresh)
This commit is contained in:
2026-06-07 14:34:05 +10:00
parent 180c5838ea
commit 7699d71d4e
7 changed files with 270 additions and 112 deletions

16
stages/08-systemd.sh Normal file → Executable file
View File

@@ -45,9 +45,8 @@ install_service_file "$SERVICES_DIR/pi-overview.service" "pi-overview.service"
# ---- 4. bw-ssh-keys.service — Load Bitwarden SSH keys at boot ----
install_service_file "$SERVICES_DIR/bw-ssh-keys.service" "bw-ssh-keys.service"
# ---- 5. mempi-sync.service + timer — Sync memory DB to Nextcloud ----
# ---- 5. mempi-sync.service — Sync memory DB to Nextcloud ----
install_service_file "$SERVICES_DIR/mempi-sync.service" "mempi-sync.service"
install_service_file "$SERVICES_DIR/mempi-sync.timer" "mempi-sync.timer"
# ---- 6. empty_downloads.service — Clear Downloads at login ----
install_service_file "$SERVICES_DIR/empty_downloads.service" "empty_downloads.service"
@@ -58,37 +57,36 @@ info "Enabling and starting services..."
# Services that should start automatically (enabled)
systemctl --user daemon-reload
# Check which scripts from stage 07 are available before enabling services.
# Check which scripts from stages 06 and 07 are available before enabling services.
# This avoids failures when running stages out of order.
if [ -x "$HOME/.local/bin/porridge" ]; then
systemctl --user enable --now porridge.service 2>/dev/null && ok "porridge.service enabled"
else
warn "porridge.service skipped (binary not found — run stage 07 first)."
warn "porridge.service skipped (binary not found — run stage 06 first)."
fi
if [ -x "$HOME/.local/bin/porridge" ]; then
systemctl --user enable --now porridge-dictate.service 2>/dev/null && ok "porridge-dictate.service enabled"
else
warn "porridge-dictate.service skipped (binary not found — run stage 07 first)."
warn "porridge-dictate.service skipped (binary not found — run stage 06 first)."
fi
if [ -x "$HOME/.local/bin/pi-overview" ]; then
systemctl --user enable --now pi-overview.service 2>/dev/null && ok "pi-overview.service enabled"
else
warn "pi-overview.service skipped (binary not found — run stage 06-uv-projects first)."
warn "pi-overview.service skipped (binary not found — run stage 07 first)."
fi
if [ -f "$HOME/.local/bin/bw-load-ssh.sh" ]; then
systemctl --user enable bw-ssh-keys.service 2>/dev/null && ok "bw-ssh-keys.service enabled"
else
warn "bw-ssh-keys.service skipped (script not found — run stage 07 first)."
warn "bw-ssh-keys.service skipped (script not found — run stage 06 first)."
fi
systemctl --user enable --now empty_downloads.service 2>/dev/null && ok "empty_downloads.service enabled" || warn "empty_downloads.service not started."
# Timers
systemctl --user enable --now mempi-sync.timer 2>/dev/null && ok "mempi-sync.timer enabled" || warn "mempi-sync.timer not started."
# (No timers currently)
info "===== Service Status ====="
systemctl --user list-units --type=service --state=running 2>/dev/null | grep -E "(porridge|swayidle|pi-overview|mempi|bw-ssh|empty)" || true