Compare commits

..

20 Commits

  1. 15
      README.md
  2. 67
      gnomesetup.sh
  3. 74
      install1.sh
  4. 59
      install2.sh
  5. 69
      install3.sh
  6. 69
      kdesetup.sh
  7. 132
      software.sh

@ -11,19 +11,11 @@ This step installs Arch to your hard drive. *IT WILL FORMAT THE DISK*
Boot into your Arch ISO & run commands:
```bash
# Installer 1
# Installer 1 & 2
curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/install1.sh -o install1.sh
sh install1.sh
# Installer 2
curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/install2.sh -o install2.sh
sh install2.sh
# Preparing for first boot
exit
umount -R /mnt
# Reboot Machine (remove installation media during reboot)
# Reboot machine when prompted (remove installation media during reboot)
reboot
```
@ -33,8 +25,7 @@ reboot
# Install Pacman Tools
sudo pacman -S --noconfirm pacman-contrib
# Installer 3 (Desktop & Nvidia Drivers)
sudo git clone https://git.merlinslair.net/beech/ArchScripts
# Installer 3 (Desktop, software & Nvidia Drivers)
cd ArchScripts
sh install3.sh

@ -5,49 +5,40 @@ echo
PKGS=(
# --- XORG Display Rendering
'xorg' # Base Package
'xorg-drivers' # Display Drivers
'xterm' # Terminal for TTY
'xorg-server' # XOrg server
'xorg-apps' # XOrg apps group
'xorg-xinit' # XOrg init
'xorg-xinput' # XOrg xinput
'xorg-twm' # XOrg twm
'xorg-xclock' # XOrg xclock
# --- XORG
'xorg'
'xorg-drivers'
'xterm'
'xorg-server'
'xorg-apps'
'xorg-xinit'
'xorg-xinput'
'xorg-twm'
'xorg-xclock'
'xf86-input-vmmouse'
'xf86-video-vmware'
'mesa'
# --- Setup Desktop
'gnome' # GNOME
# --- Login Display Manager
'sddm' # Base Login Manager
# --- Networking Setup
'dialog' # Enables shell scripts to trigger dialog boxex
'network-manager-applet' # System tray icon/utility for network connectivity
'dhclient' # DHCP client
'libsecret' # Library for storing passwords
'fail2ban' # Ban IP's after man failed login attempts
'ufw' # Uncomplicated firewall
# --- Desktop
'gnome'
# --- Login manager
'sddm'
# --- Networking
'dialog'
'network-manager-applet'
'dhclient'
'libsecret'
'fail2ban'
'ufw'
# --- Audio
'alsa-utils' # Advanced Linux Sound Architecture (ALSA) Components https://alsa.opensrc.org/
'alsa-plugins' # ALSA plugins
'pulseaudio' # Pulse Audio sound components
'pulseaudio-alsa' # ALSA configuration for pulse audio
'pavucontrol' # Pulse Audio volume control
'pnmixer' # System tray volume control
# --- Bluetooth
'bluez' # Daemons for the bluetooth protocol stack
'bluez-utils' # Bluetooth development and debugging utilities
'bluez-libs' # Bluetooth libraries
'bluez-firmware' # Firmware for Broadcom BCM203x and STLC2300 Bluetooth chips
'blueberry' # Bluetooth configuration tool
'pulseaudio-bluetooth' # Bluetooth support for PulseAudio
'pipewire'
'wireplumber'
'pipewire-pulse'
'pipewire-alsa'
'pavucontrol'
)
for PKG in "${PKGS[@]}"; do

@ -1,42 +1,45 @@
#!/usr/bin/env bash
# This WILL format and partition 1 drive in your system. It is recommended to run the script with only 1 drive installed.
# Selected drive is /dev/sda, replace sda with specified drive if you have multiple. List drives with 'lsblk'
# Change boot, SWAP, and root partition sizes to your needs in lines 15-17
echo "-------------------------------------------------"
echo "Arch Install Script 1 - Drive Setup"
echo "Arch Install Script 1 - Drive Setup. Please CTRL+C and edit the SWAP & ROOT partition sizes before running if you haven't already."
echo "-------------------------------------------------"
lsblk
echo "Specify drive name for install (ex. /dev/sda, /dev/nvme0n1). THIS WILL FORMAT & PARTITION THE SPECIFIED DRIVE!"
read -r -p "Enter the disk: " DISK
read -r DISK
if [[ ! -b $DISK ]]; then
echo "Disk $DISK does not exist."
exit 1
fi
echo -e "\nFormatting disk...\n$HR"
# disk prep
sgdisk -Z $DISK # zap all on disk
sgdisk -a 2048 -o $DISK # new gpt disk 2048 alignment
sgdisk -Z $DISK 2>/dev/null # zap all on disk
sgdisk -a 2048 -o $DISK 2>/dev/null # new gpt disk 2048 alignment
# create partitions
sgdisk -n 1:0:1024M $DISK # partition 1 (boot)
sgdisk -n 2:0:4G $DISK # partition 2 (SWAP - change to desired size)
sgdisk -n 3:0:35G $DISK # partition 3 (root - change to desired size)
sgdisk -n 4:0:0 $DISK # partition 4 (home, remaining space)
sgdisk -n 1:0:1024M $DISK 2>/dev/null # partition 1 (boot)
sgdisk -n 2:0:8G $DISK 2>/dev/null # partition 2 (SWAP - change to desired size)
sgdisk -n 3:0:75G $DISK 2>/dev/null # partition 3 (root - change to desired size)
sgdisk -n 4:0:0 $DISK 2>/dev/null # partition 4 (home, remaining space)
# set partition types
sgdisk -t 1:ef00 $DISK
sgdisk -t 2:8200 $DISK
sgdisk -t 3:8300 $DISK
sgdisk -t 4:8300 $DISK
# partition types
sgdisk -t 1:ef00 $DISK 2>/dev/null
sgdisk -t 2:8200 $DISK 2>/dev/null
sgdisk -t 3:8300 $DISK 2>/dev/null
sgdisk -t 4:8300 $DISK 2>/dev/null
# label partitions
sgdisk -c 1:"boot" $DISK
sgdisk -c 2:"swap" $DISK
sgdisk -c 3:"root" $DISK
sgdisk -c 4:"home" $DISK
sgdisk -c 1:"boot" $DISK 2>/dev/null
sgdisk -c 2:"swap" $DISK 2>/dev/null
sgdisk -c 3:"root" $DISK 2>/dev/null
sgdisk -c 4:"home" $DISK 2>/dev/null
# make filesystems
echo -e "\nCreating Filesystems...\n$HR"
mkfs.fat -F32 ${DISK}1 # FAT32 boot partition
@ -45,7 +48,6 @@ swapon ${DISK}2 # enable SWAP
mkfs.ext4 ${DISK}3
mkfs.ext4 ${DISK}4
# mount partitions
echo "-------------------------------------------------"
echo "Mounting Partitions"
echo "-------------------------------------------------"
@ -56,7 +58,14 @@ mkdir /mnt/home
mount ${DISK}1 /mnt/boot
mount ${DISK}4 /mnt/home
# set download mirrors
echo "-------------------------------------------------"
echo "Downloading 2nd install script"
echo "-------------------------------------------------"
curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/install2.sh -o /mnt/install2.sh
sed -i 's/\r$//' /mnt/install2.sh
chmod +x /mnt/install2.sh
echo "-------------------------------------------------"
echo "Enabling Parallel Downloads"
echo "-------------------------------------------------"
@ -66,7 +75,24 @@ pacman -Syy
pacman -S archlinux-keyring --noconfirm
pacman -S pacman-contrib rsync reflector terminus-font --noconfirm --needed
sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf
reflector -a 48 -c "US" -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist
cat > /etc/pacman.d/mirrorlist << 'EOF'
##
## Arch Linux repository mirrorlist
## Generated on install
##
EOF
if reflector -a 48 -c "US" -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist 2>/dev/null; then
sed -i -e '/^\[/d' -e '/^#/!{/^Server/!d}' /etc/pacman.d/mirrorlist
if ! grep -q "^Server" /etc/pacman.d/mirrorlist; then
echo "Warning: reflector produced invalid mirrorlist, restoring backup"
cp /etc/pacman.d/mirrorlist.backup /etc/pacman.d/mirrorlist
sed -i -e '/^\[/d' -e '/^#/!{/^Server/!d}' /etc/pacman.d/mirrorlist
fi
else
echo "Warning: reflector failed, restoring backup mirrorlist"
cp /etc/pacman.d/mirrorlist.backup /etc/pacman.d/mirrorlist
sed -i -e '/^\[/d' -e '/^#/!{/^Server/!d}' /etc/pacman.d/mirrorlist
fi
# install arch
echo "-------------------------------------------------"
@ -79,8 +105,6 @@ echo "-------------------------------------------------"
echo "Installed - Generating fstab"
echo "-------------------------------------------------"
# generate fstab
genfstab -U -p /mnt >> /mnt/etc/fstab
echo "-------------------------------------------------"
@ -88,4 +112,4 @@ echo "Finished install script 1. Run install2.sh"
echo "-------------------------------------------------"
# chroot
arch-chroot /mnt
arch-chroot /mnt /install2.sh

@ -19,44 +19,56 @@ echo "Create a USER password (should be different from root)."
passwd $Username
# File edits for user permissions
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
echo "Defaults rootpw" >> /etc/sudoers
# generate locales
sudo pacman -S bash-completion --noconfirm --needed
pacman -S reflector --noconfirm --needed 2>/dev/null || true
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup 2>/dev/null || true
cat > /etc/pacman.d/mirrorlist << 'EOF'
##
## Arch Linux repository mirrorlist
## Generated on install
##
EOF
if reflector -a 48 -c "US" -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist 2>/dev/null; then
sed -i -e '/^\[/d' -e '/^#/!{/^Server/!d}' /etc/pacman.d/mirrorlist
if ! grep -q "^Server" /etc/pacman.d/mirrorlist; then
echo "Warning: reflector produced invalid mirrorlist, restoring backup"
cp /etc/pacman.d/mirrorlist.backup /etc/pacman.d/mirrorlist
sed -i -e '/^\[/d' -e '/^#/!{/^Server/!d}' /etc/pacman.d/mirrorlist
fi
else
echo "Warning: reflector failed, restoring backup mirrorlist"
cp /etc/pacman.d/mirrorlist.backup /etc/pacman.d/mirrorlist
sed -i -e '/^\[/d' -e '/^#/!{/^Server/!d}' /etc/pacman.d/mirrorlist
fi
sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
# set timezone & link HW clock
ln -s /usr/share/zoneinfo/America/Chicago > /etc/localtime
ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime
hwclock --systohc --utc
# set hostname - edit archdesk with preferred hostname
echo "Set hostname (name of your PC on the network)."
read -r -p "Enter the hostname: " HOSTNAME
echo ${HOSTNAME} > /etc/hostname
# Enable TRIM
systemctl enable fstrim.timer
# mount efivars
mount -t efivarfs efivarfs /sys/firmware/efi/efivars/
# install bootloader
bootctl install
# Fix boot permissions
chmod 755 /boot
chmod 600 /boot/loader/random-seed 2>/dev/null || true
touch /boot/loader/entries/arch.conf
echo "title Arch" > /boot/loader/entries/arch.conf
@ -65,8 +77,6 @@ echo "initrd /initramfs-linux.img" >> /boot/loader/entries/arch.conf
echo "options root=PARTUUID=$(blkid -s PARTUUID -o value ${DISK}3) rw" >> /boot/loader/entries/arch.conf
# install NetworkManager
sudo pacman -S networkmanager --noconfirm --needed
sudo pacman -S git --noconfirm --needed
sudo sed -i '/^\#\[multilib\]/s/^#//' /etc/pacman.conf
@ -77,5 +87,18 @@ sudo systemctl enable NetworkManager.service
sudo systemctl start NetworkManager.service
echo "-------------------------------------------------"
echo "Arch Linux Installed & Configured. Please [exit] & run [umount -R /mnt] and reboot"
echo "Cloning ArchScripts repository"
echo "-------------------------------------------------"
if [ -n "$Username" ]; then
cd /home/$Username
sudo -u $Username git clone https://git.merlinslair.net/beech/ArchScripts.git 2>/dev/null || true
echo "ArchScripts repository cloned to /home/$Username/ArchScripts"
else
echo "Username not set, skipping repo clone"
fi
umount /sys/firmware/efi/efivars/ 2>/dev/null || true
echo "-------------------------------------------------"
echo "Arch Linux Installed & Configured. Please reboot"
echo "-------------------------------------------------"

@ -29,15 +29,64 @@ install_qemu () {
}
setup_nvidia () {
echo "Setting up Nvidia drivers..."
sudo pacman -Syu --noconfirm --needed
sudo pacman -S nvidia nvidia-utils lib32-nvidia-utils nvidia-settings --noconfirm --needed
sudo sed -i 's/^MODULES=().*/MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf
sudo sed -i 's/\(HOOKS=.*\) kms/\1/' /etc/mkinitcpio.conf
sudo mkinitcpio -P
sudo mkdir -p /etc/pacman.d/hooks/ && sudo cp nvidia.hook /etc/pacman.d/hooks/
sudo sed -i '/^options/ s/$/ nvidia-drm.modeset=1 nvidia_drm.fbdev=1 nvidia-drm.ForceCompositionPipeline=1 nvidia.NVreg_EnableGpuFirmware=0/' /boot/loader/entries/arch.conf
echo "Nvidia driver setup finished."
echo "-------------------------------------------------"
echo "NVIDIA Driver Selection"
echo "-------------------------------------------------"
nvidia_options=("Main NVIDIA Drivers (Latest)" "NVIDIA 580xx Drivers (Pascal/Older - AUR)" "Cancel")
echo "Select NVIDIA driver version:"
select nvidia_opt in "${nvidia_options[@]}"; do
case $REPLY in
1)
echo "Setting up main NVIDIA drivers..."
sudo pacman -Syu --noconfirm --needed
sudo pacman -S nvidia nvidia-utils lib32-nvidia-utils nvidia-settings --noconfirm --needed
sudo sed -i 's/^MODULES=().*/MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf
sudo sed -i 's/\(HOOKS=.*\) kms/\1/' /etc/mkinitcpio.conf
sudo mkinitcpio -P
sudo mkdir -p /etc/pacman.d/hooks/ && sudo cp nvidia.hook /etc/pacman.d/hooks/
sudo sed -i '/^options/ s/$/ nvidia-drm.modeset=1 nvidia_drm.fbdev=1 nvidia-drm.ForceCompositionPipeline=1 nvidia.NVreg_EnableGpuFirmware=0/' /boot/loader/entries/arch.conf
echo "NVIDIA driver setup finished."
break
;;
2)
echo "Setting up NVIDIA 580xx drivers (AUR)..."
# Check if yay is installed
if ! command -v yay &> /dev/null; then
echo "Yay is not installed. Installing yay..."
cd "${HOME}"
git clone "https://aur.archlinux.org/yay.git"
cd "${HOME}/yay"
makepkg -si
cd "${HOME}"
rm -rf "${HOME}/yay"
echo "Yay installation complete."
else
echo "Yay already installed."
fi
# Install 580xx drivers
sudo pacman -Syu --noconfirm --needed
yay -S nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils nvidia-580xx-settings opencl-nvidia-580xx lib32-opencl-nvidia-580xx --noconfirm --needed
sudo sed -i 's/^MODULES=().*/MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf
sudo sed -i 's/\(HOOKS=.*\) kms/\1/' /etc/mkinitcpio.conf
sudo mkinitcpio -P
sudo mkdir -p /etc/pacman.d/hooks/ && sudo cp nvidia.hook /etc/pacman.d/hooks/
sudo sed -i '/^options/ s/$/ nvidia-drm.modeset=1 nvidia_drm.fbdev=1 nvidia-drm.ForceCompositionPipeline=1 nvidia.NVreg_EnableGpuFirmware=0/' /boot/loader/entries/arch.conf
echo "NVIDIA 580xx driver setup finished."
break
;;
3)
echo "Cancelled NVIDIA driver setup."
break
;;
*)
echo "Invalid option. Please select 1, 2, or 3."
;;
esac
done
}
while true; do
@ -57,4 +106,4 @@ while true; do
done
done
echo "Exiting! Please reboot to enter desktop environment."
echo "Exiting! Please reboot to enter desktop environment."

@ -5,49 +5,48 @@ echo
PKGS=(
# --- XORG Display Rendering
'xorg' # Base Package
'xorg-drivers' # Display Drivers
'xterm' # Terminal for TTY
'xorg-server' # XOrg server
'xorg-apps' # XOrg apps group
'xorg-xinit' # XOrg init
'xorg-xinput' # XOrg xinput
'xorg-twm' # XOrg twm
'xorg-xclock' # XOrg xclock
# --- XORG
'xorg'
'xorg-drivers'
'xterm'
'xorg-server'
'xorg-apps'
'xorg-xinit'
'xorg-xinput'
'xorg-twm'
'xorg-xclock'
'xf86-input-vmmouse'
'xf86-video-vmware'
'mesa'
# --- Setup Desktop
'plasma' # Plasma
# --- Desktop
'plasma'
# --- Login Display Manager
'sddm' # Base Login Manager
# --- Login manager
'sddm'
# --- Networking Setup
'dialog' # Enables shell scripts to trigger dialog boxex
'network-manager-applet' # System tray icon/utility for network connectivity
'dhclient' # DHCP client
'libsecret' # Library for storing passwords
'fail2ban' # Ban IP's after man failed login attempts
'ufw' # Uncomplicated firewall
# --- Networking
'dialog'
'network-manager-applet'
'dhclient'
'libsecret'
'fail2ban'
'ufw'
# --- Audio
'alsa-utils' # Advanced Linux Sound Architecture (ALSA) Components https://alsa.opensrc.org/
'alsa-plugins' # ALSA plugins
'pulseaudio' # Pulse Audio sound components
'pulseaudio-alsa' # ALSA configuration for pulse audio
'pavucontrol' # Pulse Audio volume control
'pnmixer' # System tray volume control
'pipewire'
'wireplumber'
'pipewire-pulse'
'pipewire-alsa'
'pavucontrol'
# --- Bluetooth
'bluez' # Daemons for the bluetooth protocol stack
'bluez-utils' # Bluetooth development and debugging utilities
'bluez-libs' # Bluetooth libraries
'bluez-firmware' # Firmware for Broadcom BCM203x and STLC2300 Bluetooth chips
'blueberry' # Bluetooth configuration tool
'pulseaudio-bluetooth' # Bluetooth support for PulseAudio
'bluez'
'bluez-utils'
'bluez-libs'
'bluez-firmware'
'blueberry'
'pulseaudio-bluetooth'
)
for PKG in "${PKGS[@]}"; do
@ -55,7 +54,7 @@ for PKG in "${PKGS[@]}"; do
sudo pacman -S "$PKG" --noconfirm --needed
done
sudo systemctl enable sddm.service
sudo systemctl enable sddm.service
echo
echo "Done! Please Reboot & Run software.sh"

@ -1,64 +1,82 @@
#!/usr/bin/env bash
echo
echo "Setting up Yay for AUR packages..."
echo
echo "Please enter username:"
read username
cd "${HOME}"
git clone "https://aur.archlinux.org/yay.git"
cd ${HOME}/yay
makepkg -si
echo
echo "Yay setup complete."
echo
# Yay install
if ! command -v yay &> /dev/null; then
echo
echo "Setting up Yay for AUR packages..."
echo
echo "Please enter username:"
read username
cd "${HOME}"
git clone "https://aur.archlinux.org/yay.git"
cd ${HOME}/yay
makepkg -si
cd "${HOME}"
rm -rf "${HOME}/yay"
echo
echo "Yay setup complete."
echo
else
echo
echo "Yay already installed, skipping installation."
echo
fi
echo
echo "INSTALLING SOFTWARE"
echo
PKGS=(
# TERMINAL UTILITIES --------------------------------------------------
'curl' # Remote content retrieval
'gufw' # Firewall manager
'neofetch' # Shows system info when you launch terminal
'numlockx' # Turns on numlock in X11
'p7zip' # 7z compression program
'unrar' # RAR compression program
'unzip' # Zip compression program
'wget' # Remote content retrieval
'vim' # Terminal Editor
'zenity' # Display graphical dialog boxes via shell scripts
'zip' # Zip compression program
'nano' # Simpler Terminal Editor
'kitty' # Terminal Emulator
# GENERAL UTILITIES ---------------------------------------------------
'mpv' # Video Player
'gwenview' # Image Viewer
'lutris' # Gaming
'wine' # Gaming
'steam' # Gaming
'obs-studio' # Screen Recording
'remmina' # RDP
'discord' # Messaging
'xpdf' # PDF viewer
'thunar' # File Manager
# Terminal
'curl'
'gufw'
'neofetch'
'numlockx'
'p7zip'
'unrar'
'unzip'
'wget'
'vim'
'zenity'
'zip'
'nano'
'kitty'
# General
'mpv'
'gwenview'
'lutris'
'wine'
'steam'
'obs-studio'
'remmina'
'discord'
'xpdf'
'thunar'
'thunar-archive-plugin'
'ark'
'tumbler'
# DEVELOPMENT ---------------------------------------------------------
'gedit' # Text editor
'git' # Version control system
'nodejs' # Javascript runtime environment
'npm' # Node package manager
'python' # Scripting language
'yarn' # Dependency management (Hyper needs this)
'gimp' # Photo Editor
'kdenlive' # Video Editor
'gvfs'
'gvfs-smb'
'samba'
'libimobiledevice'
'usbmuxd'
'gvfs-afc'
'gvfs-gphoto2'
# Development
'gedit'
'git'
'nodejs'
'npm'
'python'
'yarn'
'gimp'
'kdenlive'
)
@ -68,11 +86,11 @@ for PKG in "${PKGS[@]}"; do
done
AUR_PKGS=(
'floorp-bin' # Floorp browser
'brave-bin' # Brave browser
'downgrade' # Downgrade packages
'spotify-edge' # Spotify
'proton-ge-custom-bin' # Proton GE
'floorp-bin'
'brave-bin'
'downgrade'
'spotify-edge'
'proton-ge-custom-bin'
)
@ -94,7 +112,7 @@ echo "Installing Flatpak Applications..."
echo
FLATPAK_APPS=(
'org.prismlauncher.PrismLauncher' # Prism Launcher (Minecraft)
'org.prismlauncher.PrismLauncher'
)