diff --git a/AGENTS.md b/AGENTS.md index d585770..247c630 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -37,7 +37,7 @@ Dieses Repository ist ein modulares, automatisiertes Setup- und Konfigurations-F │ ├── 04-virtualization.list # QEMU, KVM, Libvirt, Bridge-Tools │ ├── 05-multimedia.list # VLC, Amberol, GIMP, Loupe, LibreOffice │ └── 06-flatpaks.list # Flathub App-IDs -├── stages/ # Sequenziell und modular ausführbare Phasen (00 bis 10) +├── stages/ # Sequenziell und modular ausführbare Phasen (00 bis 11) │ ├── 00-preflight.sh # Systemvoraussetzungen, Root/User-Erkennung, Internetverbindung │ ├── 01-apt-unstable.sh # Deb822-Quellen, Keyrings, Pinning, apt-listbugs, dist-upgrade │ ├── 02-kernel-hardware.sh # XanMod-Kernel, CPU P-State, Microcode, auto-cpufreq @@ -48,7 +48,8 @@ Dieses Repository ist ein modulares, automatisiertes Setup- und Konfigurations-F │ ├── 07-skel-and-user.sh # /etc/skel Vorlagen, ZSH-Shell-Setzen, Dotfiles-Sync │ ├── 08-flatpaks.sh # Flathub Setup, Flatpak-Paketlisten-Installation │ ├── 09-apps.sh # Spotify, Waydroid, OpenDeck, Desktop-Starter, MIME-Types -│ └── 10-hyprland.sh # LinuxBeginnings Debian-Hyprland Auto-Installer & Desktop-Setup +│ ├── 10-hyprland.sh # LinuxBeginnings Debian-Hyprland Auto-Installer & Desktop-Setup +│ └── 11-linutil.sh # Linutil (Chris Titus Tech System Toolbox), letzter Install-Schritt ├── data/ # Statische Konfigurationsdateien & Vorlagen │ ├── apt/ │ │ ├── sources.list.d/ # Deb822-Quellen (debian-unstable.sources, xanmod.sources) diff --git a/README.md b/README.md index 252e853..ccbe9fc 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Das Setup kann direkt ohne vorheriges manuelles Klonen via `curl` gestartet werd # Interaktiver Modus (whiptail Menü) curl -fsSL https://gitea.creative-dragonslayer.de/Scripts/Setup/raw/branch/main/install.sh | bash -# Vollautomatischer Modus (alle Stages 00 bis 10) +# Vollautomatischer Modus (alle Stages 00 bis 11) curl -fsSL https://gitea.creative-dragonslayer.de/Scripts/Setup/raw/branch/main/install.sh | bash -s -- --all # Gezielte Modulauswahl (z. B. Paketlisten und Schriften) @@ -102,7 +102,8 @@ Installiere nur bestimmte Phasen (z. B. nur Paketlisten und Schriften): │ ├── 07-skel-and-user.sh # /etc/skel Vorlagen, ZSH-Shell-Setzen, Dotfiles-Sync │ ├── 08-flatpaks.sh # Flathub Setup, Flatpak-Paketlisten-Installation │ ├── 09-apps.sh # Spotify, Waydroid, OpenDeck, Desktop-Starter, MIME-Types -│ └── 10-hyprland.sh # LinuxBeginnings Debian-Hyprland Auto-Installer & Dotfiles +│ ├── 10-hyprland.sh # LinuxBeginnings Debian-Hyprland Auto-Installer & Dotfiles +│ └── 11-linutil.sh # Linutil (Chris Titus Tech System Toolbox), letzter Install-Schritt └── data/ # Statische Konfigurationsdateien & Vorlagen ├── apt/ │ ├── sources.list.d/ # debian-unstable.sources, xanmod.sources diff --git a/lib/tui.sh b/lib/tui.sh index fe9066f..6775bf7 100755 --- a/lib/tui.sh +++ b/lib/tui.sh @@ -100,6 +100,7 @@ tui_select_stages() { "08" "Flatpaks (Flathub Repository & Flatpaks)" ON \ "09" "Zusatz-Apps & MIME (Spotify, Waydroid, OpenDeck, MIME)" ON \ "10" "Hyprland Desktop (LinuxBeginnings Debian-Hyprland Installer)" ON \ + "11" "Linutil (Chris Titus Tech System Toolbox)" ON \ 3> "$tmp_file"; then TUI_SELECTION="$(tr -d '"' < "$tmp_file")" diff --git a/setup.sh b/setup.sh index f62fbec..3bc5879 100755 --- a/setup.sh +++ b/setup.sh @@ -46,7 +46,7 @@ prompts have been answered. Run it as your normal desktop user - no need to prefix it with 'sudo' yourself (though doing so still works). Options: - -a, --all Run all setup stages sequentially (00 through 10) + -a, --all Run all setup stages sequentially (00 through 11) -s, --stages Comma-separated list of stages to run (e.g. --stages 01,02,04) -u, --user Specify target desktop user (defaults to \$SUDO_USER) -d, --dry-run Simulate stage execution without modifying the system @@ -64,6 +64,7 @@ Available Stages: 08: Flatpak Applications (Flathub, Flatpak package list) 09: Standalone Applications & MIME (Spotify, Waydroid, OpenDeck, MIME types) 10: Hyprland Desktop (LinuxBeginnings Auto-Installer) + 11: Linutil (Chris Titus Tech System Toolbox) Examples: ./setup.sh # Interactive TUI mode @@ -133,7 +134,7 @@ fi SELECTED_STAGES=() if [[ "$FLAG_ALL" -eq 1 ]]; then - SELECTED_STAGES=(01 02 03 04 05 06 07 08 09 10) + SELECTED_STAGES=(01 02 03 04 05 06 07 08 09 10 11) elif [[ -n "$FLAG_STAGES" ]]; then IFS=',' read -r -a raw_stages <<< "$FLAG_STAGES" for st in "${raw_stages[@]}"; do @@ -174,7 +175,7 @@ else else log_warn "No controlling terminal available - interactive TUI cannot be displayed." log_info "Non-interactive shell and no parameters provided. Defaulting to --all." - SELECTED_STAGES=(01 02 03 04 05 06 07 08 09 10) + SELECTED_STAGES=(01 02 03 04 05 06 07 08 09 10 11) fi fi diff --git a/stages/11-linutil.sh b/stages/11-linutil.sh new file mode 100644 index 0000000..386a97e --- /dev/null +++ b/stages/11-linutil.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +# ============================================================================== +# stages/11-linutil.sh - Linutil (Chris Titus Tech System Toolbox), final install step +# ============================================================================== + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +source "$SCRIPT_DIR/lib/utils.sh" +source "$SCRIPT_DIR/lib/btrfs.sh" + +if [[ -f "$SCRIPT_DIR/config/setup.conf" ]]; then + # shellcheck source=/dev/null + source "$SCRIPT_DIR/config/setup.conf" +fi + +setup_err_trap + +log_step "Running Stage 11: Linutil (Chris Titus Tech System Toolbox)" + +require_root + +TARGET_USER="$(get_target_user)" + +log_info "Launching Linutil as target user '$TARGET_USER'..." +create_timeshift_snapshot "Stage 11: Pre-Linutil" "B" + +if command_exists curl; then + if has_tty; then + # Linutil is an interactive TUI - run it as the target user (it + # elevates via sudo itself where needed), attached to the controlling + # terminal so its menu can actually receive keystrokes. + if run_as_target_user bash -c 'sh <(curl -fsSL https://christitus.com/linux)' < /dev/tty > /dev/tty; then + log_success "Linutil finished." + else + log_warn "Linutil exited with a non-zero status. Check logs if needed." + fi + else + log_warn "No controlling terminal available - Linutil's interactive menu cannot be displayed. Skipping." + log_info "Run it manually later with: curl -fsSL https://christitus.com/linux | sh" + fi +else + log_error "curl is required to run Linutil." + exit 1 +fi + +create_timeshift_snapshot "Stage 11: Post-Linutil" "O" + +log_success "Stage 11: Linutil completed successfully!"