From d5941f2b26c6b29d2d1665847ba65561b581a62e Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 3 Jun 2026 18:33:04 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20parity=20milestone=20=E2=80=94=20add=20?= =?UTF-8?q?linux-to-sync,=20mark=20v1.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every service from ubuntu-post-install-24.04-crowdsec.sh is now a module. 35 services across 8 categories; setup.sh is the primary install path. - services/linux-to-sync.sh (extras): clone private repo via SSH or PAT - setup.sh: is_installed case for linux-to-sync (~/.git marker) - MODULAR.md: migration table updated to show full inventory - VERSION: 0.9.11 → 1.0.0 (parity achieved) https://claude.ai/code/session_01Y4dMKtkqkpvmgDKoRdzhTG --- CHANGELOG.md | 16 +++++++ MODULAR.md | 26 ++++++------ VERSION | 2 +- services/linux-to-sync.sh | 88 +++++++++++++++++++++++++++++++++++++++ setup.sh | 1 + 5 files changed, 119 insertions(+), 14 deletions(-) create mode 100644 services/linux-to-sync.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 1039bb1..ed01653 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,22 @@ All notable changes to this project. Versions follow `MAJOR.MINOR.PATCH`. The project is pre-1.0 while the modular system reaches parity with the monolithic `ubuntu-post-install-*.sh` scripts. +## [1.0.0] - 2026-06-03 + +### Milestone: full parity with the monolith + +Every service from `ubuntu-post-install-24.04-crowdsec.sh` is now a module. +The modular system (`setup.sh` + `services/`) is the primary install path. +The monolith is retained as a frozen evolution record. + +### Added +- `services/linux-to-sync.sh` *(extras)* — clones the private + `outis1one/linux-to-sync` repository to `~/linux-to-sync` via SSH key or + GitHub PAT (PAT is stripped from the remote URL after clone for security). + `is_installed` marker checks `~/linux-to-sync/.git`. +- Updated `MODULAR.md` migration table to show the completed module inventory + grouped by category. + ## [0.9.11] - 2026-06-03 ### Added diff --git a/MODULAR.md b/MODULAR.md index 2103832..c36b58f 100644 --- a/MODULAR.md +++ b/MODULAR.md @@ -85,17 +85,17 @@ ordered first. ## Migration status -This is an incremental migration. The big `ubuntu-post-install-*-crowdsec.sh` -script remains the current "install everything" entry point until the modules -reach parity, at which point it is retired (like the `original` and -`-no-keycloak` tiers, which stay frozen as the evolution record). +Migration is complete. `setup.sh` + `services/` now cover every service +from `ubuntu-post-install-*-crowdsec.sh` plus several extras. The monolith +is retained as a frozen evolution record. -| Module | Status | -|--------|--------| -| `base` (incl. glow) | ✅ done | -| `homeassistant` | ✅ done | -| `minecraft` (multi-instance, rich) | ⏳ porting from `setupminecraft.sh` | -| `wolf` (gaming) | ⏳ porting from `setupwolf.sh` | -| `js99er` (gaming) | ⏳ porting from `setupjs99er.sh` | -| `backup` (Kopia, cross-cutting) | ⏳ porting from `setupbackup.sh` | -| remaining ~65 services | ⏳ migrate from the monolith incrementally | +| Group | Modules | +|-------|---------| +| `base` | `base`, `glow` | +| `homelab` | `caddy`, `crowdsec`, `authelia`, `homeassistant` | +| `utilities` | `actualbudget`, `ddclient`, `filebrowser`, `fmd`, `magicmirror`, `mealie`, `meshcentral`, `ntfy`, `portainer`, `traccar`, `uptimekuma`, `watchtower`, `wg-easy` | +| `media` | `arm`, `audiobookshelf`, `emby`, `immich`, `jellyfin`, `lyrion` | +| `cameras` | `frigate`, `frigate-notify` | +| `gaming` | `js99er`, `minecraft`, `wolf`, `wolf-pair` | +| `extras` | `linux-to-sync`, `silent-send` | +| `backup` | `backup` | diff --git a/VERSION b/VERSION index 8225a4b..3eefcb9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.11 +1.0.0 diff --git a/services/linux-to-sync.sh b/services/linux-to-sync.sh new file mode 100644 index 0000000..7b8cf9e --- /dev/null +++ b/services/linux-to-sync.sh @@ -0,0 +1,88 @@ +#!/bin/bash +# services/linux-to-sync.sh — Clone the private linux-to-sync repository. +# Part of the modular post-install system (sourced by setup.sh). +# +# Ported from ubuntu-post-install-24.04-crowdsec.sh (# ---- LINUX-TO-SYNC ----). +# Clones outis1one/linux-to-sync to ~/linux-to-sync via SSH or HTTPS+PAT. +# No server/container — this is a personal sync/config repo. + +register_service linux-to-sync extras "Personal sync & config scripts (linux-to-sync private repo)" + +install_linux-to-sync() { + local SYNC_DIR="$ACTUAL_HOME/linux-to-sync" + + if [ "$DRY_RUN" = true ]; then + echo "[DRY-RUN] linux-to-sync would:" + echo " - Clone outis1one/linux-to-sync to $SYNC_DIR" + echo " - Authenticate via SSH key or GitHub Personal Access Token" + return 0 + fi + + echo "" + echo " Requires access to github.com/outis1one/linux-to-sync" + echo " Authenticate with ONE of:" + echo " [1] SSH key already added to your GitHub account" + echo " [2] GitHub Personal Access Token (PAT)" + echo "" + + local AUTH_METHOD="" + prompt_text "Authentication method [1=SSH, 2=PAT, default: 1]:" "1" AUTH_METHOD + AUTH_METHOD="${AUTH_METHOD:-1}" + + if [ "$AUTH_METHOD" = "2" ]; then + echo "" + echo " Create a PAT at: https://github.com/settings/tokens/new" + echo " Select the 'repo' scope for full repository access." + echo "" + local GH_TOKEN="" + prompt_text "GitHub Personal Access Token:" "" GH_TOKEN + if [ -z "$GH_TOKEN" ]; then + log_warning "No token provided — skipping." + return 0 + fi + + if git clone "https://$GH_TOKEN@github.com/outis1one/linux-to-sync.git" "$SYNC_DIR" 2>/dev/null; then + cd "$SYNC_DIR" || return 1 + # Remove token from remote URL so it isn't stored in plain text + git remote set-url origin "https://github.com/outis1one/linux-to-sync.git" + chown -R "$ACTUAL_USER:$ACTUAL_USER" "$SYNC_DIR" + log_success "linux-to-sync cloned to $SYNC_DIR" + echo " Note: re-enter your token for future push/pull, or:" + echo " git config credential.helper store" + else + log_error "Clone failed — check your token and try again." + return 1 + fi + else + echo "" + echo " Attempting SSH clone (your SSH key must be added to GitHub)..." + if git clone git@github.com:outis1one/linux-to-sync.git "$SYNC_DIR" 2>/dev/null; then + chown -R "$ACTUAL_USER:$ACTUAL_USER" "$SYNC_DIR" + log_success "linux-to-sync cloned to $SYNC_DIR" + else + log_error "SSH clone failed." + echo "" + echo " To add your SSH key to GitHub:" + echo " 1. cat ~/.ssh/id_rsa.pub (or id_ed25519.pub)" + echo " 2. github.com/settings/keys → New SSH key → paste" + echo " Then retry: sudo ./setup.sh linux-to-sync" + return 1 + fi + fi + + write_readme "$SYNC_DIR" << MD +# linux-to-sync + +Private personal sync and config repository cloned from outis1one/linux-to-sync. + +## Update +\`\`\`bash +cd $SYNC_DIR +git pull +\`\`\` +MD + + echo "" + echo " Cloned to: $SYNC_DIR" + echo "" +} diff --git a/setup.sh b/setup.sh index 6cc221c..ed6fa9b 100755 --- a/setup.sh +++ b/setup.sh @@ -80,6 +80,7 @@ is_installed() { glow) command -v glow >/dev/null 2>&1 ;; crowdsec) command -v cscli >/dev/null 2>&1 ;; silent-send) [ -d "$ACTUAL_HOME/silent-send/.git" ] ;; + linux-to-sync) [ -d "$ACTUAL_HOME/linux-to-sync/.git" ] ;; *) [ -e "$DOCKER_DIR/$1" ] ;; esac }