Removing old script and updating arch-setup

This commit is contained in:
2025-05-27 09:43:21 +02:00
parent 6150b37ae2
commit 6f36ca0848
5 changed files with 462 additions and 805 deletions

View File

@@ -4,19 +4,6 @@ These are my personal scripts to automate tasks related to Linux/Unix environmen
## Documentation ## Documentation
### setup-linux.sh (Legacy Script)
This is the legacy script that provides a basic setup for Debian, Fedora, and Arch systems. It includes the installation of essential packages for everyday usage, such as general tools, browsers, everyday apps, gaming-related apps, virtualization/container packages, remote access, U2F (Yubico), terminal/shell, development environment, and OpenRazer.
To run this script:
```sh
curl -sL https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/setup-linux.sh | bash
```
Alternatively, using wget:
```sh
wget -qO- https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/setup-linux.sh | bash
```
### arch-setup.sh ### arch-setup.sh
This script is specifically designed for Arch Linux systems. It includes functions to install packages, check and install `whiptail`, add repositories, update the system, set up Pacman configuration, and install various package groups such as Zsh, themes, games, Pipewire, Cups, NetworkManager, Bluetooth, virtualization, containers, U2F, and OpenRGB. It also includes functions to set up browsers, configure U2F, and set up Plymouth. This script is specifically designed for Arch Linux systems. It includes functions to install packages, check and install `whiptail`, add repositories, update the system, set up Pacman configuration, and install various package groups such as Zsh, themes, games, Pipewire, Cups, NetworkManager, Bluetooth, virtualization, containers, U2F, and OpenRGB. It also includes functions to set up browsers, configure U2F, and set up Plymouth.
@@ -30,19 +17,6 @@ Alternatively, using wget:
wget -qO- https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/arch-setup.sh | bash wget -qO- https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/arch-setup.sh | bash
``` ```
### debian-setup.sh
This script is tailored for Debian-based systems. It includes functions to install packages, add repositories, update the system, set up Plymouth, and install various package groups such as Zsh, games, Pipewire, Cups, NetworkManager, Bluetooth, virtualization, containers, U2F, and OpenRGB. It also includes functions to set up browsers, configure U2F, and set up Plymouth.
To run this script:
```sh
curl -sL https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/debian-setup.sh | bash
```
Alternatively, using wget:
```sh
wget -qO- https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/debian-setup.sh | bash
```
### fedora-setup.sh ### fedora-setup.sh
This script is intended for Fedora systems. It includes functions to install packages, add repositories, update the system, set up Plymouth, and install various package groups such as Zsh, games, Pipewire, Cups, NetworkManager, Bluetooth, virtualization, containers, U2F, and OpenRGB. It also includes functions to set up browsers, configure U2F, and set up Plymouth. This script is intended for Fedora systems. It includes functions to install packages, add repositories, update the system, set up Plymouth, and install various package groups such as Zsh, games, Pipewire, Cups, NetworkManager, Bluetooth, virtualization, containers, U2F, and OpenRGB. It also includes functions to set up browsers, configure U2F, and set up Plymouth.
@@ -56,6 +30,19 @@ Alternatively, using wget:
wget -qO- https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/fedora-setup.sh | bash wget -qO- https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/fedora-setup.sh | bash
``` ```
### debian-setup.sh
This script is tailored for Debian-based systems. It includes functions to install packages, add repositories, update the system, set up Plymouth, and install various package groups such as Zsh, games, Pipewire, Cups, NetworkManager, Bluetooth, virtualization, containers, U2F, and OpenRGB. It also includes functions to set up browsers, configure U2F, and set up Plymouth.
To run this script:
```sh
curl -sL https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/debian-setup.sh | bash
```
Alternatively, using wget:
```sh
wget -qO- https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/debian-setup.sh | bash
```
### desktop-setup.sh ### desktop-setup.sh
This script helps in setting up different desktop environments on your system. It detects the distribution and installs the selected desktop environment (GNOME, KDE, XFCE, Cinnamon, MATE, Budgie, Sway, or Hyprland) along with necessary packages. This script helps in setting up different desktop environments on your system. It detects the distribution and installs the selected desktop environment (GNOME, KDE, XFCE, Cinnamon, MATE, Budgie, Sway, or Hyprland) along with necessary packages.

View File

@@ -27,6 +27,12 @@ install_dependencies() {
sudo pacman -S --needed --noconfirm --asdeps "$1" sudo pacman -S --needed --noconfirm --asdeps "$1"
} }
# Function name: Update system
# Description: Update the system
update_system() {
sudo pacman -Syu --noconfirm
}
# Function name: Check whiptail # Function name: Check whiptail
# Description: Check if whiptail is installed else install it # Description: Check if whiptail is installed else install it
check_whiptail() { check_whiptail() {
@@ -35,6 +41,9 @@ check_whiptail() {
fi fi
} }
# Function name: Setup disk partitioning
# Description: Setup disk partitioning
# Function name: Setup repositories # Function name: Setup repositories
# Description: Ask the user if they want to add specific repositories # Description: Ask the user if they want to add specific repositories
setup_repositories() { setup_repositories() {
@@ -99,12 +108,7 @@ setup_repositories() {
;; ;;
esac esac
done done
} update_system
# Function name: Update system
# Description: Update the system
update_system() {
sudo pacman -Syu --noconfirm
} }
# Function name: Setup Pacman configuration # Function name: Setup Pacman configuration
@@ -119,6 +123,52 @@ setup_pacman() {
sudo sed -i 's/#DisableDownloadTimeout/DisableDownloadTimeout/' /etc/pacman.conf sudo sed -i 's/#DisableDownloadTimeout/DisableDownloadTimeout/' /etc/pacman.conf
} }
# Function name: Setup shell
# Description: Install selected shell and recommendations
setup_shell() {
options=(
"Zsh" "Install Zsh and recommended packages" ON
"Fish" "Install Fish shell and recommended packages" OFF
"Bash" "Install Bash and recommended packages" OFF
)
selected_shell=$(whiptail --title "Setup Shell" --radiolist \
"Choose the shell you want to install:" 15 60 3 \
"${options[@]}" 3>&1 1>&2 2>&3)
case $selected_shell in
"\"Zsh\"")
install_package zsh zsh-autosuggestions zsh-completions zsh-history-substring-search zsh-syntax-highlighting grml-zsh-config oh-my-zsh-git
if (whiptail --title "Change default shell to Zsh" --yesno "Would you like to change the default shell to Zsh?" 10 60); then
chsh -s /bin/zsh
fi
;;
"\"Fish\"")
install_package fish
if (whiptail --title "Change default shell to Fish" --yesno "Would you like to change the default shell to Fish?" 10 60); then
chsh -s /usr/bin/fish
fi
;;
"\"Bash\"")
install_package bash
install_dependencies bash-completion
if pacman -Qs bash-completion > /dev/null; then
echo "source /usr/share/bash-completion/bash_completion" >> ~/.bashrc
fi
if (whiptail --title "Change default shell to Bash" --yesno "Would you like to change the default shell to Bash?" 10 60); then
chsh -s /bin/bash
fi
;;
esac
}
# Function name: Setup audio server
# Description: Install pipewire and its dependencies
setup_audio_server() {
if whiptail --title "Setup Audio Server" --yesno "Would you like to setup Pipewire?" 10 60; then
install_dependencies pipewire pipewire-pulse pipewire-alsa pipewire-jack wireplumber
fi
}
# Function name: Setup GPU # Function name: Setup GPU
# Description: Setup GPU depending on the available devices # Description: Setup GPU depending on the available devices
@@ -146,42 +196,47 @@ setup_gpu() {
case $selected_driver in case $selected_driver in
"\"nvidia\"") "\"nvidia\"")
if pacman -Qs linux > /dev/null; then if pacman -Qs linux > /dev/null; then
sudo pacman -S --needed --noconfirm nvidia-open install_package nvidia-open
install_dependencies libvdpau
fi fi
if pacman -Qs linux-lts > /dev/null; then if pacman -Qs linux-lts > /dev/null; then
sudo pacman -S --needed --noconfirm nvidia-open-lts install_package nvidia-open-lts
install_dependencies libvdpau
fi fi
if pacman -Qs linux-cachyos > /dev/null; then if pacman -Qs linux-cachyos > /dev/null; then
sudo pacman -S --needed --noconfirm linux-cachyos-nvidia-open install_package linux-cachyos-nvidia-open
install_dependencies libvdpau
fi fi
if pacman -Qs linux-zen > /dev/null || pacman -Qs linux-hardened > /dev/null; then if pacman -Qs linux-zen > /dev/null || pacman -Qs linux-hardened > /dev/null; then
sudo pacman -S --needed --noconfirm nvidia-open-dkms install_package nvidia-open-dkms
install_dependencies libvdpau
fi fi
if ! lspci | grep -Ei "amd|intel" > /dev/null; then if ! lspci | grep -Ei "amd|intel" > /dev/null; then
sudo pacman -S --needed --noconfirm libva-nvidia-driver install_dependencies libva-nvidia-driver
fi fi
if (whiptail --title "Install Cuda" --yesno "Would you like to install Cuda?" 10 60); then if (whiptail --title "Install Cuda" --yesno "Would you like to install Cuda?" 10 60); then
sudo pacman -S --needed --noconfirm cuda install_dependencies cuda
fi fi
;; ;;
"\"nouveau\"") "\"nouveau\"")
sudo pacman -S --needed --noconfirm mesa vulkan-nouveau install_dependencies mesa
install_package vulkan-nouveau
;; ;;
esac esac
;; ;;
*AMD*) *AMD*)
sudo pacman -S --needed --noconfirm mesa vulkan-radeon install_dependencies mesa
install_package vulkan-radeon
;; ;;
*Intel*) *Intel*)
sudo pacman -S --needed --noconfirm intel-media-driver vulkan-intel install_dependencies intel-media-driver vulkan-intel
;; ;;
esac esac
fi fi
} }
# Function name: Setup plymouth # Function name: Setup plymouth
# Description: Install and setup Plymouth for boot splash # Description: Install and setup Plymouth for boot splash
setup_plymouth() { setup_plymouth() {
@@ -196,103 +251,159 @@ setup_plymouth() {
fi fi
} }
# Packages group definitions # Function name: Setup network
# Package groups # Description: Install and setup NetworkManager and its dependencies
zsh_packages=( setup_network() {
grml-zsh-config if whiptail --title "Setup Network" --yesno "Would you like to setup NetworkManager?" 10 60; then
oh-my-zsh-git install_dependencies networkmanager wpa_supplicant
zsh install_package networkmanager-openvpn networkmanager-strongswan
zsh-autosuggestions sudo systemctl enable --now NetworkManager
zsh-completions fi
zsh-history-substring-search }
zsh-lovers
zsh-syntax-highlighting # Function name: Setup bluetooth
) # Description: Install and setup Bluetooth and its dependencies
theme_packages=( setup_bluetooth() {
btop-theme-catppuccin if whiptail --title "Setup Bluetooth" --yesno "Would you like to setup Bluetooth?" 10 60; then
catppuccin-cursors-mocha install_dependencies bluedevil bluez bluez-utils
catppuccin-gtk-theme-mocha sudo systemctl enable --now bluetooth
papirus-folders-catppuccin-git fi
plymouth-theme-catppuccin-mocha-git }
#refind-theme-catppuccin-git
sddm-theme-catppuccin-git # function name : setup u2f
) # Description: setup pam-u2f for login using Yubikey
plasma_kde_apps=( setup_u2f() {
kate install_package pam-u2f
okular mkdir ~/.config/Yubico
dolphin echo "Registering U2F device..."
gwenview pamu2fcfg -o "pam://$HOST" -i "pam://$HOST" > ~/.config/Yubico/u2f_keys
kcalc sudo touch /etc/pam.d/u2f-required
spectacle sudo touch /etc/pam.d/u2f-sufficient
gparted echo "auth required pam_u2f.so cue origin=pam://$HOST appid=pam://$HOST" | sudo tee -a /etc/pam.d/u2f-required
) echo "auth sufficient pam_u2f.so cue origin=pam://$HOST appid=pam://$HOST" | sudo tee -a /etc/pam.d/u2f-sufficient
gnome_apps=(
gnome-console sudo sed -i '/^password\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/su
gnome-disk-utility sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/sudo
gnome-firmware sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/passwd
) sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/system-login
games_packages=( if [ ! -f /etc/pam.d/polkit-1 ]; then
steam-native-runtime sudo cp /usr/lib/pam.d/polkit-1 /etc/pam.d/polkit-1
heroic-games-launcher-bin fi
an-anime-game-launcher-bin sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/polkit-1
honkers-launcher-bin }
sleepy-launcher-bin
the-honkers-railway-launcher-bin # function name : setup fprint
umu-launcher # Description: setup fprint for login using fingerprint reader
goverlay setup_fprint() {
gamemode install_package fprintd
gamescope install_dependencies imagemagick
mangohud sudo systemctl enable --now fprintd
) sudo sed -i '/^auth\s*include\s*system-login/i auth [success=1 default=ignore] pam_succeed_if.so service in sudo:su:su-l tty in :unknown' /etc/pam.d/system-local-login
pipewire_packages=( sudo sed -i '/^auth\s*include\s*system-login/i auth sufficient pam_fprintd.so' /etc/pam.d/system-local-login
pipewire if [ ! -f /etc/pam.d/polkit-1 ]; then
pipewire-pulse sudo cp /usr/lib/pam.d/polkit-1 /etc/pam.d/polkit-1
pipewire-jack fi
pipewire-alsa sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/polkit-1
wireplumber fprintd-enroll
) }
cups_packages=(
cups # function name : setup SmartCard [WIP]
cups-pdf # Description: setup pcscd for login using smartcard reader
cups-filters setup_smartcard() {
system-config-printer install_package opensc
) sudo systemctl enable --now pcscd
networkmanager_packages=( sudo systemctl enable --now pcscd.socket
networkmanager }
networkmanager-openvpn
networkmanager-pptp # function name : setup firewall
networkmanager-vpnc # Description: Install and setup user selected firewall
networkmanager-strongswan setup_firewall() {
networkmanager-l2tp options=(
wpa_supplicant "ufw" "Install UFW" ON
) "firewalld" "Install Firewalld" OFF
bluetooth_packages=( "iptables" "Install Iptables" ON
bluez "nftables" "Install Nftables" OFF
bluez-utils )
bluez-hid2hci selected_groups=$(whiptail --title "Setup Firewall" --checklist "Choose the firewall you want to install:" 20 78 4 "${options[@]}")
bluedevil
) case $selected_groups in
virtualization_packages=( "ufw")
qemu-full install_package ufw
virt-manager install_dependencies ufw-extras
virt-viewer sudo systemctl enable --now ufw
swtpm sudo ufw enable
) ;;
containers_packages=( "firewalld")
podman install_package firewalld
distrobox sudo systemctl enable --now firewalld
waydroid ;;
lxc "iptables")
) install_package iptables
thunderbird_packages=( ;;
thunderbird "nftables")
thunderbird-dark-reader install_package nftables
thunderbird-ublock-origin install_package iptables-nft
) ;;
developer_packages=( esac
git }
visual-studio-code-bin
) # function name : Setup NTP
# Description: Install selected NTP client
setup_ntp() {
options=(
"ntpd-rs" "Install ntpd-rs" ON
"chrony" "Install chrony (Current standard)" OFF
"openntpd" "Install OpenNTPD" OFF
"ntp" "Install ntpd (Not recommended)" OFF
)
selected_ntp=$(whiptail --title "Setup NTP" --radiolist "Choose the NTP client you want to install:" 20 78 4 "${options[@]}" 3>&1 1>&2 2>&3)
case $selected_ntp in
"\"ntpd-rs\"")
install_package ntpd-rs
sudo systemctl enable --now ntpd-rs
;;
"\"chrony\"")
install_package chrony
sudo systemctl enable --now chronyd
;;
"\"openntpd\"")
install_package openntpd
sudo systemctl enable --now openntpd
;;
"\"ntp\"")
install_package ntp
sudo systemctl enable --now ntpd
;;
esac
}
# function name : setup flatpak
# Description: Install and setup Flatpak and Flathub
setup_flatpak() {
if whiptail --title "Setup Flatpak" --yesno "Would you like to setup Flatpak?" 10 60; then
install_package flatpak
flatpak remote-add --if-not-exists --system flathub https://flathub.org/repo/flathub.flatpakrepo
fi
}
# function name : setup fwupd
# Description: setup fwupd
setup_fwupd() {
if whiptail --title "Setup fwupd" --yesno "Would you like to setup fwupd?" 10 60; then
install_package fwupd
install_dependencies fwupd-efi
sudo systemctl enable --now fwupd
sudo systemctl enable --now fwupd-refresh
fi
}
# function name : setup OpenRGB
# Description: Install OpenRGB for RGB devices control
setup_openrgb() {
install_package openrgb
sudo gpasswd -a "$USER" plugdev
sudo systemctl enable --now openrgb
}
# function name : setup browser # function name : setup browser
# Description: Ask the user which browsers they want to install # Description: Ask the user which browsers they want to install
@@ -362,215 +473,6 @@ setup_browser() {
done done
} }
# function name : setup u2f
# Description: setup pam-u2f for login using Yubikey
setup_u2f() {
install_package pam-u2f
mkdir ~/.config/Yubico
echo "Registering U2F device..."
pamu2fcfg -o "pam://$HOST" -i "pam://$HOST" > ~/.config/Yubico/u2f_keys
sudo touch /etc/pam.d/u2f-required
sudo touch /etc/pam.d/u2f-sufficient
echo "auth required pam_u2f.so cue origin=pam://$HOST appid=pam://$HOST" | sudo tee -a /etc/pam.d/u2f-required
echo "auth sufficient pam_u2f.so cue origin=pam://$HOST appid=pam://$HOST" | sudo tee -a /etc/pam.d/u2f-sufficient
sudo sed -i '/^password\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/su
sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/sudo
sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/passwd
sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/system-login
if [ ! -f /etc/pam.d/polkit-1 ]; then
sudo cp /usr/lib/pam.d/polkit-1 /etc/pam.d/polkit-1
fi
sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/polkit-1
}
# function name : setup fprint
# Description: setup fprint for login using fingerprint reader
setup_fprint() {
install_package fprintd
install_dependencies imagemagick
sudo systemctl enable --now fprintd
sudo sed -i '/^auth\s*include\s*system-login/i auth [success=1 default=ignore] pam_succeed_if.so service in sudo:su:su-l tty in :unknown' /etc/pam.d/system-local-login
sudo sed -i '/^auth\s*include\s*system-login/i auth sufficient pam_fprintd.so' /etc/pam.d/system-local-login
if [ ! -f /etc/pam.d/polkit-1 ]; then
sudo cp /usr/lib/pam.d/polkit-1 /etc/pam.d/polkit-1
fi
sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/polkit-1
fprintd-enroll
}
# function name : setup SmartCard [WIP]
# Description: setup pcscd for login using smartcard reader
setup_smartcard() {
install_package pcscd
install_dependencies pcsc-tools
sudo systemctl enable --now pcscd
sudo systemctl enable --now pcscd.socket
}
# function name : setup OpenRGB
# Description: Install OpenRGB for RGB devices control
setup_openrgb() {
install_package openrgb
sudo gpasswd -a "$USER" plugdev
sudo systemctl enable --now openrgb
}
# function name : Install packages group
# Description: Install packages group by asking user with a selection menu which group would they like to install
install_packages_group() {
options=(
"Zsh" "Install Zsh packages" OFF
"Theme" "Install Theme packages" OFF
"Plasma Apps" "Install KDE Plasma Apps" OFF
"Gnome Apps" "Install Gnome Apps" OFF
"Games" "Install Games packages" OFF
"Pipewire" "Install Pipewire packages" OFF
"Cups" "Install Cups packages" OFF
"NetworkManager" "Install NetworkManager packages" OFF
"Bluetooth" "Install Bluetooth packages" OFF
"Virtualization" "Install Virtualization packages" OFF
"Containers" "Install Containers packages" OFF
"U2F" "Setup U2F" OFF
"Fprint" "Setup Fprint" OFF
"OpenRGB" "Setup OpenRGB" OFF
"Thunderbird" "Install Thunderbird" OFF
"Developer" "Install Developer packages" OFF
)
selected_groups=$(whiptail --title "Install Packages Group" --checklist \
"Choose the packages group you want to install:" 20 78 15 \
"${options[@]}" 3>&1 1>&2 2>&3)
for group in $selected_groups; do
case $group in
"\"Zsh\"")
install_packages zsh_packages[@]
if (whiptail --title "Change default shell to Zsh" --yesno "Would you like to change the default shell to Zsh?" 10 60); then
chsh -s /bin/zsh
fi
;;
"\"Theme\"")
install_packages theme_packages[@]
;;
"\"Games\"")
install_packages games_packages[@]
;;
"\"Pipewire\"")
install_packages pipewire_packages[@]
;;
"\"Cups\"")
install_packages cups_packages[@]
;;
"\"NetworkManager\"")
install_packages networkmanager_packages[@]
;;
"\"Bluetooth\"")
install_packages bluetooth_packages[@]
sudo systemctl enable --now bluetooth
;;
"\"Virtualization\"")
install_packages virtualization_packages[@]
sudo systemctl enable --now libvirtd
;;
"\"Containers\"")
install_packages containers_packages[@]
# if nvidia gpu is detected
if lspci | grep -Ei "nvidia" > /dev/null; then
install_package nvidia-container-toolkit
fi
;;
"\"U2F\"")
setup_u2f
;;
"\"Fprint\"")
setup_fprint
;;
"\"OpenRGB\"")
setup_openrgb
;;
"\"Thunderbird\"")
install_packages thunderbird_packages[@]
;;
"\"Developer\"")
install_packages developer_packages[@]
;;
esac
done
}
# function name : setup_firewall
# Description: Install and setup user selected firewall
setup_firewall() {
options=(
"ufw" "Install UFW" ON
"firewalld" "Install Firewalld" OFF
"iptables" "Install Iptables" ON
"nftables" "Install Nftables" OFF
)
selected_groups=$(whiptail --title "Setup Firewall" --checklist "Choose the firewall you want to install:" 20 78 4 "${options[@]}")
case $selected_groups in
"ufw")
install_package ufw
install_dependencies ufw-extras
sudo systemctl enable --now ufw
sudo ufw enable
;;
"firewalld")
install_package firewalld
sudo systemctl enable --now firewalld
;;
"iptables")
install_package iptables
;;
"nftables")
install_package nftables
install_package iptables-nft
;;
esac
}
# function name : setup_flatpak
# Description: Install and setup Flatpak and Flathub
setup_flatpak() {
if whiptail --title "Setup Flatpak" --yesno "Would you like to setup Flatpak?" 10 60; then
install_package flatpak
flatpak remote-add --if-not-exists --system flathub https://flathub.org/repo/flathub.flatpakrepo
fi
}
# function name : setup_fwupd
# Description: setup fwupd
setup_fwupd() {
if whiptail --title "Setup fwupd" --yesno "Would you like to setup fwupd?" 10 60; then
install_package fwupd
install_dependencies fwupd-efi
sudo systemctl enable --now fwupd
sudo systemctl enable --now fwupd-refresh
fi
}
# function name : setup_kdeconnect
# Description: setup kdeconnect
setup_kdeconnect() {
if whiptail --title "Setup KDE Connect" --yesno "Would you like to setup KDE Connect?" 10 60; then
options=(
"kdeconnect" "Install KDE Connect" OFF
"gsconnect" "Install GSConnect" OFF
)
selected_option=$(whiptail --title "Setup KDE Connect" --radiolist "Choose the package you want to install:" 20 78 2 "${options[@]}" 3>&1 1>&2 2>&3)
case $selected_option in
"\"kdeconnect\"")
install_package kdeconnect
;;
"\"gsconnect\"")
install_package gnome-shell-extension-gsconnect
;;
esac
fi
}
# function name : setup_office_suite # function name : setup_office_suite
# Description: setup office suite # Description: setup office suite
setup_office_suite() { setup_office_suite() {
@@ -597,17 +499,229 @@ setup_office_suite() {
esac esac
} }
# Function name: Setup mail client
# Description: Install choosen mail client
setup_mail_client() {
options=(
"Thunderbird" "Install Thunderbird" ON
"Evolution" "Install Evolution" OFF
"Geary" "Install Geary" OFF
"Mailspring" "Install Mailspring" OFF
)
selected_mail_client=$(whiptail --title "Setup Mail Client" --radiolist \
"Choose the mail client you want to install:" 20 78 4 \
"${options[@]}" 3>&1 1>&2 2>&3)
case $selected_mail_client in
"\"Thunderbird\"")
install_package thunderbird
install_dependencies thunderbird-dark-reader thunderbird-ublock-origin
;;
"\"Evolution\"")
install_package evolution
;;
"\"Geary\"")
install_package geary
;;
"\"Mailspring\"")
install_package mailspring
;;
esac
}
# Function name: Setup virtualization
# Description: Install virtualization packages and enable libvirtd service
setup_virtualization() {
if whiptail --title "Setup Virtualization" --yesno "Would you like to setup virtualization?" 10 60; then
install_package virt-manager qemu-full virt-viewer
install_dependencies swtpm dnsmasq openbsd-netcat
if pacman -Qs libvirt > /dev/null; then
sudo systemctl enable --now libvirtd
sudo usermod -aG libvirt "$USER"
fi
fi
}
# Function name: Setup containers
# Description: Install choosen container packages (podman or docker, distrobox)
setup_containers() {
options=(
"Podman" "Install Podman and its dependencies" ON
"Docker" "Install Docker and its dependencies" OFF
"Distrobox" "Install Distrobox for container management" ON
)
selected_containers=$(whiptail --title "Setup Containers" --checklist \
"Choose the container packages you want to install:" 20 78 3 \
"${options[@]}" 3>&1 1>&2 2>&3)
for container in $selected_containers; do
case $container in
"\"Podman\"")
install_package podman
install_dependencies podman-docker
if pacman -Qs nvidia-open > /dev/null || pacman -Qs nvidia-open-lts > /dev/null || pacman -Qs linux-cachyos-nvidia-open > /dev/null || pacman -Qs nvidia-open-dkms > /dev/null; then
install_dependencies nvidia-container-toolkit
fi
sudo systemctl enable --now podman.socket
;;
"\"Docker\"")
install_package docker
install_dependencies docker-compose
if pacman -Qs nvidia > /dev/null; then
install_dependencies nvidia-container-toolkit
fi
sudo systemctl enable --now docker
sudo usermod -aG docker "$USER"
;;
"\"Distrobox\"")
install_package distrobox
;;
esac
done
}
# Function name: Setup plasma KDE
# Description: Install and setup Plasma KDE
setup_plasma_kde() {
if whiptail --title "Setup Plasma KDE" --yesno "Would you like to setup Plasma KDE?" 10 60; then
install_package plasma-meta gwenview kate okular kcalc gparted kdeconnect
install_dependencies qt6-quick3d
if pacman -Qs sddm > /dev/null; then
sudo systemctl enable sddm
if [ -f /etc/sddm.conf.d/10-wayland.conf ]; then
echo "SDDM wayland configuration already exists."
else
echo "[General]" | sudo tee /etc/sddm.conf.d/10-wayland.conf
echo "DisplayServer=wayland" | sudo tee -a /etc/sddm.conf.d/10-wayland.conf
echo "GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell" | sudo tee -a /etc/sddm.conf.d/10-wayland.conf
echo "" | sudo tee -a /etc/sddm.conf.d/10-wayland.conf
echo "[Wayland]" | sudo tee -a /etc/sddm.conf.d/10-wayland.conf
echo "CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1" | sudo tee -a /etc/sddm.conf.d/10-wayland.conf
fi
fi
if ! grep -q "ELECTRON_OZONE_PLATFORM_HINT" /etc/environment; then
echo "ELECTRON_OZONE_PLATFORM_HINT=auto" | sudo tee -a /etc/environment
fi
if [ ! -f ~/.config/electron-flags.conf ]; then
mkdir -p ~/.config
echo "--enable-features=WaylandWindowDecorations" > ~/.config/electron-flags.conf
echo "--ozone-platform-hint=auto" >> ~/.config/electron-flags.conf
fi
fi
}
# Function name: Setup gaming packages
# Description: Install choosen launchers and gaming related packages
setup_gaming() {
options=(
"Steam" "Install Steam (Steam Games)" ON
"Heroic Games Launcher" "Install Heroic Games Launcher (Epic Games, GOG Games, Amazon Games)" ON
"Anime Games Launcher" "Install Anime Games Launcher (Honkai 3, Genshin Impact, Honkai: Star Rail, Zenless Zone Zero)" OFF
"UmU Launcher" "Install UmU Launcher (Start games using proton without steam)" OFF
"Goverlay" "Install Goverlay for overlays and enhancements" ON
"GameMode" "Install GameMode for performance optimization" ON
"GameScope" "Install GameScope for gaming performance improvements" ON
"MangoHud" "Install MangoHud for performance monitoring and overlays" ON
)
selected_gaming=$(whiptail --title "Setup Gaming" --checklist \
"Choose the gaming packages you want to install:" 20 78 8 \
"${options[@]}" 3>&1 1>&2 2>&3)
for game in $selected_gaming; do
case $game in
"\"Steam\"")
install_package steam-native-runtime
;;
"\"Heroic Games Launcher\"")
install_package heroic-games-launcher-bin
;;
"\"Anime Games Launcher\"")
install_package anime-games-launcher-git
;;
"\"UmU Launcher\"")
install_package umu-launcher
;;
"\"Goverlay\"")
install_package goverlay
;;
"\"GameMode\"")
install_package gamemode
;;
"\"GameScope\"")
install_package gamescope
;;
"\"MangoHud\"")
install_package mangohud
;;
esac
done
}
# Main script # Main script
check_whiptail check_whiptail
#setup_disk_partitioning
setup_repositories setup_repositories
update_system
setup_pacman setup_pacman
setup_browser setup_shell
install_packages_group setup_audio_server
setup_plymouth
setup_gpu setup_gpu
setup_plymouth
setup_network
setup_bluetooth
setup_firewall setup_firewall
setup_ntp
setup_flatpak setup_flatpak
setup_fwupd setup_fwupd
setup_kdeconnect setup_u2f
setup_office_suite setup_fprint
setup_smartcard
setup_openrgb
setup_browser
setup_office_suite
setup_mail_client
setup_virtualization
setup_containers
setup_plasma_kde
setup_gaming
# Packages group definitions
# Package groups
theme_packages=(
btop-theme-catppuccin
catppuccin-cursors-mocha
catppuccin-gtk-theme-mocha
papirus-folders-catppuccin-git
plymouth-theme-catppuccin-mocha-git
#refind-theme-catppuccin-git
sddm-theme-catppuccin-git
)
gnome_apps=(
gnome-console
gnome-disk-utility
gnome-firmware
)
games_packages=(
steam-native-runtime
heroic-games-launcher-bin
an-anime-game-launcher-bin
honkers-launcher-bin
sleepy-launcher-bin
the-honkers-railway-launcher-bin
umu-launcher
goverlay
gamemode
gamescope
mangohud
)
cups_packages=(
cups
cups-pdf
cups-filters
system-config-printer
)
developer_packages=(
git
visual-studio-code-bin
)

View File

@@ -32,7 +32,7 @@ function setupDesktopEnvironment() {
"5" "MATE" \ "5" "MATE" \
"6" "Budgie" \ "6" "Budgie" \
"7" "Sway" \ "7" "Sway" \
"8" "Hyprland" 3>&1 1>&2 2>&3) "8" "Hyprland" 3>&1 1>&2 2>&3)
case $DE in case $DE in
1) installGNOME ;; 1) installGNOME ;;
2) installKDE ;; 2) installKDE ;;
@@ -63,7 +63,7 @@ function installKDE() {
sudo dnf group install kde-desktop -y sudo dnf group install kde-desktop -y
sudo dnf in kde-connect -y sudo dnf in kde-connect -y
elif [[ $DISTRO == "arch" ]]; then elif [[ $DISTRO == "arch" ]]; then
sudo pacman -S --needed plasma plasma-meta kdeconnect packagekit-qt6 plymouth-kcm flatpak-kcm sddm-kcm --noconfirm sudo pacman -S --needed plasma-meta kdeconnect gwenview --noconfirm
fi fi
} }

View File

@@ -21,18 +21,18 @@ if ! command -v podman &>/dev/null && ! command -v docker &>/dev/null; then
docker) docker)
if [[ $DISTRO =~ (debian|ubuntu) ]]; then if [[ $DISTRO =~ (debian|ubuntu) ]]; then
sudo apt install docker.io -y sudo apt install docker.io -y
elif [[ $DISTRO == "fedora" ]]; then elif [[ $DISTRO == "fedora" ]]; then
sudo dnf install docker -y sudo dnf install docker -y
elif [[ $DISTRO == "arch" ]]; then elif [[ $DISTRO == "arch" ]]; then
sudo pacman -S --needed docker --noconfirm sudo pacman -S --needed docker --noconfirm
fi fi
;; ;;
podman) podman)
if [[ $DISTRO =~ (debian|ubuntu) ]]; then if [[ $DISTRO =~ (debian|ubuntu) ]]; then
sudo apt install podman -y sudo apt install podman -y
elif [[ $DISTRO == "fedora" ]]; then elif [[ $DISTRO == "fedora" ]]; then
sudo dnf install podman -y sudo dnf install podman -y
elif [[ $DISTRO == "arch" ]]; then elif [[ $DISTRO == "arch" ]]; then
sudo pacman -S --needed podman --noconfirm sudo pacman -S --needed podman --noconfirm
fi fi
;; ;;
@@ -46,10 +46,9 @@ OPTIONS=(
"fedora-rawhide" "Fedora Rawhide" off "fedora-rawhide" "Fedora Rawhide" off
"almalinux" "AlmaLinux" off "almalinux" "AlmaLinux" off
"opensuse-tumbleweed" "OpenSUSE Tumbleweed" off "opensuse-tumbleweed" "OpenSUSE Tumbleweed" off
"steamos" "SteamOS" off
"void" "Void Linux" off "void" "Void Linux" off
) )
CHOICES=$(whiptail --title "Select Containers" --checklist "Choose the containers you want to setup" 20 78 7 "${OPTIONS[@]}" 3>&1 1>&2 2>&3) CHOICES=$(whiptail --title "Select Containers" --checklist "Choose the containers you want to setup" 15 60 6 "${OPTIONS[@]}" 3>&1 1>&2 2>&3)
for CHOICE in $CHOICES; do for CHOICE in $CHOICES; do
CHOICE=$(echo $CHOICE | tr -d '"') CHOICE=$(echo $CHOICE | tr -d '"')

View File

@@ -1,443 +0,0 @@
#!/bin/bash
# global var
DISTRO=""
function getDistributionType() {
echo "Detecting distribution..."
if [[ -e /etc/debian_version ]]; then
source /etc/os-release
if [[ $ID == "debian" || $ID == "raspbian" ]]; then
DISTRO="debian"
elif [[ $ID == "ubuntu" ]]; then
DISTRO="ubuntu"
fi
elif [[ -e /etc/system-release ]]; then
DISTRO="fedora"
elif [[ -e /etc/arch-release ]]; then
DISTRO="arch"
else
whiptail --title "Error" --msgbox "Incompatible Linux Distribution." 8 78
exit 1
fi
echo "Detected distribution $DISTRO"
}
function checkWhiptail() {
echo "Checking whiptail..."
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 libnewt
fi
fi
echo "Whiptail installed."
}
function updateSystem() {
if (whiptail --title "System Update" --yesno "Should we update the system?" 8 78); then
echo "Updating system..."
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
sudo apt update && sudo apt upgrade -y
elif [[ $DISTRO == "fedora" ]]; then
sudo dnf up -y
elif [[ $DISTRO == "arch" ]]; then
sudo pacman -Syu --noconfirm
fi
whiptail --title "Success" --msgbox "Update done!" 8 78
fi
}
function installBasicPackages() {
echo "Installing basic packages..."
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
sudo apt install sudo nano bat git curl wget htop btop flatpak -y
elif [[ $DISTRO == "fedora" ]]; then
sudo dnf in sudo nano bat git curl wget htop btop flatpak -y
elif [[ $DISTRO == "arch" ]]; then
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
fi
fi
}
function setupRepositories() {
echo "Setting up repositories..."
echo "Enabling flatpak..."
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
echo "Enabling third-party repositories..."
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
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
# 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 dnf4 copr enable atim/heroic-games-launcher -y
if grep -q "Rawhide" /etc/fedora-release; then
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" -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
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
fi
elif [[ $DISTRO == "arch" ]]; then
if ! grep -q "chaotic-aur" /etc/pacman.conf; then
yes | sudo pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
yes | sudo pacman-key --lsign-key 3056513887B78AEB
sudo pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst' --noconfirm
echo -e '[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist' | sudo tee -a /etc/pacman.conf
else
echo Chaotic-AUR already setup
fi
if ! grep -q "blackarch" /etc/pacman.conf; then
curl -sSL https://blackarch.org/strap.sh | sudo bash
else
echo BlackArch already setup
fi
sudo pacman -S --needed yay --noconfirm
fi
}
function installDistroSpecificPackages() {
echo "Installing distribution specific packages..."
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
echo "None for now"
elif [[ $DISTRO == "fedora" ]]; then
echo "None for now"
elif [[ $DISTRO == "arch" ]]; then
# Base and utility packages
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 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 bluez bluez-utils
# Sound
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 installGraphicsDrivers() {
if (whiptail --title "Graphics Drivers" --yesno "Should we install graphics drivers?" 8 78); then
echo "Installing graphics drivers..."
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
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 swap ffmpeg-free ffmpeg --allowerasing -y
sudo dnf in vlc mpv -y
sudo dnf4 groupupdate multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin -y
sudo dnf4 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 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
else
return
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
echo "fastfetch" >> ~/.bashrc
fi
fi
if [ -e ~/.zshrc ]; then
if ! grep -q "fastfetch" ~/.zshrc; then
echo "fastfetch" >> ~/.zshrc
fi
fi
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 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
sudo apt install steam gamescope gamemode mangohud lutris goverlay -y
elif [[ $DISTRO == "fedora" ]]; then
sudo flatpak install flathub net.davidotek.pupgui2 -y --noninteractive --system
sudo dnf in steam gamescope gamemode mangohud lutris heroic-games-launcher-bin goverlay -y
if grep -q "Rawhide" /etc/fedora-release; then
installAAGL-on-fedora
else
sudo flatpak install launcher.moe moe.launcher.an-anime-game-launcher -y --noninteractive --system
sudo flatpak install launcher.moe moe.launcher.honkers-launcher -y --noninteractive --system
sudo flatpak install launcher.moe moe.launcher.the-honkers-railway-launcher -y --noninteractive --system
fi
elif [[ $DISTRO == "arch" ]]; then
sudo pacman -S --needed steam gamescope gamemode lib32-gamemode mangohud vkd3d lib32-vkd3d python-protobuf wine xorg-xgamma lutris goverlay protonup-qt heroic-games-launcher-bin --noconfirm
yay -S --needed honkers-launcher-bin an-anime-game-launcher-bin the-honkers-railway-launcher-bin --noconfirm
fi
fi
}
function installAAGL-on-fedora() {
sudo mkdir /tmp/aagl/
sudo dnf in -y xdelta
sudo wget https://github.com/an-anime-team/honkers-launcher/releases/latest/download/honkers-launcher -O /tmp/aagl/honkers-launcher
sudo wget https://github.com/an-anime-team/an-anime-game-launcher/releases/latest/download/anime-game-launcher -O /tmp/aagl/anime-game-launcher
sudo wget https://github.com/an-anime-team/the-honkers-railway-launcher/releases/latest/download/honkers-railway-launcher -O /tmp/aagl/honkers-railway-launcher
sudo chown root:root /tmp/aagl/*
sudo chmod +x /tmp/aagl/*
sudo cp /tmp/aagl/honkers-launcher /bin/honkers-launcher
sudo cp /tmp/aagl/anime-game-launcher /bin/an-anime-game-launcher
sudo cp /tmp/aagl/honkers-railway-launcher /bin/the-honkers-railway-launcher
sudo touch /usr/share/applications/honkers-launcher.desktop
sudo touch /usr/share/applications/anime-game-launcher.desktop
sudo touch /usr/share/applications/the-honkers-railway-launcher.desktop
echo -e "[Desktop Entry]\nName=Honkers Launcher\nComment=A Launcher for honkers with auto-patching, discord rpc and time tracking\nExec=honkers-launcher\nTerminal=false\nType=Application\nIcon=honkers-launcher\nCategories=Game" | sudo tee /usr/share/applications/honkers-launcher.desktop
echo -e "[Desktop Entry]\nName=An Anime Game Launcher\nComment=A Launcher for a specific anime game with auto-patching, discord rpc and time tracking\nExec=an-anime-game-launcher\nTerminal=false\nType=Application\nIcon=an-anime-game-launcher\nCategories=Game" | sudo tee /usr/share/applications/anime-game-launcher.desktop
echo -e "[Desktop Entry]\nName=The Honkers Railway Launcher\nComment=A Launcher for honkers railway with auto-patching, discord rpc and time tracking\nExec=the-honkers-railway-launcher\nTerminal=false\nType=Application\nIcon=the-honkers-railway-launcher\nCategories=Game" | sudo tee /usr/share/applications/the-honkers-railway-launcher.desktop
sudo wget https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/assets/moe.launcher.honkers-launcher -O /usr/share/icons/moe.launcher.honkers-launcher
sudo wget https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/assets/moe.launcher.an-anime-game-launcher -O /usr/share/icons/moe.launcher.an-anime-game-launcher
sudo wget https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/assets/moe.launcher.the-honkers-railway-launcher -O /usr/share/icons/moe.launcher.the-honkers-railway-launcher
}
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 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 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
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://$HOST -i pam://$HOST > ~/.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://$HOST appid=pam://$HOST" | sudo tee /etc/pam.d/u2f-required
echo -e "#%PAM-1.0\nauth sufficient pam_u2f.so cue origin=pam://$HOST appid=pam://$HOST" | sudo tee /etc/pam.d/u2f-sufficient
fi
}
function installRGB() {
if (whiptail --title "OpenRazer" --yesno "Should we install OpenRazer?" 8 78); then
if [[ $DISTRO =~ (debian|ubuntu) ]]; then
sudo apt install openrazer -y
elif [[ $DISTRO == "fedora" ]]; then
sudo dnf install
sudo dnf in kernel-devel openrazer-meta -y
elif [[ $DISTRO == "arch" ]]; then
sudo pacman -S --needed openrazer-daemon --noconfirm
fi
sudo gpasswd -a "$USER" plugdev
fi
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
sudo dnf in openrgb i2c-tools libi2c libi2c-devel libi2cd python3-i2c-tools -y
elif [[ $DISTRO == "arch" ]]; then
sudo pacman -S --needed openrgb --noconfirm
fi
sudo gpasswd -a "$USER" plugdev
fi
}
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
elif [[ $DISTRO == "fedora" ]]; then
sudo dnf in alacritty kitty kitty-bash-integration zsh autojump-zsh zsh-autosuggestions zsh-syntax-highlighting -y
elif [[ $DISTRO == "arch" ]]; then
sudo pacman -S --needed alacritty kitty kitty-shell-integration kitty-terminfo zsh zsh-autosuggestions zsh-completions zsh-history-substring-search zsh-lovers zsh-syntax-highlighting grml-zsh-config --noconfirm
fi
chsh --shell /bin/zsh
fi
}
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 code android-tools -y
elif [[ $DISTRO == "fedora" ]]; then
sudo dnf in mariadb-server code android-tools -y
elif [[ $DISTRO == "arch" ]]; then
sudo pacman -S --needed mariadb visual-studio-code-bin android-tools android-udev --noconfirm
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
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 -r -p "Are you sure you want to continue? [N/y] " response
if [[ "$response" =~ ^[Yy]$ ]]; then
echo "Continuing..."
getDistributionType
checkWhiptail
updateSystem
installBasicPackages
setupRepositories
installDistroSpecificPackages
installGraphicsDrivers
setupFastfetch
installWebBrowsers
installGamingPackages
installSocialAndCommunicationPackages
installVirtualizationAncContainerPackages
setupU2F
installRGB
installTerminal
installDevPackages
installSoftware
else
echo "Script execution aborted."
exit 1
fi