23 lines
936 B
Bash
23 lines
936 B
Bash
#!/bin/sh
|
|
# Install NVIDIA driver
|
|
echo "Installing GPU drivers"
|
|
pacman -S --noconfirm nvidia-dkms nvidia-utils lib32-nvidia-utils nvidia-settings
|
|
# Tweak systemd.conf and enable services for proper suspend/resume
|
|
echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1" >> /lib/modprobe.d/systemd.conf
|
|
systemctl enable nvidia-suspend.service
|
|
systemctl enable nvidia-hibernate.service
|
|
systemctl enable nvidia-resume.service
|
|
# Required to enable network changes
|
|
sysctl --system
|
|
# Install essential utilities
|
|
pacman -S --noconfirm yay ufw clamav hblock apparmor
|
|
# Move user script and associated files and change ownership to the new user
|
|
mkdir /home/$user/install
|
|
cp /buildscripts/2-* /home/$user/install
|
|
cp /userfiles/* /home/$user/install
|
|
chown -R $user:$user /home/$user/install
|
|
# Prompt the user to reboot
|
|
echo "Install complete, please reboot"
|
|
# Cleanup: Remove /buildscripts and /userfiles
|
|
rm -rf /buildscripts
|
|
rm -rf /userfiles |