71 lines
3.0 KiB
Bash
Executable File
71 lines
3.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
echo -ne "
|
|
-------------------------------------------------------------------------
|
|
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
|
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
|
███████║██████╔╝██║ ███████║ ██║ ██║ ██║ ██║ ██║███████╗
|
|
██╔══██║██╔══██╗██║ ██╔══██║ ██║ ██║ ██║ ██║ ██║╚════██║
|
|
██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║
|
|
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
|
-------------------------------------------------------------------------
|
|
Automated Arch Linux Installer
|
|
SCRIPTHOME: ArchTitus
|
|
-------------------------------------------------------------------------
|
|
|
|
-------------------------------------------------------------------------
|
|
Installing Desktop Enviroment
|
|
-------------------------------------------------------------------------
|
|
"
|
|
|
|
source /root/ArchTitus/setup.conf
|
|
|
|
cat /root/ArchTitus/pkg-files/${DESKTOP_ENV}.txt | while read line
|
|
do
|
|
echo "INSTALLING: ${line}"
|
|
sudo pacman -S --noconfirm --needed ${line}
|
|
done
|
|
|
|
if [[ ${DESKTOP_ENV} == "kde" ]]; then
|
|
echo [Theme] >> /etc/sddm.conf
|
|
echo Current=Nordic >> /etc/sddm.conf
|
|
systemctl enable sddm.service
|
|
|
|
elif [[ "${DESKTOP_ENV}" == "gnome" ]]; then
|
|
systemctl enable gdm.service
|
|
|
|
elif [[ "${DESKTOP_ENV}" == "lxde" ]]; then
|
|
systemctl enable lxdm.service
|
|
|
|
else
|
|
sudo pacman -S --noconfirm --needed lightdm lightdm-gtk-greeter
|
|
systemctl enable lightdm.service
|
|
|
|
fi
|
|
|
|
echo -ne "
|
|
-------------------------------------------------------------------------
|
|
Enabling Essential Services
|
|
-------------------------------------------------------------------------
|
|
"
|
|
systemctl enable cups.service
|
|
ntpd -qg
|
|
systemctl enable ntpd.service
|
|
systemctl disable dhcpcd.service
|
|
systemctl stop dhcpcd.service
|
|
systemctl enable NetworkManager.service
|
|
echo -ne "
|
|
-------------------------------------------------------------------------
|
|
Cleaning
|
|
-------------------------------------------------------------------------
|
|
"
|
|
# Remove no password sudo rights
|
|
sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# %wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers
|
|
# Add sudo rights
|
|
sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers
|
|
|
|
rm -r /root/ArchTitus
|
|
rm -r /home/$USERNAME/ArchTitus
|
|
|
|
# Replace in the same state
|
|
cd $pwd
|