-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPost-Installation.sh
132 lines (107 loc) · 3.78 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/bin/bash
# Post-Installation
# Create user and set password
read -p "Set user name:" userName
useradd -m -g users -G wheel,users,storage,power,audio,video -s /bin/bash $userName
echo "Set user password:"
passwd $userName
# Header files and scripts for building modules for Linux kernel
pacman -Syyu
pacman -S linux-headers
# Install important services
pacman -S --noconfirm acpid ntp cronie avahi dbus cups ufw tlp
# Enable important services
systemctl enable acpid
systemctl enable ntpd
systemctl enable cronie
systemctl enable avahi-daemon
# Enable TLP
systemctl enable tlp.service
systemctl enable tlp-sleep.service
systemctl disable systemd-rfkill.service
# Enable UFW
systemctl enable ufw
ufw default deny
ufw enable
# Configure the network
pacman -S --noconfirm dialog dhclient
pacman -S --noconfirm networkmanager network-manager-applet
pacman -S --noconfirm gnome-keyring libsecret seahorse
systemctl enable NetworkManager.service
# Install command line and ncurses programs
pacman -S --noconfirm sudo
pacman -S --noconfirm bash-completion
pacman -S --noconfirm tree
pacman -S --noconfirm ranger w3m
pacman -S --noconfirm pulseaudio pulseaudio-alsa
pacman -S --noconfirm htop
pacman -S --noconfirm screen
pacman -S --noconfirm wget curl axel youtube-dl
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 openssh
pacman -S --noconfirm vim
pacman -S --noconfirm ffmpeg
pacman -S --noconfirm git
pacman -S --noconfirm feh
pacman -S --noconfirm openvpn easy-rsa
# Install xorg and graphics
pacman -S --noconfirm xorg xorg-xinit mesa
pacman -S --noconfirm xf86-video-intel xf86-input-synaptics
# Install fonts
pacman -S --noconfirm ttf-dejavu
# Install desktop & window manager
pacman -S --noconfirm i3-wm i3status i3lock dmenu
# Install GTK-Theme and Icons
pacman -S --noconfirm arc-gtk-theme arc-icon-theme
# Install graphical programs
pacman -S --noconfirm rxvt-unicode
pacman -S --noconfirm zenity
pacman -S --noconfirm lxappearance
pacman -S --noconfirm pavucontrol
pacman -S --noconfirm gnome-system-monitor
pacman -S --noconfirm lxrandr
pacman -S --noconfirm firefox
pacman -S --noconfirm gnome-calculator
pacman -S --noconfirm libreoffice-fresh hunspell-de
pacman -S --noconfirm evince
pacman -S --noconfirm smplayer
pacman -S --noconfirm geany
pacman -S --noconfirm eclipse-java gradle
pacman -S --noconfirm gimp
pacman -S --noconfirm gparted dosfstools ntfs-3g
pacman -S --noconfirm pcmanfm-gtk3 gvfs udisks2
pacman -S --noconfirm file-roller unrar p7zip lrzip
pacman -S --noconfirm gutenprint ghostscript gsfonts
pacman -S --noconfirm system-config-printer gtk3-print-backends simple-scan
pacman -S --noconfirm gpicview
pacman -S --noconfirm transmission-gtk
pacman -S --noconfirm virtualbox virtualbox-host-modules-arch virtualbox-guest-iso
# Add User-"user" to VirtualBox-Group
gpasswd -a $userName vboxusers
# java
echo "_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=lcd'" >> /etc/environment
# 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
{ crontab -l -u $userName; echo "*/5 * * * * env DISPLAY=:0 /home/$userName/.bin/BatteryWarning.sh"; } | crontab -u $userName -
# Configure Keyboardlayout
localectl set-x11-keymap de pc105 nodeadkeys
# Configure synaptics touchpad
cp ./config/50-synaptics.conf /etc/X11/xorg.conf.d/
# Copy all files
cp -R ./config/home/. /home/$userName/
# Change premissions
chown $userName:users -R /home/$userName/
chmod -R 700 /home/$userName/.bin/
# Remove installation files
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
rm -R $DIR
# Finish
echo "Installation finished!!!"