-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·60 lines (45 loc) · 1.73 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
# Make sure we are in right directory
[ -f setup.sh ] || (echo "RUN FROM REPO ROOT PLS" && exit)
# Install pacman config with 32bit support
cp conf/pacman.conf /etc/pacman.conf
pacman -Sy --noconfirm archlinux-keyring
# Set up reflector service
pacman --noconfirm --needed -S reflector
cp conf/reflector.conf /etc/reflector/
systemctl enable reflector.timer
# Run reflector service right now
systemctl start reflector.service
# Select graphics drivers to install
graphicspkg=""
# AMDGPU
read -p "Install amd graphics[y/N]: " choice
graphicspkg+=$([[ $choice == y* ]] || [[ $choice == Y* ]] &&
echo "xf86-video-amdgpu vulkan-radeon lib32-vulkan-radeon mesa lib32-mesa ")
# Intel graphics
read -p "Install intel graphics[y/N]: " choice
graphicspkg+=$([[ $choice == y* ]] || [[ $choice == Y* ]] &&
echo "xf86-video-intel ")
# Nvidia graphics
read -p "Install nvidia graphics?[y/N]: " choice
graphicspkg+=$([[ $choice == y* ]] || [[ $choice == Y* ]] &&
echo "nvidia nvidia-utils lib32-nvidia-utils " &&
[ -n "$(pacman -Q linux-lts)" ] && echo "nvidia-lts ")
pacman --noconfirm --needed -S $graphicspkg
# Install pacman packages
pacman --noconfirm --needed -S - < pacmanlist.txt
# Install xorg confs
# - disables mouse acceleration
# - enables trackpad touch to click and natural scrolling
cp conf/xorg/* /etc/X11/xorg.conf.d/
# Install login config to automatically unlock keyring
cp conf/login /etc/pam.d/login
# Install grub config
cp conf/grub /etc/default/grub
# add user with zsh
pacman --noconfirm --needed -S zsh
USERNAME=$(dialog --stdout --inputbox "Enter your username" 10 50 --stdout)
useradd -m -G wheel -s /bin/zsh $USERNAME
echo "Set password for user $USERNAME"
passwd $USERNAME
sudo -u "$USERNAME" ./user_setup.sh