#!/bin/bash # Arch Linux System Setup Module # Handles system packages, drivers, and core system configuration arch_install_system_base() { log SECTION "Installing Arch system base packages" local section_start=$(date +%s) if confirm "Install essential system packages?"; then local packages=( base-devel linux-headers git bc cmake gawk wget gettext unzip curl inetutils python python-pip python-pipx python-pynvim rustup timeshift ) install_packages "${packages[@]}" # Setup Rust rustup update stable rustup default stable log SUCCESS "System base packages installed $(show_timer $section_start)" fi } arch_install_drivers() { log SECTION "Installing graphics drivers" local section_start=$(date +%s) if role_enabled "NVIDIA_GPU" || role_enabled "NVIDIA_1080_GPU"; then if confirm "Install NVIDIA drivers?"; then log INFO "Installing NVIDIA drivers..." # Check if we already have nvidia drivers local new_kernel="no" if ! package_installed nvidia-open-dkms && ! package_installed nvidia-dkms; then new_kernel="yes" fi local nvidia_packages=(nvidia-dkms nvidia-utils nvidia-settings opencl-nvidia) # Add CUDA for high-end GPUs if role_enabled "NVIDIA_1080_GPU"; then nvidia_packages+=(cuda) fi # Add 32-bit libs for gaming if role_enabled "GAME"; then nvidia_packages+=(lib32-nvidia-utils) fi install_packages "${nvidia_packages[@]}" if [ "$new_kernel" == "yes" ]; then log WARNING "NVIDIA driver updated - kernel rebuild required" log WARNING "Please reboot and run the script again after reboot" exit 0 fi log SUCCESS "NVIDIA drivers installed $(show_timer $section_start)" fi else if confirm "Install Intel graphics drivers?"; then log INFO "Installing Intel graphics drivers..." install_packages mesa intel-media-driver log SUCCESS "Intel drivers installed $(show_timer $section_start)" fi fi } arch_setup_multilib() { if role_enabled "GAME"; then log SECTION "Enabling multilib repository" if ! grep -q "^\[multilib\]" /etc/pacman.conf; then if confirm "Enable multilib repository for gaming?"; then log INFO "Adding multilib repository..." sudo tee -a /etc/pacman.conf >/dev/null <