firmware & wireless refactor + extrepo Migration

- 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.
This commit is contained in:
stornic56
2026-06-19 22:32:50 -05:00
committed by GitHub
parent 002a888b46
commit 3e96906d6e
15 changed files with 638 additions and 272 deletions
+13 -24
View File
@@ -1,4 +1,15 @@
# jellyfin.sh — Jellyfin Media Server installation (native repo)
#!/usr/bin/env bash
# jellyfin.sh — Jellyfin Media Server installation (extrepo)
_enable_jellyfin_repo() {
if [ ! -f /etc/apt/sources.list.d/extrepo_jellyfin.sources ]; then
if ! command -v extrepo &>/dev/null; then
_run_cmd "extrepo" "sudo apt install -y extrepo" "Installing extrepo..."
fi
_run_cmd "Jellyfin" "sudo extrepo enable jellyfin" "Enabling Jellyfin repository..."
fi
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
}
install_jellyfin() {
local ver
@@ -8,29 +19,7 @@ install_jellyfin() {
Repository: repo.jellyfin.org/debian
Version: ${ver:-unknown}"; then
# 1. Prerequisites
! is_installed "curl" && _run_install "curl"
! is_installed "gpg" && _run_install "gpg"
sudo install -d -m 0755 /etc/apt/keyrings
# 2. GPG key
echo -e "${GREEN}[+]${NC} Adding Jellyfin GPG key..."
curl -fsSL "https://repo.jellyfin.org/jellyfin_team.gpg.key" \
| sudo gpg --dearmor -o /etc/apt/keyrings/jellyfin.gpg
# 3. Deb822 .sources file
echo -e "${GREEN}[+]${NC} Adding Jellyfin repository..."
sudo tee /etc/apt/sources.list.d/jellyfin.sources > /dev/null << EOF
Types: deb
URIs: https://repo.jellyfin.org/debian
Suites: ${DEBIAN_CODENAME}
Components: main
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/jellyfin.gpg
EOF
# 4. Update + install
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
_enable_jellyfin_repo
_run_cmd "Jellyfin" "sudo DEBIAN_FRONTEND=noninteractive apt install -y jellyfin" "Installing Jellyfin..."
echo -e "${GREEN}Jellyfin Server installed. Web interface available at http://localhost:8096${NC}"
+119 -76
View File
@@ -1,6 +1,78 @@
#!/usr/bin/env bash
# internet.sh — Browsers, email, VPN (was _cat_browsers, now includes riseup-vpn)
# internet.sh — Browsers, email, VPN
# extrepo-powered: mozilla, floorp, palemoon, librewolf, tailscale, mullvad, protonvpn
# ── Helpers extrepo ──
_ensure_extrepo() {
if ! command -v extrepo &>/dev/null; then
_run_cmd "extrepo" "sudo apt install -y extrepo" "Installing extrepo..."
fi
}
_enable_mozilla_repo() {
if [ ! -f /etc/apt/sources.list.d/extrepo_mozilla.sources ]; then
_ensure_extrepo
_run_cmd "Mozilla" "sudo extrepo enable mozilla" "Enabling Mozilla repository..."
fi
if [ ! -f /etc/apt/preferences.d/mozilla ]; then
sudo tee /etc/apt/preferences.d/mozilla > /dev/null << 'EOF'
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
EOF
fi
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
}
_enable_floorp_repo() {
if [ ! -f /etc/apt/sources.list.d/extrepo_floorp.sources ]; then
_ensure_extrepo
_run_cmd "Floorp" "sudo extrepo enable floorp" "Enabling Floorp repository..."
fi
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
}
_enable_palemoon_repo() {
if [ ! -f /etc/apt/sources.list.d/extrepo_palemoon.sources ]; then
_ensure_extrepo
_run_cmd "Pale Moon" "sudo extrepo enable palemoon" "Enabling Pale Moon repository..."
fi
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
}
_enable_librewolf_repo() {
if [ ! -f /etc/apt/sources.list.d/extrepo_librewolf.sources ]; then
_ensure_extrepo
_run_cmd "LibreWolf" "sudo extrepo enable librewolf" "Enabling LibreWolf repository..."
fi
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
}
_enable_tailscale_repo() {
if [ ! -f /etc/apt/sources.list.d/extrepo_tailscale.sources ]; then
_ensure_extrepo
_run_cmd "Tailscale" "sudo extrepo enable tailscale" "Enabling Tailscale repository..."
fi
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
}
_enable_mullvad_repo() {
if [ ! -f /etc/apt/sources.list.d/extrepo_mullvad.sources ]; then
_ensure_extrepo
_run_cmd "Mullvad" "sudo extrepo enable mullvad" "Enabling Mullvad repository..."
fi
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
}
_enable_protonvpn_repo() {
if [ ! -f /etc/apt/sources.list.d/extrepo_protonvpn.sources ]; then
_ensure_extrepo
_run_cmd "ProtonVPN" "sudo extrepo enable protonvpn" "Enabling ProtonVPN repository..."
fi
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
}
# ── Categories ──
_cat_internet() {
local headless=false
_is_headless && headless=true
@@ -16,12 +88,17 @@ _cat_internet() {
local floorp_state; floorp_state=$(_state "floorp")
local konqueror_state; konqueror_state=$(_state "konqueror")
local librewolf_state; librewolf_state=$(_state "librewolf")
local palemoon_state; palemoon_state=$(_state "palemoon")
local privacybrowser_state; privacybrowser_state=$(_state "privacybrowser")
local qutebrowser_state; qutebrowser_state=$(_state "qutebrowser")
local riseupvpn_state; riseupvpn_state=$(_state "riseup-vpn")
local thunderbird_state; thunderbird_state=$(_state "thunderbird")
local torbrowser_state; torbrowser_state=$(_state "torbrowser-launcher")
local w3m_state; w3m_state=$(_state "w3m")
local tailscale_state; tailscale_state=$(_state "tailscale")
local mullvad_state; mullvad_state=$(_state "mullvad-vpn")
local mullvadbrowser_state; mullvadbrowser_state=$(_state "mullvad-browser")
local protonvpn_state; protonvpn_state=$(_state "protonvpn")
local choices
choices=$(whiptail --title "Internet" --checklist \
@@ -32,15 +109,20 @@ _cat_internet() {
"epiphany-browser" "GNOME web browser$(_inst epiphany-browser)" "$epiphany_state" \
"falkon" "KDE web browser (QtWebEngine)$(_inst falkon)" "$falkon_state" \
"firefox" "Firefox from Mozilla (replaces ESR)" "$firefox_state" \
"floorp" "Firefox-based browser (external repo)" "$floorp_state" \
"floorp" "Firefox-based browser (extrepo)$(_inst floorp)" "$floorp_state" \
"konqueror" "KDE file manager / web browser$(_inst konqueror)" "$konqueror_state" \
"librewolf" "Privacy-focused Firefox fork$(_inst librewolf)" "$librewolf_state" \
"librewolf" "Privacy-focused Firefox fork (extrepo)$(_inst librewolf)" "$librewolf_state" \
"palemoon" "Classic Firefox-derived browser (extrepo)" "$palemoon_state" \
"privacybrowser" "Privacy-focused web browser$(_inst privacybrowser)" "$privacybrowser_state" \
"qutebrowser" "Keyboard-driven browser (Qt)$(_inst qutebrowser)" "$qutebrowser_state" \
"riseup-vpn" "Riseup VPN client$(_inst riseup-vpn)" "$riseupvpn_state" \
"riseup-vpn" "Riseup VPN client$(_inst riseup-vpn)" "$riseupvpn_state" \
"thunderbird" "Email client$(_inst thunderbird)" "$thunderbird_state" \
"torbrowser-launcher" "Tor Browser launcher$(_inst torbrowser-launcher)" "$torbrowser_state" \
"w3m" "Text-mode browser + deps (w3m-img)$(_inst w3m)" "$w3m_state" \
"tailscale" "Zero-config VPN & mesh networking$(_inst tailscale)" "$tailscale_state" \
"mullvad-vpn" "Mullvad VPN client (WireGuard)$(_inst mullvad-vpn)" "$mullvad_state" \
"mullvad-browser" "Mullvad privacy browser$(_inst mullvad-browser)" "$mullvadbrowser_state" \
"protonvpn" "ProtonVPN client$(_inst protonvpn)" "$protonvpn_state" \
3>&1 1>&2 2>&3)
clear
@@ -54,38 +136,39 @@ _cat_internet() {
install_firefox_mozilla
;;
floorp)
if ! is_installed "floorp"; then
echo "Setting up Floorp repository..."
! is_installed "curl" && _run_install curl
! is_installed "gpg" && _run_install gpg
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://ppa.floorp.app/KEY.gpg | \
sudo gpg --dearmor -o /usr/share/keyrings/Floorp.gpg
sudo curl -sS --compressed -o /etc/apt/sources.list.d/Floorp.list \
'https://ppa.floorp.app/Floorp.list'
sudo tee /etc/apt/preferences.d/floorp > /dev/null << EOF
Package: *
Pin: origin ppa.floorp.app
Pin-Priority: 1000
EOF
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
_run_install floorp
echo -e "${GREEN}Floorp installed.${NC}"
else
echo "Floorp already installed."
fi
_enable_floorp_repo
_run_install floorp
echo -e "${GREEN}Floorp installed.${NC}"
;;
librewolf)
if ! is_installed "librewolf"; then
echo "Installing LibreWolf..."
install_backports_or_stable extrepo
sudo extrepo enable librewolf 2>/dev/null || true
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
_run_install librewolf
echo -e "${GREEN}LibreWolf installed.${NC}"
else
echo "LibreWolf already installed."
fi
_enable_librewolf_repo
_run_install librewolf
echo -e "${GREEN}LibreWolf installed.${NC}"
;;
palemoon)
_enable_palemoon_repo
_run_install palemoon
echo -e "${GREEN}Pale Moon installed.${NC}"
;;
tailscale)
_enable_tailscale_repo
_run_install tailscale
echo -e "${GREEN}Tailscale installed.${NC}"
;;
mullvad-vpn)
_enable_mullvad_repo
_run_install mullvad-vpn
echo -e "${GREEN}Mullvad VPN installed.${NC}"
;;
mullvad-browser)
_enable_mullvad_repo
_run_install mullvad-browser
echo -e "${GREEN}Mullvad Browser installed.${NC}"
;;
protonvpn)
_enable_protonvpn_repo
_run_install protonvpn
echo -e "${GREEN}ProtonVPN installed.${NC}"
;;
riseup-vpn)
install_backports_or_stable riseup-vpn
@@ -125,57 +208,17 @@ install_firefox_mozilla() {
return
fi
echo "Setting up Mozilla APT repository for Firefox..."
if is_installed "firefox-esr"; then
if _confirm "Firefox ESR" "Firefox ESR is installed.\nRemove it before installing Mozilla Firefox?"; then
echo "Removing Firefox ESR..."
sudo apt remove -y firefox-esr
else
echo "Keeping Firefox ESR."
return
fi
fi
! is_installed "wget" && _run_install wget
! is_installed "gpg" && _run_install gpg
sudo install -d -m 0755 /etc/apt/keyrings
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | \
sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
local fp
fp=$(gpg -n -q --import --import-options import-show \
/etc/apt/keyrings/packages.mozilla.org.asc 2>/dev/null | \
awk '/pub/{getline; gsub(/^ +| +$/,""); print}')
if [ "$fp" != "35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3" ]; then
echo -e "${YELLOW}Warning: Mozilla key fingerprint does not match expected value.${NC}"
fi
local use_deb822=false
[ -f /etc/apt/sources.list.d/debian.sources ] && use_deb822=true
if $use_deb822; then
sudo tee /etc/apt/sources.list.d/mozilla.sources > /dev/null << EOF
Types: deb
URIs: https://packages.mozilla.org/apt
Suites: mozilla
Components: main
Signed-By: /etc/apt/keyrings/packages.mozilla.org.asc
EOF
else
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | \
sudo tee /etc/apt/sources.list.d/mozilla.list > /dev/null
fi
sudo tee /etc/apt/preferences.d/mozilla > /dev/null << EOF
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
EOF
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
_enable_mozilla_repo
_run_install firefox
echo -e "${GREEN}Firefox (Mozilla) installed.${NC}"
}
+12 -24
View File
@@ -1,28 +1,16 @@
#!/usr/bin/env bash
# java.sh — Adoptium Temurin repository setup and Java version selectors
# java.sh — Adoptium Temurin repository setup (extrepo) and Java version selectors
# License GPL v3
_ensure_adoptium_repo() {
[ -f /etc/apt/sources.list.d/adoptium.list ] && return 0
local deps=()
! is_installed "wget" && deps+=("wget")
! is_installed "apt-transport-https" && deps+=("apt-transport-https")
! is_installed "gpg" && deps+=("gpg")
[ ${#deps[@]} -gt 0 ] && _run_install_batch "${deps[@]}"
wget -qO - "https://packages.adoptium.net/artifactory/api/gpg/key/public" \
| sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/adoptium.gpg 2>/dev/null
local codename
codename=$(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release)
echo "deb https://packages.adoptium.net/artifactory/deb ${codename} main" \
| sudo tee /etc/apt/sources.list.d/adoptium.list > /dev/null
sudo apt update \
-o Dir::Etc::sourcelist=/etc/apt/sources.list.d/adoptium.list \
-o Dir::Etc::sourceparts="-" \
2>/dev/null || true
_enable_temurin_repo() {
if [ -f /etc/apt/sources.list.d/extrepo_temurin.sources ]; then
return 0
fi
if ! command -v extrepo &>/dev/null; then
_run_cmd "extrepo" "sudo apt install -y extrepo" "Installing extrepo..."
fi
_run_cmd "Temurin" "sudo extrepo enable temurin" "Enabling Adoptium Temurin repository..."
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
}
_install_gaming_java() {
@@ -34,7 +22,7 @@ _install_gaming_java() {
"21" "Java 21 — For modern Minecraft >= 1.20.5 & 1.21+" \
3>&1 1>&2 2>&3)
[ -z "$ver" ] && { echo "No Java version selected."; return; }
_ensure_adoptium_repo
_enable_temurin_repo
_run_install "temurin-${ver}-jre"
}
@@ -47,7 +35,7 @@ _install_dev_java() {
"25" "Java 25 LTS Development Kit" \
3>&1 1>&2 2>&3)
[ -z "$ver" ] && { echo "No JDK version selected."; return; }
_ensure_adoptium_repo
_enable_temurin_repo
_run_install "temurin-${ver}-jdk"
}
+87
View File
@@ -0,0 +1,87 @@
#!/usr/bin/env bash
# office.sh — Office & Productivity (OnlyOffice via extrepo, LibreOffice backports)
# License GPL v3
# ── OnlyOffice ──
_enable_onlyoffice_repo() {
if [ ! -f /etc/apt/sources.list.d/extrepo_onlyoffice-desktopeditors.sources ]; then
if ! command -v extrepo &>/dev/null; then
_run_cmd "extrepo" "sudo apt install -y extrepo" "Installing extrepo..."
fi
_run_cmd "OnlyOffice" "sudo extrepo enable onlyoffice-desktopeditors" "Enabling OnlyOffice repository..."
fi
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
}
install_onlyoffice() {
local ver
ver=$(apt-cache policy onlyoffice-desktopeditors 2>/dev/null | awk 'NR==3 {print $2; exit}')
if _confirm "Install: OnlyOffice" "Install OnlyOffice Desktop Editors
Repository: download.onlyoffice.com
Version: ${ver:-unknown}"; then
_enable_onlyoffice_repo
_run_cmd "OnlyOffice" "sudo DEBIAN_FRONTEND=noninteractive apt install -y onlyoffice-desktopeditors" "Installing OnlyOffice..."
echo -e "${GREEN}OnlyOffice installed.${NC}"
fi
}
# ── LibreOffice (backports) ──
install_libreoffice_bpo() {
if [ "$DEBIAN_VERSION" != "12" ] && [ "$DEBIAN_VERSION" != "13" ]; then
_msg "LibreOffice" "LibreOffice backports only available on Debian 12+."
return
fi
local sys_lang
sys_lang=$(echo "${LANG:-en}" | cut -c1-2 | tr '[:upper:]' '[:lower:]')
local lang_pkg=""
if [ "$sys_lang" != "en" ]; then
local candidate="libreoffice-l10n-${sys_lang}"
if apt-cache show "$candidate" &>/dev/null 2>&1; then
lang_pkg="$candidate"
fi
fi
local ver
ver=$(apt-cache policy libreoffice 2>/dev/null | awk 'NR==3 {print $2; exit}')
local bpo_ver
bpo_ver=$(apt-cache madison libreoffice 2>/dev/null | grep "${DEBIAN_CODENAME}-backports" | awk '{print $3}' | head -1)
local msg="Install LibreOffice?\n\n"
msg+=" Stable: ${ver:-unknown}\n"
msg+=" Backports: ${bpo_ver:-unavailable}\n"
[ -n "$lang_pkg" ] && msg+=" Language: ${lang_pkg}\n"
if _confirm "LibreOffice" "$msg"; then
local pkgs="libreoffice${lang_pkg:+ $lang_pkg}"
if [ -n "$bpo_ver" ]; then
_run_cmd "LibreOffice" "sudo apt install -y -t ${DEBIAN_CODENAME}-backports $pkgs" \
"Installing LibreOffice from backports..."
else
_run_cmd "LibreOffice" "sudo apt install -y $pkgs" \
"Installing LibreOffice from stable..."
fi
echo -e "${GREEN}LibreOffice installed.${NC}"
fi
}
_cat_office() {
local choices
choices=$(whiptail --title "Office & Productivity" --checklist \
"Select office applications${SCROLL_HINT}:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"onlyoffice" "OnlyOffice Desktop Editors (extrepo)" OFF \
"libreoffice" "LibreOffice (backports on Bookworm/Trixie)" OFF \
3>&1 1>&2 2>&3)
[ -z "$choices" ] && return
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
case $pkg in
onlyoffice) install_onlyoffice ;;
libreoffice) install_libreoffice_bpo ;;
esac
done
}
+12 -30
View File
@@ -35,7 +35,7 @@ _cat_programming() {
"gedit" "GNOME text editor$(_inst gedit)" "$gedit_state" \
"geany" "Lightweight IDE$(_inst geany)" "$geany_state" \
"gnome-text-editor" "GNOME modern text editor$(_inst gnome-text-editor)" "$gte_state" \
"vscodium" "VS Code open-source (external repo)$(_inst codium)" "$codium_state" \
"vscodium" "VS Code open-source (extrepo)$(_inst codium)" "$codium_state" \
3>&1 1>&2 2>&3)
clear
@@ -65,41 +65,23 @@ _cat_programming() {
echo -e "${GREEN}Programming applications installed.${NC}"
}
_enable_vscodium_repo() {
if [ ! -f /etc/apt/sources.list.d/extrepo_vscodium.sources ]; then
if ! command -v extrepo &>/dev/null; then
_run_cmd "extrepo" "sudo apt install -y extrepo" "Installing extrepo..."
fi
_run_cmd "VSCodium" "sudo extrepo enable vscodium" "Enabling VSCodium repository..."
fi
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
}
install_vscodium() {
if command -v codium &>/dev/null; then
echo "VSCodium is already installed."
return
fi
echo "Setting up VSCodium repository..."
! is_installed "wget" && _run_install wget
! is_installed "gpg" && _run_install gpg
sudo install -d -m 0755 /usr/share/keyrings
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
| gpg --dearmor \
| sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg 2>/dev/null
local use_deb822=false
[ -f /etc/apt/sources.list.d/debian.sources ] && use_deb822=true
if $use_deb822; then
sudo tee /etc/apt/sources.list.d/vscodium.sources > /dev/null << 'EOF'
Types: deb
URIs: https://download.vscodium.com/debs
Suites: vscodium
Components: main
Architectures: amd64 arm64
Signed-by: /usr/share/keyrings/vscodium-archive-keyring.gpg
EOF
else
echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg] https://download.vscodium.com/debs vscodium main" \
| sudo tee /etc/apt/sources.list.d/vscodium.list > /dev/null
fi
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
_enable_vscodium_repo
_run_install codium
echo -e "${GREEN}VSCodium installed.${NC}"