mirror of
https://github.com/stornic56/debianito-post-install.git
synced 2026-07-16 05:49:49 +00:00
3e96906d6e
- Created standalone modules/bluetooth.sh for `_install_bluetooth_stack()` with desktop-aware frontend selection (bluedevil/KDE, blueman/XFCE/other). Extracted from `firmware.sh`, reducing it from 438 to 369 lines. - Added `detect_desktop_environment()` and `detect_audio_server()` functions in `utils.sh` with new globals `DESKTOP_ENV=""` and `AUDIO_SERVER=""`. - New `found_active_wifi` flag detects Qualcomm Atheros AR9485 PCI chips without loaded firmware, displaying `(no driver — install firmware)` instead of silently disappearing. Auto-installs `firmware-atheros + firmware-linux-nonfree` after Firmware & Wireless Setup. - New `is_nvidia_blackwell()` detects GPUs in ranges `0x2900–0x29BF` and `0x2B80–0x31FF`. Added `_enable_cuda_repo()` helper for extrepo-based CUDA installation with APT pinning. DKMS verification blocks added to all `_install_nvidia_*` functions. - Standardized repository enablement across 7 modules using `_enable_*_repo()` helpers: - `internet.sh`: Firefox/Floorp/LibreWolf, Pale Moon, Tailscale, Mullvad VPN/Browser, ProtonVPN - `jellyfin.sh`, `programming.sh` (VSCodium), `java.sh` (Temurin) - New `extras/office/office.sh`: OnlyOffice + LibreOffice with language detection - The main script was reduced from 233 to 137 lines. Created new `modules/sysinfo.sh` (97 lines) for `_show_sysinfo()`. Source chain: `utils.sh → sysinfo.sh → sudo_config.sh → repos → firmware.sh → bluetooth.sh → gpu.sh → kernel.sh → gaming.sh → extras.sh → zram.sh → java.sh`. - Renamed menu to `"Firmware, Wireless & Bluetooth"`. Translated NTP dialog (English), basic programs install message, and NVIDIA 32-bit legacy messages.
138 lines
4.7 KiB
Bash
138 lines
4.7 KiB
Bash
#!/usr/bin/env bash
|
|
# Debianito — simple configurator script
|
|
set -euo pipefail
|
|
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m'
|
|
|
|
# TUI dimensions — fixed centered size for whiptail dialogs
|
|
TUI_ALTO=20
|
|
TUI_ANCHO=78
|
|
TUI_ALTO_LISTA=10
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
MODULES_DIR="${SCRIPT_DIR}/modules"
|
|
|
|
source "${MODULES_DIR}/utils.sh"
|
|
[ -f "${MODULES_DIR}/sysinfo.sh" ] && source "${MODULES_DIR}/sysinfo.sh"
|
|
source "${MODULES_DIR}/sudo_config.sh"
|
|
source "${MODULES_DIR}/repos/repo_detect.sh"
|
|
source "${MODULES_DIR}/repos.sh"
|
|
[ -f "${MODULES_DIR}/firmware.sh" ] && source "${MODULES_DIR}/firmware.sh"
|
|
[ -f "${MODULES_DIR}/bluetooth.sh" ] && source "${MODULES_DIR}/bluetooth.sh"
|
|
[ -f "${MODULES_DIR}/gpu.sh" ] && source "${MODULES_DIR}/gpu.sh"
|
|
[ -f "${MODULES_DIR}/kernel.sh" ] && source "${MODULES_DIR}/kernel.sh"
|
|
[ -f "${MODULES_DIR}/gaming.sh" ] && source "${MODULES_DIR}/gaming.sh"
|
|
[ -f "${MODULES_DIR}/extras.sh" ] && source "${MODULES_DIR}/extras.sh"
|
|
[ -f "${MODULES_DIR}/zram.sh" ] && source "${MODULES_DIR}/zram.sh"
|
|
[ -f "${MODULES_DIR}/extras/java.sh" ] && source "${MODULES_DIR}/extras/java.sh"
|
|
|
|
# ── Bullseye-specific modules (loaded only on Debian 11) ──
|
|
if [ -d "${MODULES_DIR}/bullseye" ]; then
|
|
[ -f "${MODULES_DIR}/bullseye/legacy.sh" ] && source "${MODULES_DIR}/bullseye/legacy.sh"
|
|
[ -f "${MODULES_DIR}/bullseye/repos.sh" ] && source "${MODULES_DIR}/bullseye/repos.sh"
|
|
[ -f "${MODULES_DIR}/bullseye/extras.sh" ] && source "${MODULES_DIR}/bullseye/extras.sh"
|
|
fi
|
|
|
|
REPOS_CONFIGURED=false
|
|
DEBIAN_VERSION=""
|
|
DEBIAN_CODENAME=""
|
|
|
|
main_menu() {
|
|
# Auto-adjust TUI dimensions for small terminals
|
|
if [ "$LINES" -lt $((TUI_ALTO + 6)) ] || [ "$COLUMNS" -lt $((TUI_ANCHO + 6)) ]; then
|
|
TUI_ALTO=$((LINES - 4 > 8 ? LINES - 4 : 8))
|
|
TUI_ANCHO=$((COLUMNS - 4 > 50 ? COLUMNS - 4 : 50))
|
|
TUI_ALTO_LISTA=$((TUI_ALTO - 10 > 4 ? TUI_ALTO - 10 : 4))
|
|
fi
|
|
|
|
while true; do
|
|
local choice
|
|
choice=$(whiptail --title "DEBIANITO — simple configurator script" --menu "" \
|
|
$TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
|
|
"1" "System Info" \
|
|
"2" "User Privileges & Feedback" \
|
|
"3" "Configure repositories" \
|
|
"4" "Firmware, Wireless & Bluetooth" \
|
|
"5" "Graphics Drivers & Mesa Stack" \
|
|
"6" "Backports Kernel" \
|
|
"7" "Gaming Setup" \
|
|
"8" "ZRAM (Swap)" \
|
|
"9" "Install Programs and Software" \
|
|
"10" "Exit" \
|
|
3>&1 1>&2 2>&3)
|
|
|
|
clear
|
|
|
|
case "$choice" in
|
|
1) _show_sysinfo ;;
|
|
2) config_sudo || true ;;
|
|
3)
|
|
if [ "$DEBIAN_VERSION" = "11" ] && type configure_repos_bullseye &>/dev/null; then
|
|
configure_repos_bullseye || true
|
|
else
|
|
configure_repos || true
|
|
fi
|
|
;;
|
|
4)
|
|
if [ "$DEBIAN_VERSION" = "11" ] && type install_firmware_bullseye &>/dev/null; then
|
|
install_firmware_bullseye || true
|
|
else
|
|
install_firmware || true
|
|
fi
|
|
;;
|
|
5) install_gpu_drivers || true ;;
|
|
6)
|
|
if [ "$DEBIAN_VERSION" = "11" ]; then
|
|
_msg "Not Available" \
|
|
"Backports Kernel is not available on Debian 11 Bullseye.\n\n\
|
|
Ultra Minimalist Rescue Mode does not include third-party\n\
|
|
kernels. Use the stable kernel provided by Bullseye." 10 60
|
|
else
|
|
install_kernel_backports || true
|
|
fi
|
|
;;
|
|
7)
|
|
if [ "$DEBIAN_VERSION" = "11" ] && type install_gaming_bullseye &>/dev/null; then
|
|
install_gaming_bullseye || true
|
|
else
|
|
install_gaming || true
|
|
fi
|
|
;;
|
|
8) install_zram || true ;;
|
|
9)
|
|
if [ "$DEBIAN_VERSION" = "11" ] && type install_extras_bullseye &>/dev/null; then
|
|
install_extras_bullseye || true
|
|
else
|
|
install_extras || true
|
|
fi
|
|
;;
|
|
10) echo "Exiting."; exit 0 ;;
|
|
esac
|
|
done
|
|
}
|
|
|
|
check_root
|
|
check_sudo
|
|
check_system_time
|
|
sync_system_time
|
|
|
|
detect_debian_version
|
|
detect_cpu_ram
|
|
detect_kernel
|
|
detect_gpu
|
|
detect_network
|
|
detect_displayserver
|
|
detect_storage
|
|
detect_desktop_environment
|
|
detect_audio_server
|
|
|
|
# ── Bullseye-specific init (archive phase) ──
|
|
if [ "$DEBIAN_VERSION" = "11" ] && type check_bullseye_archive_phase &>/dev/null; then
|
|
check_bullseye_archive_phase
|
|
fi
|
|
|
|
main_menu
|