diff --git a/AGENTS.md b/AGENTS.md index 1687f38..099106f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -34,7 +34,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 09) +├── stages/ # Sequenziell und modular ausführbare Phasen (00 bis 10) │ ├── 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 @@ -43,8 +43,9 @@ Dieses Repository ist ein modulares, automatisiertes Setup- und Konfigurations-F │ ├── 05-fonts.sh # Download & Installation von Coding- & Nerd-Fonts │ ├── 06-services.sh # Aktivierung von AppArmor, Docker, Libvirt, zram, Ollama │ ├── 07-skel-and-user.sh # /etc/skel Vorlagen, ZSH-Shell-Setzen, Dotfiles-Sync -│ ├── 08-flatpaks-apps.sh # Flathub Setup, Flatpaks, Spotify, Waydroid, OpenDeck, MIME-Types -│ └── 09-hyprland.sh # LinuxBeginnings Debian-Hyprland Auto-Installer & Desktop-Setup +│ ├── 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 ├── data/ # Statische Konfigurationsdateien & Vorlagen │ ├── apt/ │ │ ├── sources.list.d/ # Deb822-Quellen (debian-unstable.sources, xanmod.sources) diff --git a/README.md b/README.md index 9f84d05..849ab80 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ sudo ./setup.sh ``` ### 2. Vollautomatischer CLI-Modus -Führe alle Phasen (`00` bis `09`) ohne Interaktion aus: +Führe alle Phasen (`00` bis `10`) ohne Interaktion aus: ```bash sudo ./setup.sh --all ``` @@ -36,7 +36,7 @@ sudo ./setup.sh --stages 04,05 | Option | Argument | Beschreibung | | :--- | :--- | :--- | -| `-a`, `--all` | – | Führt alle Phasen (`00` bis `09`) sequenziell aus | +| `-a`, `--all` | – | Führt alle Phasen (`00` bis `10`) sequenziell aus | | `-s`, `--stages` | `<01,02,...>` | Kommagetrennte Liste der auszuführenden Phasen | | `-u`, `--user` | `` | Zielbenutzer für Userland/Dotfiles (Standard: `$SUDO_USER` mit Bestätigungsabfrage) | | `-d`, `--dry-run` | – | Simuliert die Ausführung ohne Systemänderungen | @@ -71,8 +71,9 @@ sudo ./setup.sh --stages 04,05 │ ├── 05-fonts.sh # Download & Installation von JetBrainsMono, Fantasque, VictorMono │ ├── 06-services.sh # Aktivierung von AppArmor, Docker, Libvirt, zram, Ollama │ ├── 07-skel-and-user.sh # /etc/skel Vorlagen, ZSH-Shell-Setzen, Dotfiles-Sync -│ ├── 08-flatpaks-apps.sh # Flathub Setup, Flatpaks, Spotify, Waydroid, OpenDeck, MIME-Types -│ └── 09-hyprland.sh # LinuxBeginnings Debian-Hyprland Auto-Installer & Dotfiles +│ ├── 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 └── data/ # Statische Konfigurationsdateien & Vorlagen ├── apt/ │ ├── sources.list.d/ # debian-unstable.sources, xanmod.sources diff --git a/config/setup.conf b/config/setup.conf index ae66fcb..1a16c7c 100644 --- a/config/setup.conf +++ b/config/setup.conf @@ -23,4 +23,4 @@ OLLAMA_KV_CACHE_TYPE="q8_0" OLLAMA_KEEP_ALIVE="30m" # Default Stages (if --all is passed or in default batch mode) -ALL_STAGES="00 01 02 03 04 05 06 07 08 09" +ALL_STAGES="00 01 02 03 04 05 06 07 08 09 10" diff --git a/data/etc/profile.d/xdg_dirs_desktop_session.sh b/data/etc/profile.d/xdg_dirs_desktop_session.sh index 83030bb..218fdb0 100755 --- a/data/etc/profile.d/xdg_dirs_desktop_session.sh +++ b/data/etc/profile.d/xdg_dirs_desktop_session.sh @@ -9,7 +9,7 @@ if [ -n "$DESKTOP_SESSION" ]; then if [ -z "$XDG_CONFIG_DIRS" ]; then XDG_CONFIG_DIRS="$DEFAULT_XDG_CONFIG_DIRS" fi - if [ -n "${XDG_CONFIG_DIRS##*$DEFAULT_XDG_CONFIG_DIRS/xdg-$DESKTOP_SESSION*}" ]; then + if [ -n "${XDG_CONFIG_DIRS##*"$DEFAULT_XDG_CONFIG_DIRS"/xdg-"$DESKTOP_SESSION"*}" ]; then XDG_CONFIG_DIRS="$DEFAULT_XDG_CONFIG_DIRS"/xdg-"$DESKTOP_SESSION":"$XDG_CONFIG_DIRS" fi export XDG_CONFIG_DIRS @@ -18,7 +18,7 @@ if [ -n "$DESKTOP_SESSION" ]; then if [ -z "$XDG_DATA_DIRS" ]; then XDG_DATA_DIRS="$DEFAULT_XDG_DATA_DIRS" fi - if [ -n "${XDG_DATA_DIRS##*/usr/share/$DESKTOP_SESSION*}" ]; then + if [ -n "${XDG_DATA_DIRS##*/usr/share/"$DESKTOP_SESSION"*}" ]; then XDG_DATA_DIRS=/usr/share/"$DESKTOP_SESSION":"$XDG_DATA_DIRS" fi export XDG_DATA_DIRS diff --git a/lib/tui.sh b/lib/tui.sh index f8da329..e52e142 100755 --- a/lib/tui.sh +++ b/lib/tui.sh @@ -26,7 +26,7 @@ tui_select_stages() { local choices choices=$(whiptail --title "Modulauswahl / Stages" \ --checklist "Wähle die gewünschten Installations-Phasen mit der LEERTASTE aus:" \ - 22 78 9 \ + 23 78 10 \ "01" "Debian Unstable (Deb822, Pinning, Upgrade)" ON \ "02" "Kernel & Hardware (XanMod, P-State, Microcode)" ON \ "03" "Bootloader & Theme (GRUB, Vimix, Plymouth)" ON \ @@ -34,8 +34,9 @@ tui_select_stages() { "05" "Coding & Nerd Fonts (JetBrainsMono, VictorMono)" ON \ "06" "System-Dienste (AppArmor, Docker, Libvirt, zram, Ollama)" ON \ "07" "Userland & Skel (Zsh, Skel-Templates, Dotfiles)" ON \ - "08" "Flatpaks & Apps (Flathub, Spotify, OpenDeck, MIME)" ON \ - "09" "Hyprland Desktop (LinuxBeginnings Debian-Hyprland Installer)" ON \ + "08" "Flatpaks (Flathub Repository & Flatpaks)" ON \ + "09" "Zusatz-Apps & MIME (Spotify, Waydroid, OpenDeck, MIME)" ON \ + "10" "Hyprland Desktop (LinuxBeginnings Debian-Hyprland Installer)" ON \ 3>&1 1>&2 2>&3) || { log_info "Setup durch Benutzer abgebrochen." exit 0 diff --git a/setup.sh b/setup.sh index d092b28..f830649 100755 --- a/setup.sh +++ b/setup.sh @@ -27,7 +27,7 @@ Usage: sudo ./setup.sh [OPTIONS] Debian Unstable Setup & Desktop Customization Framework Options: - -a, --all Run all setup stages sequentially (00 through 09) + -a, --all Run all setup stages sequentially (00 through 10) -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 @@ -42,8 +42,9 @@ Available Stages: 05: Font Installation (JetBrainsMono, FantasqueSans, VictorMono) 06: System Services (AppArmor, Docker, Libvirt, zram, Ollama) 07: Skel & User Environment (Zsh, Templates, Dotfiles Sync) - 08: Flatpaks & Applications (Flathub, Spotify, Waydroid, OpenDeck, MIME types) - 09: Hyprland Desktop (LinuxBeginnings Auto-Installer) + 08: Flatpak Applications (Flathub, Flatpak package list) + 09: Standalone Applications & MIME (Spotify, Waydroid, OpenDeck, MIME types) + 10: Hyprland Desktop (LinuxBeginnings Auto-Installer) Examples: sudo ./setup.sh # Interactive TUI mode @@ -113,7 +114,7 @@ fi SELECTED_STAGES=() if [[ "$FLAG_ALL" -eq 1 ]]; then - SELECTED_STAGES=(01 02 03 04 05 06 07 08 09) + SELECTED_STAGES=(01 02 03 04 05 06 07 08 09 10) elif [[ -n "$FLAG_STAGES" ]]; then IFS=',' read -r -a raw_stages <<< "$FLAG_STAGES" for st in "${raw_stages[@]}"; do @@ -148,7 +149,7 @@ else fi else log_info "Non-interactive shell and no parameters provided. Defaulting to --all." - SELECTED_STAGES=(01 02 03 04 05 06 07 08 09) + SELECTED_STAGES=(01 02 03 04 05 06 07 08 09 10) fi fi diff --git a/stages/08-flatpaks.sh b/stages/08-flatpaks.sh new file mode 100755 index 0000000..7a5c1f3 --- /dev/null +++ b/stages/08-flatpaks.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# ============================================================================== +# stages/08-flatpaks.sh - Flathub repository setup & Flatpak package installation +# ============================================================================== + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +source "$SCRIPT_DIR/lib/utils.sh" +source "$SCRIPT_DIR/lib/apt.sh" + +setup_err_trap + +log_step "Running Stage 08: Flatpaks & Flathub Repository Setup" + +require_root + +TARGET_USER="$(get_target_user)" + +# 1. Flathub Repository Setup +log_substep "Configuring Flathub remote repository..." +if command_exists flatpak; then + flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo || log_warn "Could not add Flathub remote." + log_success "Flathub repository enabled." +else + log_warn "flatpak command not found. Skipping Flatpak installation." +fi + +# 2. Install Flatpaks from config/packages/06-flatpaks.list +FLATPAK_LIST="$SCRIPT_DIR/config/packages/06-flatpaks.list" +if command_exists flatpak && [[ -f "$FLATPAK_LIST" ]]; then + log_substep "Installing Flatpak applications from $FLATPAK_LIST..." + while IFS= read -r app_id || [[ -n "$app_id" ]]; do + app_id="$(echo "$app_id" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" + [[ -z "$app_id" || "$app_id" =~ ^# ]] && continue + log_info "Installing Flatpak: $app_id" + flatpak install -y flathub "$app_id" 2>/dev/null || log_warn "Failed to install Flatpak: $app_id" + done < "$FLATPAK_LIST" +fi + +log_success "Stage 08: Flatpaks and Flathub repository setup completed successfully!" diff --git a/stages/08-flatpaks-apps.sh b/stages/09-apps.sh similarity index 67% rename from stages/08-flatpaks-apps.sh rename to stages/09-apps.sh index 1165b7a..7e6e55d 100755 --- a/stages/08-flatpaks-apps.sh +++ b/stages/09-apps.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # ============================================================================== -# stages/08-flatpaks-apps.sh - Flathub setup, Flatpaks, Spotify, Waydroid, OpenDeck & MIME associations +# stages/09-apps.sh - Spotify, Waydroid, OpenDeck, custom desktop apps & MIME associations # ============================================================================== set -euo pipefail @@ -11,34 +11,13 @@ source "$SCRIPT_DIR/lib/apt.sh" setup_err_trap -log_step "Running Stage 08: Flatpaks, Additional Apps & MIME Associations" +log_step "Running Stage 09: Standalone Applications, Integrations & MIME Associations" require_root TARGET_USER="$(get_target_user)" -# 1. Flathub Repository Setup -log_substep "Configuring Flathub remote repository..." -if command_exists flatpak; then - flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo || log_warn "Could not add Flathub remote." - log_success "Flathub repository enabled." -else - log_warn "flatpak command not found. Skipping Flatpak installation." -fi - -# 2. Install Flatpaks from config/packages/06-flatpaks.list -FLATPAK_LIST="$SCRIPT_DIR/config/packages/06-flatpaks.list" -if command_exists flatpak && [[ -f "$FLATPAK_LIST" ]]; then - log_substep "Installing Flatpak applications from $FLATPAK_LIST..." - while IFS= read -r app_id || [[ -n "$app_id" ]]; do - app_id="$(echo "$app_id" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" - [[ -z "$app_id" || "$app_id" =~ ^# ]] && continue - log_info "Installing Flatpak: $app_id" - flatpak install -y flathub "$app_id" 2>/dev/null || log_warn "Failed to install Flatpak: $app_id" - done < "$FLATPAK_LIST" -fi - -# 3. Spotify Client Installation (Debian APT repo) +# 1. Spotify Client Installation (Debian APT repo) log_substep "Configuring Spotify repository and client..." if apt_add_keyring_from_url "https://download.spotify.com/debian/pubkey_5384CE82BA52C83A.asc" "spotify.gpg"; then cat < /etc/apt/sources.list.d/spotify.sources @@ -53,14 +32,14 @@ EOF DEBIAN_FRONTEND=noninteractive apt-get install -y spotify-client 2>/dev/null || log_warn "Could not install spotify-client via APT." fi -# 4. Deploy Custom Desktop Applications +# 2. Deploy Custom Desktop Applications if [[ -d "$SCRIPT_DIR/data/usr/share/applications" ]]; then log_substep "Deploying custom desktop entries..." mkdir -p /usr/share/applications cp -r "$SCRIPT_DIR"/data/usr/share/applications/* /usr/share/applications/ 2>/dev/null || true fi -# 5. Waydroid Container Setup +# 3. Waydroid Container Setup log_substep "Checking Waydroid installation..." if ! command_exists waydroid; then log_info "Installing Waydroid repository and package..." @@ -73,7 +52,7 @@ if command_exists systemctl && command_exists waydroid; then log_success "Waydroid container service enabled." fi -# 6. OpenDeck Installation +# 4. OpenDeck Installation log_substep "Installing / Updating OpenDeck..." if curl -sSL https://raw.githubusercontent.com/nekename/OpenDeck/main/install_opendeck.sh | bash; then log_success "OpenDeck installation completed." @@ -81,7 +60,7 @@ else log_warn "OpenDeck installation script returned a non-zero exit code." fi -# 7. Set Default Desktop MIME Types for Target User +# 5. Set Default Desktop MIME Types for Target User log_substep "Setting default XDG MIME handlers for $TARGET_USER..." run_as_target_user xdg-mime default org.gnome.Loupe.desktop image/jpeg 2>/dev/null || true run_as_target_user xdg-mime default org.gnome.Loupe.desktop image/png 2>/dev/null || true @@ -94,4 +73,4 @@ run_as_target_user xdg-mime default org.gnome.TextEditor.desktop text/x-log 2>/d run_as_target_user xdg-mime default org.gnome.TextEditor.desktop text/markdown 2>/dev/null || true run_as_target_user xdg-mime default eu.betterbird.Betterbird.desktop x-scheme-handler/mailto 2>/dev/null || true -log_success "Stage 08: Flatpaks, Applications and MIME associations completed successfully!" +log_success "Stage 09: Standalone Applications, Integrations and MIME associations completed successfully!" diff --git a/stages/09-hyprland.sh b/stages/10-hyprland.sh old mode 100644 new mode 100755 similarity index 94% rename from stages/09-hyprland.sh rename to stages/10-hyprland.sh index e3e84d3..ed5d80f --- a/stages/09-hyprland.sh +++ b/stages/10-hyprland.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # ============================================================================== -# stages/09-hyprland.sh - LinuxBeginnings Debian-Hyprland auto-installer & desktop setup +# stages/10-hyprland.sh - LinuxBeginnings Debian-Hyprland auto-installer & desktop setup # ============================================================================== set -euo pipefail @@ -11,7 +11,7 @@ source "$SCRIPT_DIR/lib/utils.sh" setup_err_trap -log_step "Running Stage 09: Hyprland Desktop (LinuxBeginnings Debian-Hyprland Installer)" +log_step "Running Stage 10: Hyprland Desktop (LinuxBeginnings Debian-Hyprland Installer)" require_root @@ -68,4 +68,4 @@ log_success "Rudimentary Hyprland configuration deployed:" log_info " - SUPER+ENTER: Kitty Terminal" log_info " - SUPER+Q: Close Active Window" log_info " - Login Prompt: Asks user after login to choose Dotfiles setup & installs JetBrains Junie CLI + AwesomeJunieSkills" -log_success "Stage 09: Hyprland Desktop installation & configuration completed successfully!" +log_success "Stage 10: Hyprland Desktop installation & configuration completed successfully!"