add Debian 11 support

- Created dedicated modules/bullseye/` folder for legacy isolation (Debian 11 support).
- Implemented 4-block inclusive PCI range detection for Nvidia Kepler/Fermi to prevent black screens.
- Centralized system time verification checking against year 2026 before APT execution.
- Cleaned and purged modern package lists for the Bullseye extra software module.
- Updated main menu with conditional sourcing and fixed Option 7 (Gaming Lite) for Bullseye.
- Updated README.md with explicit TUI navigation instructions and full repository directory tree mapping.
This commit is contained in:
stornic56
2026-06-11 17:22:11 -05:00
committed by GitHub
parent ba72875960
commit 656f045163
10 changed files with 963 additions and 70 deletions
+475
View File
@@ -0,0 +1,475 @@
#!/usr/bin/env bash
# extras.sh — Bullseye: software purgado / solo repos oficiales
# License GPL v3
# ── Essential Pack (Bullseye) ──
_quick_install_bullseye() {
_msg "Essential Pack — Bullseye" \
"Instalar programas básicos:\n\n\
- Compression (zip, unrar, p7zip-full)\n\
- System tools (htop, inxi, neofetch, bpytop)\n\
- VLC media player\n\
- Microsoft fonts" 13 60
local quick_pkgs=(
zip unzip rar unrar p7zip-full p7zip-rar
neofetch bpytop htop inxi vlc
ttf-mscorefonts-installer
)
_run_install_batch "${quick_pkgs[@]}"
echo -e "${GREEN}Essential Pack installed.${NC}"
}
# ── Firmware (Bullseye) ──
install_firmware_bullseye() {
echo -e "${YELLOW}Installing firmware-linux-nonfree (Bullseye)...${NC}"
if is_installed "firmware-linux-nonfree"; then
echo "firmware-linux-nonfree already installed."
return
fi
local fw_ver
fw_ver=$(apt-cache policy firmware-linux-nonfree 2>/dev/null | awk 'NR==3 {print $2; exit}')
if _confirm "Firmware" \
"firmware-linux-nonfree proporciona drivers para:\n\
WiFi, Bluetooth, GPU, audio, webcams, etc.\n\n\
Version: ${fw_ver:-unknown}\n\n\
Instalar?"; then
_run_cmd "Firmware" "sudo apt install -y firmware-linux-nonfree" \
"Installing firmware-linux-nonfree..."
echo -e "${GREEN}Firmware installed.${NC}"
fi
}
# ======================================================================
# EXTRA SOFTWARE CATEGORIES — Bullseye versions (purged/whitelisted)
# Only packages available in Debian 11 official repos.
# ======================================================================
_cat_customization_bullseye() {
local items=()
if [ -f "${MODULES_DIR}/extras/themes/icons/icons.sh" ]; then
local TUI_ANCHO_REFORZADO=$((TUI_ANCHO + 6))
local sub
sub=$(whiptail --title "Customization (Bullseye)" --menu \
"Select type:" $TUI_ALTO $TUI_ANCHO_REFORZADO $TUI_ALTO_LISTA \
"1" "Desktop Themes (GTK/KDE)" \
"2" "Icon Themes" \
"3" "Cursor Themes" \
"4" "Fonts" \
3>&1 1>&2 2>&3)
[ -z "$sub" ] && return
case $sub in
1) _cat_themes_bullseye ;;
2) _cat_icons_bullseye ;;
3) _cat_cursors_bullseye ;;
4) _cat_fonts_bullseye ;;
esac
else
_msg "Customization" "Themes submodules not found." 8 50
fi
}
_cat_themes_bullseye() {
local theme_state; theme_state=$(_state "breeze")
local numix_state; numix_state=$(_state "numix-gtk-theme")
if [ "$theme_state" = "OFF" ] && [ "$numix_state" = "OFF" ]; then
theme_state="ON"
fi
local choices
choices=$(whiptail --title "Desktop Themes (Bullseye)" --checklist \
"Available themes in Bullseye repos ($TUI_ALTO linea):" \
$TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"breeze" "Breeze GTK theme (KDE)$(_inst breeze)" "$theme_state" \
"numix-gtk-theme" "Numix GTK theme$(_inst numix-gtk-theme)" "$numix_state" \
3>&1 1>&2 2>&3)
clear
[ -z "$choices" ] && return
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
! is_installed "$pkg" && _run_install "$pkg" || echo "$pkg already installed."
done
echo -e "${GREEN}Desktop themes installed.${NC}"
}
_cat_icons_bullseye() {
_msg "Icon Themes (Bullseye)" \
"Adwaita, Humanity, DMZ y otros temas de iconos\n\
están disponibles desde los repos oficiales.\n\n\
Seleccione desde el menú de GNOME/KDE o instale\n\
el paquete 'gnome-icon-theme' o 'breeze-icon-theme'." 12 60
local choices
choices=$(whiptail --title "Icon Themes (Bullseye)" --checklist \
"Available icon themes:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"gnome-icon-theme" "GNOME icon theme$(_inst gnome-icon-theme)" "$(_state gnome-icon-theme)" \
"breeze-icon-theme" "Breeze icon theme$(_inst breeze-icon-theme)" "$(_state breeze-icon-theme)" \
"papirus-icon-theme" "Papirus icon theme$(_inst papirus-icon-theme)" "$(_state papirus-icon-theme)" \
3>&1 1>&2 2>&3)
clear
[ -z "$choices" ] && return
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
! is_installed "$pkg" && _run_install "$pkg" || echo "$pkg already installed."
done
echo -e "${GREEN}Icon themes installed.${NC}"
}
_cat_cursors_bullseye() {
local choices
choices=$(whiptail --title "Cursor Themes (Bullseye)" --checklist \
"Available cursor themes:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"dmz-cursor-theme" "DMZ cursor theme$(_inst dmz-cursor-theme)" "$(_state dmz-cursor-theme)" \
"breeze-cursor-theme" "Breeze cursor theme$(_inst breeze-cursor-theme)" "$(_state breeze-cursor-theme)" \
"oxygen-cursor-theme" "Oxygen cursor theme$(_inst oxygen-cursor-theme)" "$(_state oxygen-cursor-theme)" \
3>&1 1>&2 2>&3)
clear
[ -z "$choices" ] && return
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
! is_installed "$pkg" && _run_install "$pkg" || echo "$pkg already installed."
done
echo -e "${GREEN}Cursor themes installed.${NC}"
}
_cat_fonts_bullseye() {
local choices
choices=$(whiptail --title "Fonts (Bullseye)" --checklist \
"Available fonts:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"fonts-firacode" "Fira Code monospace font$(_inst fonts-firacode)" "$(_state fonts-firacode)" \
"fonts-noto" "Noto fonts (Google)$(_inst fonts-noto)" "$(_state fonts-noto)" \
"fonts-dejavu-core" "DejaVu core fonts$(_inst fonts-dejavu-core)" "$(_state fonts-dejavu-core)" \
"ttf-mscorefonts-installer" "Microsoft Core Fonts$(_inst ttf-mscorefonts-installer)" "$(_state ttf-mscorefonts-installer)" \
3>&1 1>&2 2>&3)
clear
[ -z "$choices" ] && return
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
! is_installed "$pkg" && _run_install "$pkg" || echo "$pkg already installed."
done
echo -e "${GREEN}Fonts installed.${NC}"
}
_cat_download_bullseye() {
local choices
choices=$(whiptail --title "Download & Torrent (Bullseye)" --checklist \
"Select download tools:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"aria2" "Multiprotocol downloader (CLI)$(_inst aria2)" "$(_state aria2)" \
"filezilla" "FTP/SFTP client (GUI)$(_inst filezilla)" "$(_state filezilla)" \
"qbittorrent" "BitTorrent client (Qt)$(_inst qbittorrent)" "$(_state qbittorrent)" \
"transmission-gtk" "BitTorrent client (GTK)$(_inst transmission-gtk)" "$(_state transmission-gtk)" \
"transmission-qt" "BitTorrent client (Qt)$(_inst transmission-qt)" "$(_state transmission-qt)" \
"deluge" "BitTorrent client (GTK)$(_inst deluge)" "$(_state deluge)" \
3>&1 1>&2 2>&3)
clear
[ -z "$choices" ] && return
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
if ! is_installed "$pkg"; then
_run_install "$pkg"
else
echo "$pkg already installed."
fi
done
echo -e "${GREEN}Download tools installed.${NC}"
}
_cat_internet_bullseye() {
local ff_state; ff_state=$(_state "firefox-esr")
local tbird_state; tbird_state=$(_state "thunderbird")
local chr_state; chr_state=$(_state "chromium")
local choices
choices=$(whiptail --title "Internet (Bullseye)" --checklist \
"Select browsers, email:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"firefox-esr" "Firefox ESR (official Debian)$(_inst firefox-esr)" "$ff_state" \
"chromium" "Chromium web browser$(_inst chromium)" "$chr_state" \
"thunderbird" "Email client$(_inst thunderbird)" "$tbird_state" \
"dillo" "Lightweight graphical browser$(_inst dillo)" "$(_state dillo)" \
"elinks" "Text-mode web browser$(_inst elinks)" "$(_state elinks)" \
"konqueror" "KDE file manager / web browser$(_inst konqueror)" "$(_state konqueror)" \
"w3m" "Text-mode browser + deps$(_inst w3m)" "$(_state w3m)" \
"torbrowser-launcher" "Tor Browser launcher$(_inst torbrowser-launcher)" "$(_state torbrowser-launcher)" \
3>&1 1>&2 2>&3)
clear
[ -z "$choices" ] && return
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
if ! is_installed "$pkg"; then
_run_install "$pkg"
else
echo "$pkg already installed."
fi
done
echo -e "${GREEN}Internet tools installed.${NC}"
}
_cat_players_bullseye() {
local choices
choices=$(whiptail --title "Media Players (Bullseye)" --checklist \
"Select media players:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"mpv" "Lightweight media player$(_inst mpv)" "$(_state mpv)" \
"vlc" "VLC media player$(_inst vlc)" "$(_state vlc)" \
3>&1 1>&2 2>&3)
clear
[ -z "$choices" ] && return
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
if ! is_installed "$pkg"; then
_run_install "$pkg"
else
echo "$pkg already installed."
fi
done
echo -e "${GREEN}Media players installed.${NC}"
}
_cat_design_bullseye() {
local choices
choices=$(whiptail --title "Multimedia & Design (Bullseye)" --checklist \
"Select multimedia and design tools:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"audacity" "Audio editor/recorder$(_inst audacity)" "$(_state audacity)" \
"blender" "3D modeling/animation suite$(_inst blender)" "$(_state blender)" \
"ffmpeg" "Multimedia framework (CLI)$(_inst ffmpeg)" "$(_state ffmpeg)" \
"gimp" "Image editor$(_inst gimp)" "$(_state gimp)" \
"inkscape" "Vector graphics editor$(_inst inkscape)" "$(_state inkscape)" \
"kdenlive" "Video editor (KDE)$(_inst kdenlive)" "$(_state kdenlive)" \
"obs-studio" "Streaming/recording studio$(_inst obs-studio)" "$(_state obs-studio)" \
"scribus" "Desktop publishing$(_inst scribus)" "$(_state scribus)" \
3>&1 1>&2 2>&3)
clear
[ -z "$choices" ] && return
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
if ! is_installed "$pkg"; then
_run_install "$pkg"
else
echo "$pkg already installed."
fi
done
echo -e "${GREEN}Design tools installed.${NC}"
}
_cat_programming_bullseye() {
local choices
choices=$(whiptail --title "Programming (Bullseye)" --checklist \
"Select programming tools:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"build-essential" "GCC/Clang compilers$(_inst build-essential)" "$(_state build-essential)" \
"python3" "Python 3 interpreter$(_inst python3)" "$(_state python3)" \
"python3-pip" "Python 3 package manager$(_inst python3-pip)" "$(_state python3-pip)" \
"nodejs" "Node.js (Debian repo)$(_inst nodejs)" "$(_state nodejs)" \
"npm" "Node.js package manager$(_inst npm)" "$(_state npm)" \
"openjdk-17-jdk" "OpenJDK 17 JDK$(_inst openjdk-17-jdk)" "$(_state openjdk-17-jdk)" \
"git" "Version control system$(_inst git)" "$(_state git)" \
"vim" "Text editor (Vim)$(_inst vim)" "$(_state vim)" \
"nano" "Text editor (Nano)$(_inst nano)" "$(_state nano)" \
"geany" "Lightweight IDE$(_inst geany)" "$(_state geany)" \
"codeblocks" "Cross-platform IDE$(_inst codeblocks)" "$(_state codeblocks)" \
3>&1 1>&2 2>&3)
clear
[ -z "$choices" ] && return
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
if ! is_installed "$pkg"; then
_run_install "$pkg"
else
echo "$pkg already installed."
fi
done
echo -e "${GREEN}Programming tools installed.${NC}"
}
_cat_security_bullseye() {
local choices
choices=$(whiptail --title "Security & Networking (Bullseye)" --checklist \
"Select security tools:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"nmap" "Network scanner$(_inst nmap)" "$(_state nmap)" \
"wireshark" "Packet analyzer$(_inst wireshark)" "$(_state wireshark)" \
"nikto" "Web server scanner$(_inst nikto)" "$(_state nikto)" \
"sqlmap" "SQL injection tool$(_inst sqlmap)" "$(_state sqlmap)" \
"gobuster" "Directory/file brute-forcer$(_inst gobuster)" "$(_state gobuster)" \
"hydra" "Login cracker$(_inst hydra)" "$(_state hydra)" \
"john" "John the Ripper password cracker$(_inst john)" "$(_state john)" \
"aircrack-ng" "Wireless security tool$(_inst aircrack-ng)" "$(_state aircrack-ng)" \
3>&1 1>&2 2>&3)
clear
[ -z "$choices" ] && return
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
if ! is_installed "$pkg"; then
_run_install "$pkg"
else
echo "$pkg already installed."
fi
done
echo -e "${GREEN}Security tools installed.${NC}"
}
_cat_general_bullseye() {
local choices
choices=$(whiptail --title "System Tools (Bullseye)" --checklist \
"Select system utilities:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"compress" "Compression tools (zip, unrar, p7zip)$(_inst zip)" "$(_state zip)" \
"conky" "System monitor for desktop$(_inst conky)" "$(_state conky)" \
"cpu-x" "CPU-X (alternative to CPU-Z)$(_inst cpu-x)" "$(_state cpu-x)" \
"curl-wget" "HTTP transfer tools (curl, wget)$(_inst curl)" "$(_state curl)" \
"flatpak" "Flatpak sandbox (Bullseye native)$(_inst flatpak)" "$(_state flatpak)" \
"fwupd" "Firmware update daemon$(_inst fwupd)" "$(_state fwupd)" \
"gnome-disk-utility" "Disk management GUI$(_inst gnome-disk-utility)" "$(_state gnome-disk-utility)" \
"gparted" "Partition editor$(_inst gparted)" "$(_state gparted)" \
"htop" "Interactive process viewer$(_inst htop)" "$(_state htop)" \
"inxi" "System information tool$(_inst inxi)" "$(_state inxi)" \
"kvm" "QEMU/KVM virtualization$(_inst virt-manager)" "$(_state virt-manager)" \
"lshw" "List hardware details$(_inst lshw)" "$(_state lshw)" \
"mc" "Midnight Commander$(_inst mc)" "$(_state mc)" \
"ncdu" "Disk usage analyzer$(_inst ncdu)" "$(_state ncdu)" \
"psensor" "Temperature monitor$(_inst psensor)" "$(_state psensor)" \
"timeshift" "System restore snapshots$(_inst timeshift)" "$(_state timeshift)" \
"tmux" "Terminal multiplexer$(_inst tmux)" "$(_state tmux)" \
"wine" "Windows compatibility layer$(_inst wine)" "$(_state wine)" \
3>&1 1>&2 2>&3)
clear
[ -z "$choices" ] && return
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
case $pkg in
compress)
local need=()
! is_installed "zip" && need+=("zip")
! is_installed "unzip" && need+=("unzip")
! is_installed "rar" && need+=("rar")
! is_installed "unrar" && need+=("unrar")
! is_installed "p7zip-full" && need+=("p7zip-full")
! is_installed "p7zip-rar" && need+=("p7zip-rar")
if [ ${#need[@]} -gt 0 ]; then
_run_install_batch "${need[@]}"
fi
;;
curl-wget)
local need=()
! is_installed "curl" && need+=("curl")
! is_installed "wget" && need+=("wget")
[ ${#need[@]} -gt 0 ] && _run_install_batch "${need[@]}" || echo "Already installed."
;;
kvm)
if ! is_installed "virt-manager"; then
_run_cmd "KVM" "sudo apt install -y qemu-system-x86 qemu-utils libvirt-daemon-system libvirt-clients bridge-utils virt-manager" "Installing KVM..."
sudo adduser "$USER" libvirt 2>/dev/null || true
sudo adduser "$USER" kvm 2>/dev/null || true
else
echo "QEMU/KVM already installed."
fi
;;
flatpak)
if ! is_installed "flatpak"; then
_run_cmd "Flatpak" "sudo apt install -y flatpak" "Installing Flatpak..."
flatpak remote-add --if-not-exists flathub \
https://dl.flathub.org/repo/flathub.flatpakrepo
echo -e "${GREEN}Flatpak + Flathub installed.${NC}"
else
echo "Flatpak already installed."
fi
;;
wine)
if ! is_installed "wine"; then
if ! dpkg --print-foreign-architectures 2>/dev/null | grep -q i386; then
sudo dpkg --add-architecture i386
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
fi
_run_cmd "Wine" "sudo apt install -y wine wine32 wine64 libwine libwine:i386 fonts-wine" "Installing Wine..."
echo -e "${GREEN}Wine installed.${NC}"
else
echo "Wine already installed."
fi
;;
fwupd)
if ! is_installed "fwupd"; then
_run_cmd "fwupd" "sudo apt install -y fwupd" "Installing fwupd..."
fi
if _confirm "Firmware Scan" "Scan for firmware updates now?"; then
sudo fwupdmgr refresh --force 2>/dev/null || true
sudo fwupdmgr get-updates 2>&1 || true
fi
;;
*)
if ! is_installed "$pkg"; then
_run_install "$pkg"
else
echo "$pkg already installed."
fi
;;
esac
done
echo -e "${GREEN}System tools installed.${NC}"
}
_cat_fetch_bullseye() {
local items=(
"neofetch" "System info fetcher$(_inst neofetch)" "$(_state neofetch)"
"screenfetch" "System info (BSD/Linux)$(_inst screenfetch)" "$(_state screenfetch)"
"linuxlogo" "Linux logo + system info$(_inst linuxlogo)" "$(_state linuxlogo)"
)
local TUI_ANCHO_REFORZADO=$((TUI_ANCHO + 6))
local choices
choices=$(whiptail --title "Fetch Tools (Bullseye)" --checklist \
"Select system info tools:" $TUI_ALTO $TUI_ANCHO_REFORZADO $TUI_ALTO_LISTA \
"${items[@]}" 3>&1 1>&2 2>&3)
clear
[ -z "$choices" ] && return
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
if ! is_installed "$pkg"; then
_run_install "$pkg"
else
echo "$pkg already installed."
fi
done
echo -e "${GREEN}Fetch tools installed.${NC}"
}
# ======================================================================
# master installer — replaces install_extras() on Bullseye
# ======================================================================
install_extras_bullseye() {
echo -e "${YELLOW}Extra software — Bullseye mode (official repos only).${NC}"
while true; do
local cat_choice
cat_choice=$(whiptail --title "Extra Software — Bullseye" --menu \
"Select a category:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"0" "Essential Pack" \
"1" "Customization System" \
"2" "Download & Network" \
"3" "Internet (Browsers, Email)" \
"4" "Media Players" \
"5" "Multimedia & Design" \
"6" "Programming Applications" \
"7" "Security & Networking" \
"8" "System Tools" \
"9" "Fetch / System Info" \
"10" "Back to main menu" \
3>&1 1>&2 2>&3)
[ -z "$cat_choice" ] && return
clear
case "$cat_choice" in
0) _quick_install_bullseye ;;
1) _cat_customization_bullseye ;;
2) _cat_download_bullseye ;;
3) _cat_internet_bullseye ;;
4) _cat_players_bullseye ;;
5) _cat_design_bullseye ;;
6) _cat_programming_bullseye ;;
7) _cat_security_bullseye ;;
8) _cat_general_bullseye ;;
9) _cat_fetch_bullseye ;;
10) return ;;
esac
clear
done
}
+214
View File
@@ -0,0 +1,214 @@
#!/usr/bin/env bash
# legacy.sh — Bullseye: hardware detection, NVIDIA legacy drivers, lightweight gaming
# License GPL v3
BULLSEYE_USE_ARCHIVE=false
BULLSEYE_USE_ARCHIVE_CHECKED=false
check_bullseye_archive_phase() {
$BULLSEYE_USE_ARCHIVE_CHECKED && return
BULLSEYE_USE_ARCHIVE_CHECKED=true
local current_year
local current_month
current_year=$(date +%Y)
current_month=$(date +%-m)
if [ "$current_year" -gt 2026 ] || \
{ [ "$current_year" -eq 2026 ] && [ "$current_month" -ge 9 ]; }; then
BULLSEYE_USE_ARCHIVE=true
fi
if $BULLSEYE_USE_ARCHIVE; then
_msg "Debian 11 — Archive Phase" \
"Bullseye LTS support ended on 31 Aug 2026.\n\n\
The script will use archive.debian.org mirrors.\n\
No security updates will be available." 12 60
fi
}
# ---------------------------------------------------------------------------
# Fermi PCI ID detection — 6 condiciones inclusivas
# ---------------------------------------------------------------------------
is_nvidia_fermi() {
local dev_id
dev_id=$(lspci -nn | grep -iE "VGA|3D" | grep -i nvidia | \
grep -oP '10de:\K[0-9a-fA-F]+' | head -n1)
[ -z "$dev_id" ] && { echo false; return; }
local dev_int
dev_int=$((16#${dev_id,,}))
if [ "$dev_int" -ge $((16#06C0)) ] && [ "$dev_int" -le $((16#06DF)) ]; then echo true; return; fi
if [ "$dev_int" -ge $((16#0DC0)) ] && [ "$dev_int" -le $((16#0DFF)) ]; then echo true; return; fi
if [ "$dev_int" -ge $((16#0DE0)) ] && [ "$dev_int" -le $((16#0DFF)) ]; then echo true; return; fi
if [ "$dev_int" -ge $((16#0E00)) ] && [ "$dev_int" -le $((16#0E1F)) ]; then echo true; return; fi
if [ "$dev_int" -ge $((16#1080)) ] && [ "$dev_int" -le $((16#10DF)) ]; then echo true; return; fi
if [ "$dev_int" -eq $((16#1201)) ]; then echo true; return; fi
echo false
}
# ---------------------------------------------------------------------------
# NVIDIA driver installer for Bullseye (Kepler → 470, Fermi → 390)
# ---------------------------------------------------------------------------
install_nvidia_bullseye() {
echo -e "${YELLOW}NVIDIA GPU detected (Bullseye mode).${NC}"
local is_fermi; is_fermi=$(is_nvidia_fermi)
local nv_pkg=""
local gpu_gen=""
if [ "$is_fermi" = "true" ]; then
nv_pkg="nvidia-legacy-390xx-driver"
gpu_gen="Fermi"
else
# Bullseye: cualquier otra NVIDIA (Kepler incl.) → nvidia-driver (470)
nv_pkg="nvidia-driver"
gpu_gen="NVIDIA"
fi
local nv_ver
nv_ver=$(apt-cache policy "$nv_pkg" 2>/dev/null | awk 'NR==3 {print $2; exit}')
local msg="Source: Debian Bullseye Stable\n"
msg+="Driver: ${gpu_gen}${nv_pkg} ${nv_ver:-unknown}\n"
msg+="[+] firmware-misc-nonfree\n"
msg+="[+] nvidia-settings\n\n"
msg+="Instalar driver NVIDIA?"
if ! _confirm "NVIDIA — Bullseye" "$msg" 14 70; then
echo "Omitiendo driver NVIDIA."
NVIDIA_DRIVER_MODE=""
return 0
fi
_run_cmd "NVIDIA" \
"sudo apt install -y $nv_pkg firmware-misc-nonfree nvidia-settings" \
"Instalando driver NVIDIA ${gpu_gen}..."
local i386_active=false
dpkg --print-foreign-architectures | grep -q i386 && i386_active=true
if $i386_active; then
local nv32_pkg="${nv_pkg}:i386"
local nv32_ver
nv32_ver=$(apt-cache policy "$nv32_pkg" 2>/dev/null | awk 'NR==3 {print $2; exit}')
if [ -n "$nv32_ver" ] && [ "$nv32_ver" != "(none)" ]; then
echo "Instalando compatibilidad 32-bit para ${nv_pkg}..."
_run_cmd "NVIDIA 32-bit" "sudo apt install -y $nv32_pkg" \
"Instalando librerías NVIDIA 32-bit..."
else
echo "No hay paquete 32-bit disponible para ${nv_pkg} en Bullseye."
fi
fi
NVIDIA_DRIVER_MODE="stable"
echo -e "${GREEN}Driver NVIDIA ${nv_pkg} instalado. Requiere reinicio.${NC}"
}
# ---------------------------------------------------------------------------
# Lightweight Gaming for Bullseye — sin Steam, sin Heroic
# 32-bit Mesa/NVIDIA + gamemode + mangohud + goverlay + lutris
# ---------------------------------------------------------------------------
install_gaming_bullseye() {
echo -e "${YELLOW}Lightweight Gaming (Bullseye mode).${NC}"
local enable_32bit=false
if _confirm "32-bit Support" \
"Habilitar arquitectura i386 para juegos?\n\n\
Requieren los juegos nativos de 32 bits y ciertas\n\
bibliotecas de emulación."; then
enable_32bit=true
fi
if $enable_32bit; then
echo "Activando soporte multiarquitectura i386..."
if ! dpkg --print-foreign-architectures | grep -q i386; then
sudo dpkg --add-architecture i386
fi
_run_cmd "APT Update" "sudo apt update" "Actualizando listas..."
if [ "$GPU_TYPE" = "nvidia" ]; then
local nv32_pkg="nvidia-driver-libs:i386"
local nv32_ver
nv32_ver=$(apt-cache policy "$nv32_pkg" 2>/dev/null | awk 'NR==3 {print $2; exit}')
if [ -n "$nv32_ver" ] && [ "$nv32_ver" != "(none)" ]; then
local msg="Source: Debian Bullseye Stable\n"
msg+="NVIDIA 32-bit Libraries ${nv32_ver}\n\n"
msg+="[+] nvidia-driver-libs:i386"
if _confirm "NVIDIA 32-bit" "$msg" 12 70; then
_run_cmd "32-bit NVIDIA" "sudo apt install -y ${nv32_pkg}" \
"Instalando librerías NVIDIA 32-bit..."
fi
else
echo "nvidia-driver-libs:i386 no disponible en Bullseye."
fi
else
# Mesa 32-bit
local mesa_32=(
"mesa-vulkan-drivers:i386"
"libgl1-mesa-dri:i386"
"libglx-mesa0:i386"
"libegl-mesa0:i386"
"mesa-va-drivers:i386"
)
local ref_ver
ref_ver=$(apt-cache policy "mesa-vulkan-drivers:i386" 2>/dev/null | \
awk 'NR==3 {print $2; exit}')
local comp_line="Components: Vulkan:i386, OpenGL:i386, GLX:i386, EGL:i386, VA-API:i386"
local msg="Mesa 32-bit drivers para gaming.\n\n"
msg+="Source: Debian Bullseye Stable\n"
msg+="Mesa ${ref_ver}\n"
msg+="${comp_line}\n\n"
msg+="Instalar drivers 32-bit?"
if _confirm "Mesa 32-bit" "$msg" 14 70; then
_run_cmd "Mesa 32-bit" "sudo apt install -y ${mesa_32[*]}" \
"Instalando Mesa 32-bit..."
fi
fi
fi
# Gaming tools checklist (sin Steam ni Heroic)
local choices
choices=$(whiptail --title "Gaming Tools — Bullseye" --checklist \
"Select gaming optimization tools:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"gamemode" "Game performance optimization" ON \
"mangohud" "Performance overlay (Vulkan/OpenGL)" ON \
"goverlay" "MangoHud config GUI" ON \
"lutris" "Game launcher/manager" OFF \
3>&1 1>&2 2>&3)
if [ -z "$choices" ]; then
echo "No gaming tools selected."
return
fi
local cleaned
cleaned=$(echo "$choices" | tr -d '"')
for pkg in $cleaned; do
case $pkg in
mangohud)
_run_cmd "MangoHud" "sudo apt install -y mangohud" "Instalando MangoHud..."
if $enable_32bit; then
local mh32_ver
mh32_ver=$(apt-cache policy mangohud:i386 2>/dev/null | \
awk 'NR==3 {print $2; exit}')
if [ -n "$mh32_ver" ] && [ "$mh32_ver" != "(none)" ]; then
_run_cmd "MangoHud" "sudo apt install -y mangohud:i386" \
"Instalando MangoHud 32-bit..."
fi
fi
;;
gamemode) _run_cmd "GameMode" "sudo apt install -y gamemode" "Instalando GameMode..." ;;
goverlay) _run_cmd "GOverlay" "sudo apt install -y goverlay" "Instalando GOverlay..." ;;
lutris) _run_cmd "Lutris" "sudo apt install -y lutris" "Instalando Lutris..." ;;
*) _run_install "$pkg" ;;
esac
done
echo -e "${GREEN}Lightweight gaming setup complete.${NC}"
}
+54
View File
@@ -0,0 +1,54 @@
#!/usr/bin/env bash
# repos.sh — Bullseye: repos clásicos con archive phase
# License GPL v3
configure_repos_bullseye() {
echo -e "${YELLOW}Repository configuration — Debian 11 Bullseye${NC}"
local info="Configuración de repositorios para Debian 11 Bullseye.\n\n"
info+="Se usarán los repositorios oficiales con componentes\n"
info+="main, contrib y non-free (sin non-free-firmware).\n"
info+="No se utiliza formato DEB822.\n"
if $BULLSEYE_USE_ARCHIVE; then
info+="\nModo Archive: Las URLs apuntarán a archive.debian.org\n"
info+="(Bullseye LTS finalizó el 31 Ago 2026)."
fi
_msg "Repositorios — Bullseye" "$info" 12 65
if [ -f /etc/apt/sources.list ]; then
if ! _confirm "Repositorios" "Ya existe /etc/apt/sources.list.\n\nSobrescribir con la configuración de Bullseye?"; then
echo "Manteniendo configuración actual."
return 0
fi
fi
local base_uri="https://deb.debian.org/debian"
local security_uri="https://security.debian.org/debian-security"
if $BULLSEYE_USE_ARCHIVE; then
base_uri="https://archive.debian.org/debian"
security_uri="https://archive.debian.org/debian-security"
fi
local content=""
content="# Oficial Repo\n"
content+="deb ${base_uri} bullseye main contrib non-free\n"
content+="#deb-src ${base_uri} bullseye main contrib non-free\n\n"
content+="# Updates\n"
content+="deb ${base_uri} bullseye-updates main contrib non-free\n"
content+="#deb-src ${base_uri} bullseye-updates main contrib non-free\n\n"
content+="# Security\n"
content+="deb ${security_uri} bullseye-security main contrib non-free\n"
content+="#deb-src ${security_uri} bullseye-security main contrib non-free\n"
echo -e "$content" | sudo tee /etc/apt/sources.list > /dev/null
echo "Actualizando listas de paquetes..."
if sudo apt update; then
echo -e "${GREEN}Repositorios de Debian 11 Bullseye configurados.${NC}"
else
echo -e "${RED}apt update falló. Revise su conexión de red.${NC}"
return 1
fi
}