From be04f0a5159728e38838a26d18679e3efd9f0e1f Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 29 Oct 2025 12:57:04 +0100 Subject: [PATCH] merge brice branch --- _change-icons.sh | 0 firefox.sh | 0 gnome.sh | 0 install_apps.sh | 0 post_install_trixie.sh | 190 ++++++++++++++++++++--------------------- 5 files changed, 95 insertions(+), 95 deletions(-) mode change 100644 => 100755 _change-icons.sh mode change 100644 => 100755 firefox.sh mode change 100644 => 100755 gnome.sh mode change 100644 => 100755 install_apps.sh mode change 100644 => 100755 post_install_trixie.sh diff --git a/_change-icons.sh b/_change-icons.sh old mode 100644 new mode 100755 diff --git a/firefox.sh b/firefox.sh old mode 100644 new mode 100755 diff --git a/gnome.sh b/gnome.sh old mode 100644 new mode 100755 diff --git a/install_apps.sh b/install_apps.sh old mode 100644 new mode 100755 diff --git a/post_install_trixie.sh b/post_install_trixie.sh old mode 100644 new mode 100755 index 625e4ac..96a4c47 --- a/post_install_trixie.sh +++ b/post_install_trixie.sh @@ -1,111 +1,111 @@ #!/bin/bash +source ./install_apps.sh -######################## -## APT CONFIGURATION ## -# Note : passage au format deb822 >> debian.sources -######################## +LOGFILE="$HOME/postinstall.log" +> "$LOGFILE" -sudo cp files/debian.sources /etc/apt/sources.list.d/ -sudo rm /etc/apt/sources.list -sudo apt update +run_step() { + local description="$1" + local command="$2" + + echo -n "$description... " + eval "$command" > /dev/null 2>>"$LOGFILE" + if [ $? -eq 0 ]; then + echo "✅" + else + echo "❌ (voir $LOGFILE)" + fi +} + +################################# +# 🎯 POST-INSTALL DEBIAN 13 # +################################# + +run_step '📦 Configuration des sources APT' " +sudo cp files/debian.sources /etc/apt/sources.list.d/ && +if [ -f /etc/apt/sources.list ]; then + sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup + sudo rm /etc/apt/sources.list +fi +" + + +run_step "🆙 Mise à jour du système" " +sudo apt update && sudo apt upgrade -y +" -################### -## BASE PACKAGES ## -################### -sudo apt install libgettextpo-dev gettext git wget curl build-essential linux-image-amd64 make ttf-mscorefonts-installer rsyslog unzip bash-completion flatpak libxdo3 extrepo -y +# 🧰 BASE TOOLS +run_step "🔧 Installation des outils de base" " +sudo apt install -y libgettextpo-dev gettext git wget curl build-essential linux-image-amd64 make ttf-mscorefonts-installer rsyslog unzip bash-completion flatpak libxdo3 extrepo +" + +run_step "🛒 Ajout du dépôt Flathub" " flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +" -#sudo cp files/extrepo.config.yaml /etc/extrepo/config.yaml -#sudo extrepo enable google_chrome -#sudo apt update -#sudo apt install google-chrome-stable -#sudo extrepo enable firefox -#sudo apt install firefox +# 🌐 DNS +run_step "🌐 Configuration DNS Cloudflare" " +echo -e '[main]\ndns=none' | sudo tee /etc/NetworkManager/conf.d/90-dns-none.conf && +sudo systemctl reload NetworkManager && +sudo sed -i '1,4 s/^/#/' /etc/resolv.conf && +sudo sed -i -e '\$anameserver 1.1.1.2\nameserver 2606:4700:4700::1112' /etc/resolv.conf && +sudo systemctl reload NetworkManager +" -### -## LANG >> FR - - -# Installation de Freetube -# -# -# - - - - -## Firefox via dépôt Mozilla -# -# -# - - - -## Install de Chrome -# -# -# - - - -## Install de Zoom -# -# -# - -## Install d'Element -# -# -# - -## Install de VSCodium -# -# -# - -## WebAppManager >> CAF - - -## Prise en main à distance - - -############################# -## INTERNET ACCESS CONTROL ## -############################# -echo $'[main]\ndns=none' | tee /etc/NetworkManager/conf.d/90-dns-none.conf &>/dev/null -systemctl reload NetworkManager -sudo sed -i '1,4 s/^/#/' /etc/resolv.conf && sed -i -e '$anameserver 1.1.1.2\nnameserver 2606:4700:4700::1112' /etc/resolv.conf -systemctl reload NetworkManager -#cloudflare DNS Anti Malware - - -##################### -# LIBREOFFICE ICONS # -##################### - -# On active 'Colibre' comme jeu d'icônes par défaut -sudo chown $USERNAME:$USERNAME files/registrymodifications.xcu -mkdir -p $HOME/.config/libreoffice/4/user/ && cp files/registrymodifications.xcu $_ - -# On ajoute un modèle dans /etc/skel afin que tout nouvel utilisateur ait Colibre activé par défaut -sudo mkdir -p /etc/skel/.config/libreoffice/4/user/ && sudo cp files/registrymodifications.xcu $_ - -############ -# FIREFOX # -############ +# 🎨 LIBREOFFICE +run_step "🎨 Icônes LibreOffice (Colibre)" " +sudo chown $USER:$USER files/registrymodifications.xcu && +mkdir -p \$HOME/.config/libreoffice/4/user/ && +cp files/registrymodifications.xcu \$HOME/.config/libreoffice/4/user/ && +sudo mkdir -p /etc/skel/.config/libreoffice/4/user/ && +sudo cp files/registrymodifications.xcu /etc/skel/.config/libreoffice/4/user/ +" +# 🦊 FIREFOX +run_step "🦊 Installation de Firefox (script)" " bash firefox.sh +" - -############ -# GNOME # -############ - +# 🖥️ GNOME if whiptail --title "Configuration GNOME" --yesno "Souhaitez-vous configurer GNOME maintenant ?" 10 60; then - echo "🔧 Lancement de gnome.sh..." - bash ./gnome.sh + run_step "🖥️ Configuration de GNOME (script)" " + bash gnome.sh + " else echo "⏭️ Configuration GNOME ignorée." fi + + +############################## +## SELECTION DES LOGICIELS ## +############################## + +CHOIX=$(whiptail --title "Installation de logiciels" --checklist \ +"Choisissez les logiciels à installer :" 20 78 10 \ +"freetube" "FreeTube (YouTube sans pub)" ON \ +"zoom" "Zoom (visioconférence)" OFF \ +"element" "Element (messagerie Matrix)" OFF \ +"chrome" "Google Chrome (navigateur)" OFF \ +"vscodium" "VSCodium (éditeur de code)" ON \ +3>&1 1>&2 2>&3) + +# Nettoyage des guillemets doubles de la sortie de whiptail +CHOIX=$(echo $CHOIX | tr -d '"') + +for APP in $CHOIX; do + case $APP in + freetube) install_freetube ;; + zoom) install_zoom ;; + element) install_element ;; + chrome) install_chrome ;; + vscodium) install_vscodium ;; + *) echo "❓ Logiciel inconnu : $APP" ;; + esac +done + + + +echo -e "\n🎉 Post-installation terminée." +echo "📄 Rapport des erreurs (s'il y en a) : $LOGFILE"