Updated setup linux script
This commit is contained in:
461
setup-linux.sh
461
setup-linux.sh
@@ -16,7 +16,7 @@ checkbox=black,green
|
||||
compactbutton=black,green
|
||||
button=black,red"
|
||||
|
||||
function get_distribution() {
|
||||
function getDistributionType() {
|
||||
if [[ -e /etc/debian_version ]]; then
|
||||
source /etc/os-release
|
||||
if [[ $ID == "debian" || $ID == "raspbian" ]]; then
|
||||
@@ -35,7 +35,19 @@ function get_distribution() {
|
||||
echo "Detected distribution $DISTRO"
|
||||
}
|
||||
|
||||
function update_system() {
|
||||
function checkWhiptail() {
|
||||
if ! command -v whiptail &>/dev/null; then
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install whiptail -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in newt -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed --noconfirm newt
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function updateSystem() {
|
||||
if (whiptail --title "System Update" --yesno "Should we update the system?" 8 78); then
|
||||
echo "Updating system..."
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
@@ -49,22 +61,13 @@ function update_system() {
|
||||
fi
|
||||
}
|
||||
|
||||
function install_general_tools_software() {
|
||||
function installBasicPackages() {
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install linux-headers-amd64 sudo nano bat git curl wget htop btop scrcpy vlc -y
|
||||
sudo apt install sudo nano bat git curl wget htop btop flatpak -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in kernel-devel sudo nano bat git curl wget htop btop -y
|
||||
sudo dnf in sudo nano bat git curl wget htop btop flatpak -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
kernel_version=$(uname -r)
|
||||
if [[ $kernel_version == *zen* ]]; then
|
||||
sudo pacman -S --needed --noconfirm linux-zen-headers
|
||||
elif [[ $kernel_version == *lts* ]]; then
|
||||
sudo pacman -S --needed --noconfirm linux-lts-headers
|
||||
else
|
||||
sudo pacman -S --needed --noconfirm linux-headers
|
||||
fi
|
||||
sudo pacman -S --needed --noconfirm dkms base-devel syslinux sudo nano bat git curl wget htop btop scrcpy vlc phonon-qt5-vlc noto-fonts-emoji noto-fonts-extra noto-fonts-cjk reflector
|
||||
sudo reflector --save /etc/pacman.d/mirrorlist --protocol https
|
||||
sudo pacman -S --needed --noconfirm sudo nano bat git curl wget htop btop noto-fonts-emoji noto-fonts-extra noto-fonts-cjk flatpak
|
||||
if [ -d "/sys/class/power_supply/BAT0" ]; then
|
||||
sudo pacman -S --needed --noconfirm tlp
|
||||
sudo systemctl enable --now tlp
|
||||
@@ -72,30 +75,33 @@ function install_general_tools_software() {
|
||||
fi
|
||||
}
|
||||
|
||||
function setup_repo() {
|
||||
function setupRepositories() {
|
||||
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
sudo flatpak remote-add --if-not-exists launcher.moe https://gol.launcher.moe/gol.launcher.moe.flatpakrepo
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install ca-certificates software-properties-gtk -y
|
||||
sudo apt install ca-certificates software-properties-gtk gpg apt-transport-https firmware-misc-nonfree -y
|
||||
# Waydroid
|
||||
sudo curl https://repo.waydro.id | sudo bash
|
||||
sudo add-apt-repository ppa:o2sh/onefetch
|
||||
sudo add-apt-repository ppa:oguzhaninan/stacer
|
||||
sudo add-apt-repository ppa:serge-rider/dbeaver-ce
|
||||
sudo echo 'deb http://download.opensuse.org/repositories/hardware:/razer/Debian_12/ /' | sudo tee /etc/apt/sources.list.d/hardware:razer.list
|
||||
sudo curl -fsSL https://download.opensuse.org/repositories/hardware:razer/Debian_12/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/hardware_razer.gpg > /dev/null
|
||||
wget https://dl.thorium.rocks/debian/dists/stable/thorium.list
|
||||
sudo mv thorium.list /etc/apt/sources.list.d/
|
||||
# Signal
|
||||
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
|
||||
cat signal-desktop-keyring.gpg | sudo tee /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
|
||||
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' | sudo tee /etc/apt/sources.list.d/signal-xenial.list
|
||||
# VSC
|
||||
sudo apt-get install wget gpg
|
||||
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
|
||||
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
|
||||
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" |sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null
|
||||
rm -f packages.microsoft.gpg
|
||||
|
||||
sudo apt update
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf copr enable varlad/onefetch -y
|
||||
sudo dnf copr enable atim/heroic-games-launcher -y
|
||||
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
if grep -q "Rawhide" /etc/fedora-release; then
|
||||
sudo dnf config-manager --add-repo 'https://download.opensuse.org/repositories/hardware:razer/Fedora_Rawhide/hardware:razer.repo'
|
||||
sudo dnf config-manager --add-repo 'https://download.opensuse.org/repositories/home:/Maroxy:/AAT-Apps/Fedora_Rawhide/home:Maroxy:AAT-Apps.repo'
|
||||
sudo dnf4 config-manager --add-repo https://download.opensuse.org/repositories/hardware:/razer/Fedora_Rawhide/hardware:razer.repo -y
|
||||
sudo dnf in -y 'https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm' 'https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm'
|
||||
else
|
||||
sudo dnf config-manager --add-repo "https://download.opensuse.org/repositories/hardware:razer/Fedora_$(rpm -E %fedora)/hardware:razer.repo"
|
||||
sudo dnf in -y "https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm" "https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm"
|
||||
sudo flatpak remote-add --if-not-exists launcher.moe https://gol.launcher.moe/gol.launcher.moe.flatpakrepo
|
||||
sudo dnf config-manager --add-repo "https://download.opensuse.org/repositories/hardware:/razer/Fedora_$(rpm -E %fedora)/hardware:razer.repo" -y
|
||||
sudo dnf in -y "https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm" "https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm"
|
||||
fi
|
||||
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
|
||||
if [ ! -e /etc/yum.repos.d/vscode.repo ]; then
|
||||
@@ -115,47 +121,93 @@ function setup_repo() {
|
||||
else
|
||||
echo BlackArch already setup
|
||||
fi
|
||||
rate-mirrors arch | sudo tee /etc/pacman.d/mirrorlist
|
||||
rate-mirrors chaotic-aur | sudo tee /etc/pacman.d/chaotic-mirrorlist
|
||||
sudo pacman -S --needed yay --noconfirm
|
||||
fi
|
||||
}
|
||||
|
||||
function install_distro_specific_packages() {
|
||||
function installDistroSpecificPackages() {
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install stacer qbittorrent -y
|
||||
echo "None for now"
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in starship scrcpy stacer qbittorrent vlc -y
|
||||
sudo flatpak install flathub com.moonlight_stream.Moonlight -y --noninteractive --system
|
||||
sudo flatpak install flathub io.github.thaunknown.miru -y --noninteractive --system
|
||||
sudo flatpak install flathub com.stremio.Stremio -y --noninteractive --system
|
||||
echo "None for now"
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
# Base and utility packages
|
||||
sudo pacman -S --needed --noconfirm jshon expac acpid avahi net-tools xdg-user-dirs p7zip unrar unzip unace xz rsync nfs-utils cifs-utils ntfs-3g exfat-utils gvfs udisks2 starship macchanger plymouth plymouth-kcm breeze-plymouth
|
||||
sudo pacman -S --needed --noconfirm net-tools xdg-user-dirs p7zip unrar unzip unace xz rsync nfs-utils cifs-utils gvfs plymouth
|
||||
# Firmware/Drivers packages
|
||||
sudo pacman -S --needed --noconfirm mkinitcpio-firmware mesa lib32-mesa vulkan-icd-loader lib32-vulkan-icd-loader
|
||||
sudo pacman -S --needed --noconfirm mkinitcpio-firmware linux-firmware
|
||||
# Printer
|
||||
sudo pacman -S --needed --noconfirm system-config-printer foomatic-db foomatic-db-engine gutenprint gsfonts cups cups-pdf cups-filters sane skanlite hplip
|
||||
# Network
|
||||
sudo pacman -S --needed --noconfirm networkmanager networkmanager-openvpn networkmanager-pptp networkmanager-vpnc wireless_tools wpa_supplicant ifplugd dialog bluez bluez-utils
|
||||
sudo pacman -S --needed --noconfirm networkmanager networkmanager-openvpn networkmanager-pptp networkmanager-vpnc wireless_tools wpa_supplicant bluez bluez-utils
|
||||
# Sound
|
||||
sudo pacman -S --needed --noconfirm alsa-utils pipewire pipewire-pulse pipewire-jack lib32-pipewire-jack wireplumber pavucontrol-qt
|
||||
# Apps
|
||||
sudo pacman -S --needed --noconfirm moonlight-qt stremio onlyoffice-bin qbittorrent stacer
|
||||
yay -S --needed --noconfirm miru-bin
|
||||
sudo systemctl enable acpid avahi-daemon systemd-timesyncd fstrim.timer cups.service saned.socket NetworkManager bluetooth systemd-oomd
|
||||
sudo gpasswd -a "$USER" adbusers
|
||||
sudo pacman -S --needed --noconfirm alsa-utils pipewire pipewire-pulse pipewire-jack lib32-pipewire-jack wireplumber
|
||||
sudo systemctl enable fstrim.timer cups.service saned.socket NetworkManager bluetooth systemd-oomd
|
||||
sudo plymouth-set-default-theme -R spinner
|
||||
fi
|
||||
}
|
||||
|
||||
function install_fetch() {
|
||||
function installGraphicsDrivers() {
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install fastfetch onefetch -y
|
||||
sudo apt install ffmpeg vlc mpv -y
|
||||
if lspci | grep -i nvidia &>/dev/null; then
|
||||
sudo apt install nvidia-driver nvidia-vdpau-driver nvidia-vaapi-driver libnvcuvid1 libnvidia-encode1 -y
|
||||
fi
|
||||
if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then
|
||||
sudo apt install mesa-va-drivers vdpau-driver-all -y
|
||||
fi
|
||||
if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then
|
||||
sudo apt install intel-media-va-driver-non-free vdpau-driver-all -y
|
||||
fi
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in fastfetch onefetch -y
|
||||
sudo dnf swap ffmpeg-free ffmpeg --allowerasing -y
|
||||
sudo dnf in vlc mpv -y
|
||||
sudo dnf groupupdate multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin -y
|
||||
sudo dnf groupupdate sound-and-video -y
|
||||
if lspci | grep -i nvidia &>/dev/null; then
|
||||
sudo dnf install kmodtool akmods mokutil openssl -y
|
||||
sudo kmodgenca -a
|
||||
sudo mokutil --import /etc/pki/akmods/certs/public_key.der
|
||||
sudo dnf in akmod-nvidia xorg-x11-drv-nvidia-cuda nvidia-vaapi-driver -y
|
||||
fi
|
||||
if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then
|
||||
sudo dnf swap mesa-va-drivers mesa-va-drivers-freeworld -y
|
||||
sudo dnf swap mesa-vdpau-drivers mesa-vdpau-drivers-freeworld -y
|
||||
fi
|
||||
if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then
|
||||
sudo dnf in -y intel-media-driver
|
||||
fi
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed fastfetch onefetch --noconfirm
|
||||
sudo pacman -S --needed ffmpeg vlc mpv --noconfirm
|
||||
if lspci | grep -i nvidia &>/dev/null; then
|
||||
if uname -r | grep -q "cachyos"; then
|
||||
sudo pacman -S --needed --noconfirm linux-cachyos-nvidia opencl-nvidia libva-vdpau-driver libva-nvidia-driver
|
||||
else
|
||||
if pacman -Qs nvidia > /dev/null; then
|
||||
sudo pacman -R --noconfirm nvidia
|
||||
elif pacman -Qs nvidia-dkms > /dev/null; then
|
||||
sudo pacman -R --noconfirm nvidia-dkms
|
||||
elif pacman -Qs xf86-video-nouveau > /dev/null; then
|
||||
sudo pacman -R --noconfirm xf86-video-nouveau
|
||||
fi
|
||||
sudo pacman -S --needed --noconfirm nvidia-open opencl-nvidia libva-vdpau-driver libva-nvidia-driver
|
||||
fi
|
||||
fi
|
||||
if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then
|
||||
sudo pacman -S --needed --noconfirm libva-mesa-driver vulkan-radeon mesa-vdpau
|
||||
fi
|
||||
if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then
|
||||
sudo pacman -S --needed --noconfirm intel-media-driver vulkan-intel
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function setupFastfetch() {
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install fastfetch -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in fastfetch -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed fastfetch --noconfirm
|
||||
fi
|
||||
if [ -e ~/.bashrc ]; then
|
||||
if ! grep -q "fastfetch" ~/.bashrc; then
|
||||
@@ -167,25 +219,27 @@ function install_fetch() {
|
||||
echo "fastfetch" >> ~/.zshrc
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function install_browser() {
|
||||
if (whiptail --title "Web Browser" --yesno "Should we install web browsers?" 8 78); then
|
||||
echo "Installing browsers..."
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install firefox chromium torbrowser-launcher thorium-browser -y
|
||||
wget https://github.com/Alex313031/Mercury/releases/download/v.115.2.0/mercury-browser_115.2.0_x64.deb
|
||||
dpkg -i ./mercury-browser_115.2.0_x64.deb
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in firefox chromium tor torbrowser-launcher -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed firefox chromium tor torbrowser-launcher --noconfirm
|
||||
yay -S --needed --noconfirm thorium-browser-avx-bin mercury-browser-avx-bin
|
||||
if [ -e ~/.config/fish/config.fish ]; then
|
||||
if ! grep -q "fastfetch" ~/.config/fish/config.fish; then
|
||||
echo "fastfetch" >> ~/.config/fish/config.fish
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function install_gaming() {
|
||||
function installWebBrowsers() {
|
||||
if (whiptail --title "Web Browser" --yesno "Should we install web browsers?" 8 78); then
|
||||
echo "Installing browsers..."
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install firefox chromium torbrowser-launcher -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in firefox chromium torbrowser-launcher -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed firefox chromium torbrowser-launcher --noconfirm
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function installGamingPackages() {
|
||||
if (whiptail --title "Gaming" --yesno "Should we install game launchers and game optimization packages?" 8 78); then
|
||||
echo "Installing gaming packages..."
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
@@ -207,54 +261,69 @@ function install_gaming() {
|
||||
fi
|
||||
}
|
||||
|
||||
function install_virt() {
|
||||
function installSocialAndCommunicationPackages() {
|
||||
if (whiptail --title "Social and Communication" --yesno "Should we install social and communication packages?" 8 78); then
|
||||
echo "Installing social and communication packages..."
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
wget https://vencord.dev/download/vesktop/amd64/deb -O /tmp/vesktop.deb
|
||||
sudo apt install telegram-desktop signal-desktop discord -y
|
||||
sudo dpkg -i /tmp/vesktop.deb
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
wget https://vencord.dev/download/vesktop/amd64/rpm -O /tmp/vesktop.rpm
|
||||
sudo dnf in telegram-desktop discord /tmp/vesktop.rpm -y
|
||||
sudo flatpak install flathub org.signal.Signal -y --noninteractive --system
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed signal-desktop telegram-desktop discord vesktop-git --noconfirm
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function installVirtualizationAncContainerPackages() {
|
||||
if (whiptail --title "Virtualization" --yesno "Should we install KVM and containers packages?" 8 78); then
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install qemu-system libvirt-daemon-system virt-manager distrobox podman waydroid -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in libvirt lxc libvirt-daemon-lxc virt-manager distrobox podman waydroid -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed qemu-full libvirt libvirt-storage-gluster libvirt-storage-iscsi-direct virt-firmware virt-viewer virt-manager lxc lxcfs distrobox podman waydroid --noconfirm
|
||||
sudo pacman -S --needed qemu-full swtpm open-iscsi radvd openbsd-netcat libvirt libvirt-storage-gluster libvirt-storage-iscsi-direct virt-firmware virt-viewer virt-manager lxc lxcfs distrobox podman waydroid --noconfirm
|
||||
fi
|
||||
sudo systemctl enable libvirtd waydroid-container
|
||||
fi
|
||||
}
|
||||
|
||||
function install_u2f() {
|
||||
function setupU2F() {
|
||||
if (whiptail --title "U2F" --yesno "Should we install U2F packages?" 8 78); then
|
||||
echo "Installing U2F support..."
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install yubikey-manager yubikey-personalization yubioath-desktop -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
if grep -q "Rawhide" /etc/fedora-release; then
|
||||
sudo dnf in fedora-packager libyubikey pam_yubico yubico-piv-tool yubikey-manager yubikey-manager-qt yubikey-personalization-gui -y
|
||||
else
|
||||
sudo dnf in fedora-packager-yubikey libyubikey pam_yubico yubico-piv-tool yubikey-manager yubikey-manager-qt yubikey-personalization-gui -y
|
||||
fi
|
||||
sudo dnf in libyubikey pam-u2f pamu2fcfg yubico-piv-tool yubikey-manager yubikey-manager-qt yubikey-personalization-gui -y
|
||||
sudo flatpak install flathub com.yubico.yubioath -y --noninteractive --system
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed yubico-pam yubikey-full-disk-encryption yubikey-manager-qt yubikey-personalization yubikey-personalization-gui yubikey-touch-detector yubioath-desktop --noconfirm
|
||||
fi
|
||||
mkdir ~/.config/Yubico
|
||||
pamu2fcfg -o pam://$HOSTNAME -i pam://$HOSTNAME > ~/.config/Yubico/u2f_keys
|
||||
sudo touch /etc/pam.d/u2f-required
|
||||
sudo touch /etc/pam.d/u2f-sufficient
|
||||
echo -e "#%PAM-1.0\nauth required pam_u2f.so cue origin=pam://$HOSTNAME appid=pam://$HOSTNAME" | sudo tee /etc/pam.d/u2f-required
|
||||
echo -e "#%PAM-1.0\nauth sufficient pam_u2f.so cue origin=pam://$HOSTNAME appid=pam://$HOSTNAME" | sudo tee /etc/pam.d/u2f-sufficient
|
||||
fi
|
||||
}
|
||||
|
||||
function install_openrazer() {
|
||||
function installRGB() {
|
||||
if (whiptail --title "OpenRazer" --yesno "Should we install OpenRazer?" 8 78); then
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install openrazer-meta -y
|
||||
sudo apt install openrazer -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in openrazer-meta -y
|
||||
sudo rpm -e gpg-pubkey-d6d11ce4-5418547d
|
||||
sudo dnf in --nogpgcheck polychromatic -y
|
||||
sudo dnf install
|
||||
sudo dnf in kernel-devel openrazer-meta -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed polychromatic openrazer-daemon --noconfirm
|
||||
sudo pacman -S --needed openrazer-daemon --noconfirm
|
||||
fi
|
||||
sudo gpasswd -a "$USER" plugdev
|
||||
fi
|
||||
}
|
||||
|
||||
function install_openrgb() {
|
||||
if (whiptail --title "OpenRazer" --yesno "Should we install OpenRazer?" 8 78); then
|
||||
if (whiptail --title "OpenRGB" --yesno "Should we install OpenRGB?" 8 78); then
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install openrgb -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
@@ -266,7 +335,7 @@ function install_openrgb() {
|
||||
fi
|
||||
}
|
||||
|
||||
function install_terminal() {
|
||||
function installTerminal() {
|
||||
if (whiptail --title "Terminal/shell" --yesno "Should we install terminal and shell packages?" 8 78); then
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install alacritty kitty zsh -y
|
||||
@@ -279,85 +348,179 @@ function install_terminal() {
|
||||
fi
|
||||
}
|
||||
|
||||
function install_dev() {
|
||||
function installDevPackages() {
|
||||
if (whiptail --title "Development" --yesno "Should we install development packages?" 8 78); then
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install mariadb-server dbeaver-ce remmina -y
|
||||
sudo apt install mariadb-server code android-tools -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in mariadb-server https://dbeaver.io/files/dbeaver-ce-latest-stable.x86_64.rpm code android-tools remmina remmina-gnome-session remmina-plugins-exec remmina-plugins-rdp remmina-plugins-spice remmina-plugins-vnc remmina-plugins-www -y
|
||||
sudo dnf in mariadb-server code android-tools -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed mariadb dbeaver dbeaver-plugin-office dbeaver-plugin-svg-format dbeaver-plugin-apache-poi visual-studio-code-bin android-tools android-udev remmina --noconfirm
|
||||
sudo pacman -S --needed mariadb visual-studio-code-bin android-tools android-udev --noconfirm
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function install_gpu_drivers() {
|
||||
if (whiptail --title "GPU" --yesno "Should we install GPU drivers?" 8 78); then
|
||||
# NVIDIA
|
||||
if lspci | grep -i nvidia &>/dev/null; then
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install nvidia-driver firmware-misc-nonfree nvidia-vdpau-driver libnvcuvid1 libnvidia-encode1 nvidia-vaapi-driver -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in akmod-nvidia nvidia-driver xorg-x11-drv-nvidia-cuda nvidia-vaapi-driver mesa-vdpau-drivers ffmpeg libavcodec-freeworld -y
|
||||
if [ -d "/sys/class/power_supply/BAT0" ]; then
|
||||
sudo dnf in supergfxctl -y
|
||||
fi
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
if pacman -Qs nvidia > /dev/null; then
|
||||
sudo pacman -R --noconfirm nvidia
|
||||
elif pacman -Qs nvidia-dkms > /dev/null; then
|
||||
sudo pacman -R --noconfirm nvidia-dkms
|
||||
elif pacman -Qs xf86-video-nouveau > /dev/null; then
|
||||
sudo pacman -R --noconfirm xf86-video-nouveau
|
||||
fi
|
||||
sudo pacman -S --needed --noconfirm nvidia-open-dkms nvidia-settings nvidia-utils lib32-nvidia-utils libvdpau lib32-libvdpau gst-libav gst-plugins-good lib32-gst-plugins-good sdl2 lib32-sdl2 opencl-nvidia
|
||||
yay -S --needed --noconfirm libva-nvidia-driver-git
|
||||
if [ -d "/sys/class/power_supply/BAT0" ]; then
|
||||
sudo pacman -S --needed --noconfirm supergfxctl
|
||||
fi
|
||||
fi
|
||||
function installSoftware() {
|
||||
if (whiptail --title "Software" --yesno "Should we install recommended software?" 8 78); then
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install gimp inkscape krita blender audacity obs-studio kdenlive shotcut qbittorrent scrcpy -y
|
||||
sudo flatpak install flathub com.moonlight_stream.Moonlight -y --noninteractive --system
|
||||
sudo flatpak install flathub io.github.thaunknown.miru -y --noninteractive --system
|
||||
sudo flatpak install flathub com.stremio.Stremio -y --noninteractive --system
|
||||
sudo flatpak install flathub org.onlyoffice.desktopeditors -y --noninteractive --system
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in gimp inkscape krita blender audacity obs-studio kdenlive shotcut qbittorrent scrcpy -y
|
||||
sudo flatpak install flathub com.moonlight_stream.Moonlight -y --noninteractive --system
|
||||
sudo flatpak install flathub io.github.thaunknown.miru -y --noninteractive --system
|
||||
sudo flatpak install flathub com.stremio.Stremio -y --noninteractive --system
|
||||
sudo flatpak install flathub org.onlyoffice.desktopeditors -y --noninteractive --system
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed gimp inkscape krita blender audacity obs-studio kdenlive shotcut qbittorrent scrcpy moonlight-qt stremio onlyoffice-bin --noconfirm
|
||||
yay -S --needed --noconfirm miru-bin
|
||||
fi
|
||||
# AMD
|
||||
if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install firmware-amd-graphics libgl1-mesa-dri libglx-mesa0 mesa-vulkan-drivers xserver-xorg-video-all mesa-va-drivers vdpau-driver-all -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in xorg-x11-drv-amdgpu mesa-vdpau-drivers mesa-va-drivers libavcodec-freeworld -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed --noconfirm xf86-video-amdgpu libva-mesa-driver lib32-libva-mesa-driver vulkan-radeon lib32-vulkan-radeon mesa-vdpau lib32-mesa-vdpau gst-libav gst-plugins-good lib32-gst-plugins-good sdl2 lib32-sdl2
|
||||
fi
|
||||
fi
|
||||
# INTEL
|
||||
if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install xserver-xorg-core intel-media-va-driver -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in xorg-x11-drv-intel intel-media-driver ffmpeg libavcodec-freeworld -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed --noconfirm intel-media-driver linux-firmware vulkan-intel gst-libav gst-plugins-good lib32-gst-plugins-good sdl2 lib32-sdl2
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function setupDesktopEnvironment() {
|
||||
DE=$(whiptail --title "Desktop Environment" --menu "Choose a desktop environment" 15 60 8 \
|
||||
"1" "GNOME" \
|
||||
"2" "KDE" \
|
||||
"3" "XFCE" \
|
||||
"4" "Cinnamon" \
|
||||
"5" "MATE" \
|
||||
"6" "Budgie" \
|
||||
"7" "Sway" \
|
||||
"8" "Hyprland" 3>&1 1>&2 2>&3)
|
||||
case $DE in
|
||||
1) installGNOME ;;
|
||||
2) installKDE ;;
|
||||
3) installXFCE ;;
|
||||
4) installCinnamon ;;
|
||||
5) installMATE ;;
|
||||
6) installBudgie ;;
|
||||
7) installSway ;;
|
||||
8) installHyprland ;;
|
||||
esac
|
||||
}
|
||||
|
||||
function installGNOME() {
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install gnome-shell task-gnome-desktop gnome-tweaks gnome-extensions gnome-software-plugin-flatpak -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf group install gnome-desktop -y
|
||||
sudo dnf in gnome-tweaks gnome-extensions -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed gnome gnome-tweaks gnome-extensions gnome-packagekit --noconfirm
|
||||
fi
|
||||
}
|
||||
|
||||
function installKDE() {
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install kde-standard kdeconnect plasma-discover-backend-flatpak -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf group install kde-desktop -y
|
||||
sudo dnf in kde-connect -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed plasma plasma-meta kdeconnect packagekit-qt6 plymouth-kcm flatpak-kcm sddm-kcm --noconfirm
|
||||
fi
|
||||
}
|
||||
|
||||
function installXFCE() {
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install xfce4 xfce4-goodies -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in @xfce-desktop-environment -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed xfce4 xfce4-goodies --noconfirm
|
||||
fi
|
||||
}
|
||||
|
||||
function installCinnamon() {
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install task-cinnamon-desktop -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in @cinnamon-desktop-environment -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed cinnamon --noconfirm
|
||||
fi
|
||||
}
|
||||
|
||||
function installMATE() {
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install mate-desktop-environment -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in @mate-desktop-environment -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed mate mate-extra --noconfirm
|
||||
fi
|
||||
}
|
||||
|
||||
function installBudgie() {
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install --install-suggests budgie-desktop -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf group install budgie-desktop budgie-desktop-apps -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed budgie budgie-desktop --noconfirm
|
||||
fi
|
||||
}
|
||||
|
||||
function installSway() {
|
||||
echo "Warning: Experimental Script."
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install sway swaybg swayidle swaylock waybar xdg-desktop-portal-wlr xwayland -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in sway-desktop-environment sway swaybg swayidle swaylock waybar -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed sway swaybg swayidle swaylock waybar --noconfirm
|
||||
fi
|
||||
}
|
||||
|
||||
function installHyprland() {
|
||||
echo "Warning: Experimental Script."
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install hyprland -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf in hyprland -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed hyprland --noconfirm
|
||||
fi
|
||||
}
|
||||
|
||||
function setupDomainMember() {
|
||||
echo "Warning: Experimental Script."
|
||||
if (whiptail --title "Samba" --yesno "Should we install Samba?" 8 78); then
|
||||
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
|
||||
sudo apt install realmd sssd samba-common krb5-user adcli libsss-sudo sssd-tools libsasl2-modules-ldap packagekit libpam-mount -y
|
||||
elif [[ $DISTRO == "fedora" ]]; then
|
||||
sudo dnf group install domain-client -y
|
||||
elif [[ $DISTRO == "arch" ]]; then
|
||||
sudo pacman -S --needed samba smbclient ntp bind krb5 cups --noconfirm
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
echo -e "\e[1;31mWARNING: This script assumes a standard Debian/Fedora/Arch install.\e[0m"
|
||||
read -p "Are you sure you want to continue? [N/y] " response
|
||||
read -r -p "Are you sure you want to continue? [N/y] " response
|
||||
if [[ "$response" =~ ^[Yy]$ ]]; then
|
||||
echo "Continuing..."
|
||||
get_distribution
|
||||
update_system
|
||||
install_general_tools_software
|
||||
setup_repo
|
||||
install_distro_specific_packages
|
||||
install_fetch
|
||||
install_browser
|
||||
install_gaming
|
||||
install_virt
|
||||
install_u2f
|
||||
install_openrazer
|
||||
install_terminal
|
||||
install_dev
|
||||
install_gpu_drivers
|
||||
getDistributionType
|
||||
checkWhiptail
|
||||
updateSystem
|
||||
installBasicPackages
|
||||
setupRepositories
|
||||
installDistroSpecificPackages
|
||||
installGraphicsDrivers
|
||||
setupFastfetch
|
||||
installWebBrowsers
|
||||
installGamingPackages
|
||||
installSocialAndCommunicationPackages
|
||||
installVirtualizationAncContainerPackages
|
||||
setupU2F
|
||||
installRGB
|
||||
installTerminal
|
||||
installDevPackages
|
||||
installSoftware
|
||||
else
|
||||
echo "Script execution aborted."
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user