First step in cleaning the script

This commit is contained in:
2025-09-17 22:38:28 +02:00
parent a2cef0fed9
commit 39f6c06f69

View File

@@ -62,16 +62,19 @@ setup_repositories() {
case $repo in case $repo in
"\"CachyOS\"") "\"CachyOS\"")
if ! grep -q "\[cachyos\]" /etc/pacman.conf; then if ! grep -q "\[cachyos\]" /etc/pacman.conf; then
echo "== Adding CachyOS repository =="
curl https://mirror.cachyos.org/cachyos-repo.tar.xz -o /tmp/cachyos-repo.tar.xz curl https://mirror.cachyos.org/cachyos-repo.tar.xz -o /tmp/cachyos-repo.tar.xz
tar xvf /tmp/cachyos-repo.tar.xz -C /tmp tar xvf /tmp/cachyos-repo.tar.xz -C /tmp
cd /tmp/cachyos-repo || exit cd /tmp/cachyos-repo || exit
sudo ./cachyos-repo.sh sudo ./cachyos-repo.sh
echo "CachyOS repository added successfully."
else else
echo "CachyOS repository is already installed." echo "CachyOS repository is already installed."
fi fi
;; ;;
"\"Chromatic\"") "\"Chromatic\"")
if ! grep -q "\[chromatic\]" /etc/pacman.conf; then if ! grep -q "\[chromatic\]" /etc/pacman.conf; then
echo "== Adding Chromatic repository =="
sudo pacman-key --recv-key 6EFB412EBDDD1853DF71F4B625AE803AA8C39062 sudo pacman-key --recv-key 6EFB412EBDDD1853DF71F4B625AE803AA8C39062
sudo pacman-key --lsign-key 6EFB412EBDDD1853DF71F4B625AE803AA8C39062 sudo pacman-key --lsign-key 6EFB412EBDDD1853DF71F4B625AE803AA8C39062
sudo pacman -U --noconfirm 'https://mirror.trap.moe/chromatic/x86_64/chromatic-keyring-1.0-1-any.pkg.tar.zst' sudo pacman -U --noconfirm 'https://mirror.trap.moe/chromatic/x86_64/chromatic-keyring-1.0-1-any.pkg.tar.zst'
@@ -79,29 +82,35 @@ setup_repositories() {
echo '[chromatic]' | sudo tee -a /etc/pacman.conf echo '[chromatic]' | sudo tee -a /etc/pacman.conf
echo 'Include = /etc/pacman.d/chromatic-mirrorlist' | sudo tee -a /etc/pacman.conf echo 'Include = /etc/pacman.d/chromatic-mirrorlist' | sudo tee -a /etc/pacman.conf
sudo pacman -Sy --noconfirm chromatic-keyring chromatic-mirrorlist sudo pacman -Sy --noconfirm chromatic-keyring chromatic-mirrorlist
echo "Chromatic repository added successfully."
else else
echo "Chromatic repository is already installed." echo "Chromatic repository is already installed."
fi fi
;; ;;
"\"BlackArch\"") "\"BlackArch\"")
if ! grep -q "\[blackarch\]" /etc/pacman.conf; then if ! grep -q "\[blackarch\]" /etc/pacman.conf; then
echo "== Adding BlackArch repository =="
curl -O https://blackarch.org/strap.sh curl -O https://blackarch.org/strap.sh
chmod +x strap.sh chmod +x strap.sh
sudo sed -i 's/msg '\''installing blackarch-officials meta-package...'\''/#msg '\''installing blackarch-officials meta-package...'\''/' strap.sh sudo sed -i 's/msg '\''installing blackarch-officials meta-package...'\''/#msg '\''installing blackarch-officials meta-package...'\''/' strap.sh
sudo sed -i 's/pacman -S --noconfirm --needed blackarch-officials/#pacman -S --noconfirm --needed blackarch-officials/' strap.sh sudo sed -i 's/pacman -S --noconfirm --needed blackarch-officials/#pacman -S --noconfirm --needed blackarch-officials/' strap.sh
sudo ./strap.sh sudo ./strap.sh
echo "BlackArch repository added successfully."
else else
echo "BlackArch repository is already installed." echo "BlackArch repository is already installed."
fi fi
;; ;;
"\"Chaotic.cx\"") "\"Chaotic.cx\"")
if ! grep -q "\[chaotic-aur\]" /etc/pacman.conf; then if ! grep -q "\[chaotic-aur\]" /etc/pacman.conf; then
echo "== Adding Chaotic.cx repository =="
sudo pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com sudo pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
sudo pacman-key --lsign-key 3056513887B78AEB sudo pacman-key --lsign-key 3056513887B78AEB
sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst'
sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst' sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
echo '[chaotic-aur]' | sudo tee -a /etc/pacman.conf echo '[chaotic-aur]' | sudo tee -a /etc/pacman.conf
echo 'Include = /etc/pacman.d/chaotic-mirrorlist' | sudo tee -a /etc/pacman.conf echo 'Include = /etc/pacman.d/chaotic-mirrorlist' | sudo tee -a /etc/pacman.conf
sudo pacman -Sy --noconfirm chaotic-keyring chaotic-mirrorlist
echo "Chaotic.cx repository added successfully."
else else
echo "Chaotic.cx repository is already installed." echo "Chaotic.cx repository is already installed."
fi fi
@@ -114,6 +123,7 @@ setup_repositories() {
# Function name: Setup Pacman configuration # Function name: Setup Pacman configuration
# Description: Setup Pacman configuration # Description: Setup Pacman configuration
setup_pacman() { setup_pacman() {
echo "== Setting up Pacman configuration =="
sudo sed -i 's/#Color/Color/' /etc/pacman.conf sudo sed -i 's/#Color/Color/' /etc/pacman.conf
sudo sed -i 's/#ILoveCandy/ILoveCandy/' /etc/pacman.conf sudo sed -i 's/#ILoveCandy/ILoveCandy/' /etc/pacman.conf
sudo sed -i 's/#VerbosePkgLists/VerbosePkgLists/' /etc/pacman.conf sudo sed -i 's/#VerbosePkgLists/VerbosePkgLists/' /etc/pacman.conf
@@ -121,10 +131,11 @@ setup_pacman() {
sudo sed -i 's/#PrettyProgressBar/PrettyProgressBar/' /etc/pacman.conf sudo sed -i 's/#PrettyProgressBar/PrettyProgressBar/' /etc/pacman.conf
sudo sed -i 's/#ParallelDownloads = 5/ParallelDownloads = 10/' /etc/pacman.conf sudo sed -i 's/#ParallelDownloads = 5/ParallelDownloads = 10/' /etc/pacman.conf
sudo sed -i 's/#DisableDownloadTimeout/DisableDownloadTimeout/' /etc/pacman.conf sudo sed -i 's/#DisableDownloadTimeout/DisableDownloadTimeout/' /etc/pacman.conf
echo "Pacman configuration set up successfully."
} }
# Function name: Setup shell # Function name: Setup shell
# Description: Install selected shell and recommendations # Description: Install selected shell and recommended packages
setup_shell() { setup_shell() {
options=( options=(
"Zsh" "Install Zsh and recommended packages" ON "Zsh" "Install Zsh and recommended packages" ON
@@ -138,18 +149,23 @@ setup_shell() {
case $selected_shell in case $selected_shell in
"\"Zsh\"") "\"Zsh\"")
echo "== Installing Zsh and recommended packages =="
install_package zsh zsh-autosuggestions zsh-completions zsh-history-substring-search zsh-syntax-highlighting grml-zsh-config oh-my-zsh-git 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 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 chsh -s /bin/zsh
fi fi
echo "Zsh and recommended packages installed successfully."
;; ;;
"\"Fish\"") "\"Fish\"")
echo "== Installing Fish shell and recommended packages =="
install_package 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 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 chsh -s /usr/bin/fish
fi fi
echo "Fish shell and recommended packages installed successfully."
;; ;;
"\"Bash\"") "\"Bash\"")
echo "== Installing Bash and recommended packages =="
install_package bash install_package bash
install_dependencies bash-completion install_dependencies bash-completion
if pacman -Qs bash-completion > /dev/null; then if pacman -Qs bash-completion > /dev/null; then
@@ -158,6 +174,7 @@ setup_shell() {
if (whiptail --title "Change default shell to Bash" --yesno "Would you like to change the default shell to Bash?" 10 60); then 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 chsh -s /bin/bash
fi fi
echo "Bash and recommended packages installed successfully."
;; ;;
esac esac
} }
@@ -166,7 +183,9 @@ setup_shell() {
# Description: Install pipewire and its dependencies # Description: Install pipewire and its dependencies
setup_audio_server() { setup_audio_server() {
if whiptail --title "Setup Audio Server" --yesno "Would you like to setup Pipewire?" 10 60; then if whiptail --title "Setup Audio Server" --yesno "Would you like to setup Pipewire?" 10 60; then
echo "== Installing Pipewire and its dependencies =="
install_dependencies pipewire pipewire-pulse pipewire-alsa pipewire-jack wireplumber install_dependencies pipewire pipewire-pulse pipewire-alsa pipewire-jack wireplumber
echo "Pipewire and its dependencies installed successfully."
fi fi
} }
@@ -177,6 +196,7 @@ setup_gpu() {
detected_gpu=$(lspci | grep -Ei "vga|3d|display") detected_gpu=$(lspci | grep -Ei "vga|3d|display")
case "$detected_gpu" in case "$detected_gpu" in
*NVIDIA*) *NVIDIA*)
echo "== Detected NVIDIA GPU =="
options=( options=(
"nvidia" "Official NVIDIA Drivers" ON "nvidia" "Official NVIDIA Drivers" ON
"nouveau" "Open Source nouveau drivers" OFF "nouveau" "Open Source nouveau drivers" OFF
@@ -185,6 +205,7 @@ setup_gpu() {
"Choose the NVIDIA driver you want to install:" 15 60 2 \ "Choose the NVIDIA driver you want to install:" 15 60 2 \
"${options[@]}" 3>&1 1>&2 2>&3) "${options[@]}" 3>&1 1>&2 2>&3)
echo "== Removing existing incorrect NVIDIA drivers if any =="
if pacman -Qs nvidia > /dev/null; then if pacman -Qs nvidia > /dev/null; then
sudo pacman -R --noconfirm nvidia sudo pacman -R --noconfirm nvidia
elif pacman -Qs nvidia-dkms > /dev/null; then elif pacman -Qs nvidia-dkms > /dev/null; then
@@ -196,39 +217,50 @@ 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
echo "=== Installing nvidia open for linux ==="
install_package nvidia-open install_package nvidia-open
install_dependencies libvdpau install_dependencies libvdpau
fi fi
if pacman -Qs linux-lts > /dev/null; then if pacman -Qs linux-lts > /dev/null; then
echo "=== Installing nvidia open for linux-lts ==="
install_package nvidia-open-lts install_package nvidia-open-lts
install_dependencies libvdpau install_dependencies libvdpau
fi fi
if pacman -Qs linux-cachyos > /dev/null; then if pacman -Qs linux-cachyos > /dev/null; then
echo "=== Installing nvidia open for linux-cachyos ==="
install_package linux-cachyos-nvidia-open install_package linux-cachyos-nvidia-open
install_dependencies libvdpau 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
echo "=== Installing nvidia open dkms for other kernels ==="
install_package nvidia-open-dkms install_package nvidia-open-dkms
install_dependencies libvdpau install_dependencies libvdpau
fi fi
if ! lspci | grep -Ei "amd|intel" > /dev/null; then if ! lspci | grep -Ei "amd|intel" > /dev/null; then
echo "=== Installing libva-nvidia-driver for NVIDIA only systems ==="
install_dependencies 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
echo "=== Installing Cuda ==="
install_dependencies cuda install_dependencies cuda
fi fi
;; ;;
"\"nouveau\"") "\"nouveau\"")
echo "=== Installing nouveau drivers ==="
install_dependencies mesa vulkan-nouveau install_dependencies mesa vulkan-nouveau
;; ;;
esac esac
;; ;;
*AMD*) *AMD*)
echo "== Detected AMD GPU =="
echo "=== Installing AMD drivers ==="
install_dependencies mesa vulkan-radeon install_dependencies mesa vulkan-radeon
;; ;;
*Intel*) *Intel*)
echo "== Detected Intel GPU =="
echo "=== Installing Intel drivers ==="
install_dependencies intel-media-driver vulkan-intel install_dependencies intel-media-driver vulkan-intel
;; ;;
esac esac
@@ -239,14 +271,20 @@ setup_gpu() {
# Description: Install and setup Plymouth for boot splash # Description: Install and setup Plymouth for boot splash
setup_plymouth() { setup_plymouth() {
if whiptail --title "Setup Plymouth" --yesno "Would you like to setup Plymouth?" 10 60; then if whiptail --title "Setup Plymouth" --yesno "Would you like to setup Plymouth?" 10 60; then
echo "quiet splash" | sudo tee -a /etc/kernel/cmdline echo "== Setting up Plymouth =="
sudo sed -i 's/^HOOKS=(base udev autodetect microcode/HOOKS=(base udev autodetect microcode plymouth /' /etc/mkinitcpio.conf if ! grep -q "splash" /etc/kernel/cmdline; then
echo "quiet splash" | sudo tee -a /etc/kernel/cmdline
fi
if ! grep -q "plymouth" /etc/mkinitcpio.conf; then
sudo sed -i 's/^HOOKS=(base udev autodetect microcode/HOOKS=(base udev autodetect microcode plymouth /' /etc/mkinitcpio.conf
fi
install_package plymouth install_package plymouth
if pacman -Qs plymouth-theme-catppuccin-mocha-git > /dev/null; then if pacman -Qs plymouth-theme-catppuccin-mocha-git > /dev/null; then
sudo plymouth-set-default-theme -R catppuccin-mocha sudo plymouth-set-default-theme -R catppuccin-mocha
else else
sudo plymouth-set-default-theme -R spinner sudo plymouth-set-default-theme -R spinner
fi fi
echo "Plymouth setup completed."
fi fi
} }
@@ -264,7 +302,8 @@ setup_network() {
# Description: Install and setup Bluetooth and its dependencies # Description: Install and setup Bluetooth and its dependencies
setup_bluetooth() { setup_bluetooth() {
if whiptail --title "Setup Bluetooth" --yesno "Would you like to setup Bluetooth?" 10 60; then if whiptail --title "Setup Bluetooth" --yesno "Would you like to setup Bluetooth?" 10 60; then
install_dependencies bluedevil bluez bluez-utils echo "== Installing Bluetooth and its dependencies =="
install_dependencies bluedevil bluez
sudo systemctl enable --now bluetooth sudo systemctl enable --now bluetooth
fi fi
} }
@@ -275,8 +314,6 @@ setup_u2f() {
if whiptail --title "Setup U2F" --yesno "Would you like to setup U2F (Yubikey) authentication?" 10 60; then if whiptail --title "Setup U2F" --yesno "Would you like to setup U2F (Yubikey) authentication?" 10 60; then
install_package pam-u2f install_package pam-u2f
mkdir -p ~/.config/Yubico mkdir -p ~/.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-required
sudo touch /etc/pam.d/u2f-sufficient 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 required pam_u2f.so cue origin=pam://$HOST appid=pam://$HOST" | sudo tee -a /etc/pam.d/u2f-required
@@ -290,6 +327,11 @@ setup_u2f() {
sudo cp /usr/lib/pam.d/polkit-1 /etc/pam.d/polkit-1 sudo cp /usr/lib/pam.d/polkit-1 /etc/pam.d/polkit-1
fi fi
sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/polkit-1 sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/polkit-1
if whiptail --title "Enroll U2F Device" --yesno "Would you like to enroll your U2F device now?" 10 60; then
echo "Enrolling U2F device..."
pamu2fcfg -o "pam://$HOST" -i "pam://$HOST" > ~/.config/Yubico/u2f_keys
whiptail --title "U2F Enrollment" --msgbox "U2F device enrolled successfully. You can add more devices by running 'pamu2fcfg -o \"pam://$HOST\" -i \"pam://$HOST\" >> ~/.config/Yubico/u2f_keys'." 10 60
fi
fi fi
} }
@@ -297,6 +339,7 @@ setup_u2f() {
# Description: setup fprint for login using fingerprint reader # Description: setup fprint for login using fingerprint reader
setup_fprint() { setup_fprint() {
if whiptail --title "Setup Fprint" --yesno "Would you like to setup fingerprint authentication (fprintd)?" 10 60; then if whiptail --title "Setup Fprint" --yesno "Would you like to setup fingerprint authentication (fprintd)?" 10 60; then
echo "== Installing fprintd and its dependencies =="
install_package fprintd install_package fprintd
install_dependencies imagemagick install_dependencies imagemagick
sudo systemctl enable --now fprintd sudo systemctl enable --now fprintd
@@ -306,17 +349,23 @@ setup_fprint() {
sudo cp /usr/lib/pam.d/polkit-1 /etc/pam.d/polkit-1 sudo cp /usr/lib/pam.d/polkit-1 /etc/pam.d/polkit-1
fi fi
sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/polkit-1 sudo sed -i '/^auth\s*include\s*system-auth/i auth include u2f-sufficient' /etc/pam.d/polkit-1
fprintd-enroll if whiptail --title "Enroll Fingerprint" --yesno "Would you like to enroll your fingerprint now?" 10 60; then
echo "Enrolling fingerprint..."
fprintd-enroll
fi
echo "Fprintd setup completed."
fi fi
} }
# function name : setup SmartCard [WIP] # function name : setup SmartCard [WIP]
# Description: setup pcscd for login using smartcard reader # Description: setup opensc for login using smartcard reader
setup_smartcard() { setup_smartcard() {
if whiptail --title "Setup SmartCard" --yesno "Would you like to setup SmartCard (pcscd) authentication?" 10 60; then if whiptail --title "Setup SmartCard" --yesno "Would you like to setup SmartCard (opensc) authentication?" 10 60; then
echo "== Installing opensc =="
install_package opensc install_package opensc
sudo systemctl enable --now pcscd sudo systemctl enable --now pcscd
sudo systemctl enable --now pcscd.socket sudo systemctl enable --now pcscd.socket
echo "SmartCard (opensc) setup completed."
fi fi
} }
@@ -326,30 +375,26 @@ setup_firewall() {
options=( options=(
"ufw" "Install UFW" ON "ufw" "Install UFW" ON
"firewalld" "Install Firewalld" OFF "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[@]}") selected_groups=$(whiptail --title "Setup Firewall" --checklist "Choose the firewall you want to install:" 20 78 2 "${options[@]}" 3>&1 1>&2 2>&3)
case $selected_groups in for group in $selected_groups; do
"ufw") case $group in
install_package ufw "\"ufw\"")
install_dependencies ufw-extras echo "== Installing UFW =="
sudo systemctl enable --now ufw install_package ufw
sudo ufw enable sudo systemctl enable --now ufw
;; sudo ufw enable
"firewalld") echo "UFW installed and started."
install_package firewalld ;;
sudo systemctl enable --now firewalld "\"firewalld\"")
;; echo "== Installing Firewalld =="
"iptables") install_package firewalld
install_package iptables sudo systemctl enable --now firewalld
;; echo "Firewalld installed and started."
"nftables") ;;
install_package nftables esac
install_package iptables-nft done
;;
esac
} }
# function name : Setup NTP # function name : Setup NTP
@@ -364,18 +409,22 @@ setup_ntp() {
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) 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 case $selected_ntp in
"\"ntpd-rs\"") "\"ntpd-rs\"")
echo "== Installing ntpd-rs =="
install_package ntpd-rs install_package ntpd-rs
sudo systemctl enable --now ntpd-rs sudo systemctl enable --now ntpd-rs
;; ;;
"\"chrony\"") "\"chrony\"")
echo "== Installing chrony =="
install_package chrony install_package chrony
sudo systemctl enable --now chronyd sudo systemctl enable --now chronyd
;; ;;
"\"openntpd\"") "\"openntpd\"")
echo "== Installing openntpd =="
install_package openntpd install_package openntpd
sudo systemctl enable --now openntpd sudo systemctl enable --now openntpd
;; ;;
"\"ntp\"") "\"ntp\"")
echo "== Installing ntp =="
install_package ntp install_package ntp
sudo systemctl enable --now ntpd sudo systemctl enable --now ntpd
;; ;;
@@ -395,17 +444,16 @@ setup_flatpak() {
# Description: setup fwupd # Description: setup fwupd
setup_fwupd() { setup_fwupd() {
if whiptail --title "Setup fwupd" --yesno "Would you like to setup fwupd?" 10 60; then if whiptail --title "Setup fwupd" --yesno "Would you like to setup fwupd?" 10 60; then
echo "== Installing fwupd =="
install_package fwupd install_package fwupd
install_dependencies fwupd-efi
sudo systemctl enable --now fwupd
sudo systemctl enable --now fwupd-refresh
fi fi
} }
# function name : setup OpenRGB # function name : setup OpenRGB
# Description: Install OpenRGB for RGB devices control # Description: Install OpenRGB for RGB devices control
setup_openrgb() { setup_openrgb() {
if whiptail --title "Setup fwupd" --yesno "Would you like to setup OpenRGB?" 10 60; then if whiptail --title "Setup OpenRGB" --yesno "Would you like to setup OpenRGB?" 10 60; then
echo "== Installing OpenRGB =="
install_package openrgb install_package openrgb
sudo gpasswd -a "$USER" plugdev sudo gpasswd -a "$USER" plugdev
sudo systemctl enable --now openrgb sudo systemctl enable --now openrgb
@@ -541,12 +589,14 @@ setup_mail_client() {
# Description: Install virtualization packages and enable libvirtd service # Description: Install virtualization packages and enable libvirtd service
setup_virtualization() { setup_virtualization() {
if whiptail --title "Setup Virtualization" --yesno "Would you like to setup virtualization?" 10 60; then if whiptail --title "Setup Virtualization" --yesno "Would you like to setup virtualization?" 10 60; then
echo "=== Installing virtualization packages ==="
install_package virt-manager qemu-full virt-viewer install_package virt-manager qemu-full virt-viewer
install_dependencies swtpm dnsmasq openbsd-netcat install_dependencies swtpm dnsmasq openbsd-netcat
if pacman -Qs libvirt > /dev/null; then if pacman -Qs libvirt > /dev/null; then
sudo systemctl enable --now libvirtd sudo systemctl enable --now libvirtd
sudo usermod -aG libvirt "$USER" sudo usermod -aG libvirt "$USER"
fi fi
echo "Virtualization setup completed."
fi fi
} }