This repository has been archived by the owner on Jan 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apply_settings
executable file
·65 lines (52 loc) · 2.07 KB
/
apply_settings
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
# Install packages
echo Installing packages...
pacman --noconfirm -S gnome
yes | pacman -S uim gtk2 wget yajl linux sudo zsh zsh-syntax-highlighting pyenv git vim wget gcc ttf-dejavu zsh-autosuggestions grub efibootmgr intel-ucode
# Set time zone
echo Setting time zone and language
ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
sed -i '/^#\(ko_KR.UTF-8 UTF-8\|en_US.UTF-8 UTF-8\) /s/^#//g' /etc/locale.gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
locale-gen
timedatectl set-local-rtc 1
echo "UTC=no" >> /etc/default/rcS
# keyboard layout
echo "KEYMAP=us" >> /etc/vconsole.conf
echo "${username}-pc" >> /etc/hostname
echo -e "127.0.0.1 localhost\n::1 localhost\n127.0.1.1 ${username}-pc.org" >> /etc/hosts
groupadd sudo
useradd ${username} -g users -G storage,wheel,power,sudo -m -s /bin/bash
echo "${username}:${userpw}" | chpasswd
echo "root:${userpw}" | chpasswd
echo Changing sudo privileges
sed -i 's/^# %sudo ALL=(ALL) ALL/%sudo ALL=(ALL) ALL/' /etc/sudoers
echo "chowning /hdd..."
ln -s /hdd/Pictures /home/${username}/Pictures
ln -s /hdd/Videos /home/${username}/Videos
ln -s /hdd/Downloads /home/${username}/Downloads
ln -s /hdd/Music /home/${username}/Music
ln -s /hdd/Documents /home/${username}/Documents
ln -s /hdd/Workspace /home/${username}/Workspace
chown -R ${username}:users /hdd
if [ "${partition_windows}" != "" ]; then
yes | pacman -S os-prober
mkdir /windows
mount ${partition_windows} /windows
os-prober
fi
mkdir /esp
mount ${partition_boot} /esp
grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=grub
grub-mkconfig -o /boot/grub/grub.cfg
umount /esp
rm -r /esp
if [ "${partition_windows}" != "" ]; then
umount /windows
rm -r /windows
fi
wget https://gist.githubusercontent.com/Jjungs7/e777614c1e0faa284117d686f3f935f7/raw/a9d27a56e3cc681a0154e45ab1e9c2d0dbf1a502/vimrc
mv vimrc /home/${username}/.vimrc
chown ${username}:users /home/${username}/.vimrc
sed -i 's/^#WaylandEnable=false/#WaylandEnable=false\n\nAutomaticLoginEnable=True\nAutomaticLogin=${username}/' /etc/gdm/custom.conf
systemctl enable gdm.service
systemctl enable NetworkManager.service