114 lines
4.0 KiB
Bash
114 lines
4.0 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Bannière
|
|
echo "Wibian Extras" | figlet -f big
|
|
echo -ne "\n"
|
|
|
|
# Vérifie si le script est lancé avec les droits root
|
|
if [[ $EUID -ne 0 ]]; then
|
|
echo "Vous devez avoir les privilèges root pour exécuter le script, utiliser la commande : sudo bash install.sh" 2>&1
|
|
exit 1
|
|
fi
|
|
|
|
username=$(id -u -n 1000)
|
|
builddir=$(pwd)
|
|
|
|
# Mise à jour de la liste des paquets disponibles et mise à jour des paquets installés
|
|
apt update
|
|
apt upgrade -y
|
|
|
|
# Création des répertoires dans l'espace personnel
|
|
mkdir -p /home/$username/Fichiers
|
|
gio set /home/$username/Fichiers/ metadata::custom-icon file:///usr/share/icons/Papirus/48x48/places/folder-applications.svg
|
|
echo file:///home/$username/Fichiers >> /home/$username/.config/gtk-3.0/bookmarks
|
|
mkdir -p /home/$username/K-Net
|
|
gio set /home/$username/K-Net/ metadata::custom-icon file:///usr/share/icons/Papirus/48x48/places/folder-nextcloud.svg
|
|
echo file:///home/$username/K-Net >> /home/$username/.config/gtk-3.0/bookmarks
|
|
|
|
|
|
# Installation des dépendances pour Zoom
|
|
#apt install libxcb-xtest0 ibus
|
|
|
|
# Installation de la solution de virtualisation KVM
|
|
apt install -y bridge-utils dnsmasq-base qemu-system qemu-utils firewalld gir1.2-spiceclientgtk-3.0 libvirt-daemon-system virt-manager virt-viewer
|
|
adduser $username libvirt
|
|
export LIBVIRT_DEFAULT_URI='qemu:///system'
|
|
virsh net-start default
|
|
virsh net-autostart default
|
|
|
|
# Installation des logiciels en fonction du profil d'utilisation (décommenter selon le besoin)
|
|
apt install -y blender
|
|
apt install -y caja-nextcloud
|
|
apt install -y geany geany-plugin-addons geany-plugin-git-changebar geany-plugin-overview geany-plugin-spellcheck geany-plugin-treebrowser geany-plugin-vimode
|
|
apt install -y gimp gimp-data-extras gimp-help-fr
|
|
apt install -y hugin
|
|
apt install -y kdenlive
|
|
apt install -y obs-studio
|
|
|
|
# Logiciel hors dépots : Youtube music (E: Sub-process /usr/bin/dpkg returned an error code)
|
|
#package="https://(.*)youtube-music_(.*).deb"
|
|
#wget $(curl -L -s https://api.github.com/repos/th-ch/youtube-music/releases/latest | grep -o -E $package) -P /tmp/wibian/
|
|
#apt install -y /tmp/wibian/youtube-music_*.deb
|
|
|
|
# Logiciel hors dépôts : PVE VDI Client
|
|
apt install -y python3-pip python3-proxmoxer python3-tk
|
|
git clone https://github.com/joshpatten/PVE-VDIClient.git
|
|
cd ./PVE-VDIClient/
|
|
pip3 install PySimpleGUI --break-system-packages
|
|
cp vdiclient.py /usr/local/bin
|
|
chmod +x /usr/local/bin/vdiclient.py
|
|
cd $builddir
|
|
|
|
# Téléchargement du logiciel hors dépôts : PDF Studio Pro 2022
|
|
wget https://download.qoppa.com/pdfstudio/v2022/PDFStudio_v2022_2_5_linux64.sh -P /home/$username/Fichiers/SH/
|
|
|
|
# Flatpak (reboot nécessaire)
|
|
flatpak install -y flathub \
|
|
com.discordapp.Discord \
|
|
io.github.hmlendea.geforcenow-electron \
|
|
com.heroicgameslauncher.hgl \
|
|
org.jdownloader.JDownloader \
|
|
net.lutris.Lutris \
|
|
net.davidotek.pupgui2 \
|
|
com.valvesoftware.Steam \
|
|
com.stremio.Stremio
|
|
|
|
# Installation des drivers Nvidia (reboot nécessaire)
|
|
gpu=$(lspci | grep -i 'nvidia')
|
|
if [[ -n $gpu ]]; then
|
|
printf 'Une carte Nvidia a été détectée: %s\n' "$gpu"
|
|
apt install linux-headers-amd64
|
|
apt install firmware-misc-nonfree nvidia-driver nvidia-smi
|
|
apt install nvidia-cuda-dev nvidia-cuda-toolkit
|
|
else
|
|
printf 'Aucune carte Nvidia détectée\n'
|
|
fi
|
|
|
|
# Copie des scripts de lancement pour la machine virtuelle Windows
|
|
cp $builddir/autostart/* /home/$username/.config/autostart/
|
|
cp $builddir/virt-viewer/* /home/$username/.config/virt-viewer/
|
|
chmod +x /home/$username/.config/virt-viewer/launch.sh
|
|
|
|
# Copie du nouveau fichier de configuration Polybar pour l'utilisateur principal sudo
|
|
#cp $builddir/polybar/config.ini /home/$username/.config/polybar/
|
|
|
|
# Application du droit de propriété pour l'utilisateur principal sudo
|
|
chown -R $username:$username /home/$username/.config/
|
|
|
|
# Suppression des sources d'installation du script
|
|
rm -r $builddir
|
|
|
|
# Nettoyage des paquets inutiles du système
|
|
apt autoremove
|
|
|
|
# Message de fin
|
|
echo "Bisous" | figlet -f big
|
|
echo -ne "\n"
|
|
|
|
# Décompte avant redémarrage
|
|
i=10
|
|
while [ $i -ge 0 ]; do printf "Redémarrage dans $i \r"; sleep 1; ((i--)); done
|
|
|
|
# redémarrage du système
|
|
reboot now
|