-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPost-Installation.sh
105 lines (82 loc) · 3.22 KB
/
Post-Installation.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/bin/bash
echo "Post-Installation"
# Create user and set password
read -p "Set user name: " userName
useradd -m -G wheel,storage,audio,video -s /bin/bash $userName
echo "Set user password:"
passwd $userName
# Install LTS kernel
pacman -S --noconfirm linux-lts
# Install header files and scripts for building modules for Linux kernel
pacman -S --noconfirm linux-headers linux-lts-headers
# Install important services
pacman -S --noconfirm acpid ntp cronie avahi nss-mdns dbus cups ufw tlp
# Configure the network
pacman -S --noconfirm dialog dhclient
pacman -S --noconfirm networkmanager network-manager-applet
# Install command line and ncurses programs
pacman -S --noconfirm sudo
pacman -S --noconfirm bash-completion
pacman -S --noconfirm smbclient
pacman -S --noconfirm tree
pacman -S --noconfirm atool
pacman -S --noconfirm ranger w3m mpv
pacman -S --noconfirm htop
pacman -S --noconfirm tmux
pacman -S --noconfirm youtube-dl
pacman -S --noconfirm wget curl axel
pacman -S --noconfirm rsync
pacman -S --noconfirm scrot
pacman -S --noconfirm xdotool
pacman -S --noconfirm xclip xsel
pacman -S --noconfirm lshw
pacman -S --noconfirm acpi
pacman -S --noconfirm nmap
pacman -S --noconfirm vim
pacman -S --noconfirm ffmpeg
pacman -S --noconfirm git
pacman -S --noconfirm go go-tools
pacman -S --noconfirm feh
pacman -S --noconfirm openssh
pacman -S --noconfirm openvpn easy-rsa
pacman -S --noconfirm rtorrent
# Install xorg and graphics
pacman -S --noconfirm xorg xorg-xinit libva-intel-driver mesa
pacman -S --noconfirm xf86-video-intel xf86-input-synaptics
# Install fonts
pacman -S --noconfirm ttf-droid ttf-ionicons ttf-dejavu
# Install window manager
pacman -S --noconfirm bspwm dmenu compton
# Install GTK-Theme and Icons
pacman -S --noconfirm arc-gtk-theme hicolor-icon-theme papirus-icon-theme
# Install graphical programs
pacman -S --noconfirm rxvt-unicode
pacman -S --noconfirm dunst
pacman -S --noconfirm qemu
pacman -S --noconfirm docker docker-compose
pacman -S --noconfirm fuse-exfat exfat-utils
pacman -S --noconfirm dnsmasq
pacman -S --noconfirm urxvt-perls
# Add user to docker group
gpasswd -a $userName docker
# Avahi provides local hostname resolution using a "hostname.local" naming scheme
sed -i '/hosts:/s/mymachines/mymachines mdns_minimal [NOTFOUND=return]/' /etc/nsswitch.conf
# Configure sudo
sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers
# Allow to execute shutdown without password
echo "$userName ALL = NOPASSWD: /usr/bin/shutdown" >> /etc/sudoers
# Add Cron job for monitoring battery
{ crontab -l -u $userName; echo "*/5 * * * * env DISPLAY=:0 /home/$userName/.bin/BatteryWarning.sh"; } | crontab -u $userName -
# Disable powersave, prevent the WiFi card from automatically sleeping and halting connection
echo "options rtl8723be fwlps=0" > /etc/modprobe.d/rtl8723be.conf
# Configure synaptics and intel drivers
cp -R /arch-setup/config/xorg/. /etc/X11/xorg.conf.d/
# Copy all home folder files
cp -R /arch-setup/config/home/. /home/$userName/
cp -R /arch-setup/config/home/. /root/
# Compile the rsync extension
g++ /home/$userName/.bin/Rsync.cpp -o /home/$userName/.bin/Rsync
rm /home/$userName/.bin/Rsync.cpp
# Change premissions
chown -R $userName:$userName /home/$userName/
chmod -R 700 /home/$userName/.bin/