-
Notifications
You must be signed in to change notification settings - Fork 0
/
arch.sh
executable file
·142 lines (121 loc) · 2.76 KB
/
arch.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
133
134
135
136
137
138
139
140
141
142
#!/usr/bin/env sh
# shellcheck disable=SC2164,SC2317
iwctl # Connect to internet
# PARTITIONS
gdisk /dev/nvme0n1
# p1 (size +1G, type ef00), p2
# ENCRYPTION
cryptsetup luksFormat /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 root
# FILESYSTEMS
mkfs.ext4 -L root /dev/mapper/root
mkfs.fat -n boot /dev/nvme0n1p1
# MOUNT
mount -L root /mnt
mount -L boot --mkdir /mnt/boot
# PROGRAMS
pacstrap -K /mnt \
arc-solid-gtk-theme \
base \
base-devel \
bash-completion \
cinnamon \
efibootmgr \
fd \
firefox \
fzf \
git \
intel-media-driver \
intel-ucode \
intel-undervolt \
libqalculate \
linux \
linux-firmware \
man-db \
neovim \
noto-fonts-cjk \
noto-fonts-emoji \
openssh \
reflector \
ripgrep \
sx \
terminus-font \
thermald \
tmux \
ttf-dejavu \
ttf-dejavu-nerd \
xsel
# FSTAB
genfstab -L /mnt >> /mnt/etc/fstab
sed -i s/relatime/noatime/ /mnt/etc/fstab
# MISC
arch-chroot /mnt
echo "<hostname>" > /etc/hostname
nvim /etc/intel-undervolt.conf # CPU (CACHE), GPU: -100
nvim /etc/pacman.conf # Color, VerbosePkgLists, ParallelDownloads
# TIME
ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime
hwclock -w
# LOCALE
nvim /etc/locale.gen # uncomment en_US.UTF-8 UTF-8
locale-gen
# SILENT BOOT
chattr +i /var/log/lastlog
setterm --blength --cursor on > /etc/issue
# USER
useradd -mG wheel user
passwd user
passwd
EDITOR=nvim visudo # Give wheel-group permissions
cd /home/user && su - user
# GNUPG
mkdir -p .locale/share/gnupg
chmod 700 .locale/share/gnupg
gpg --homedir .locale/share/gnupg --list-keys
# AUR
git clone https://aur.archlinux.org/paru-bin
cd paru-bin && makepkg -i
paru -S \
albert \
auto-cpufreq \
dashbinsh \
flat-remix
sudo find /usr/share/themes -type f -exec sed -i 's/#2f343f/#2e3440/g' {} +
cd && rm -rf paru-bin
# REPOS - DOWNLOAD
mkdir repos && cd repos
git clone [email protected]:astier/config
git clone [email protected]:astier/scripts
git clone [email protected]:astier/st
git clone [email protected]:astier/xhidecursor
# REPOS - INSTALL
cd config && . shell/exports && ./setup.sh
cd ../scripts && ./setup.sh
cd ../st && make install
cd ../xhidecursor && sudo make install
exit
# AUTOSTART
systemctl enable \
auto-cpufreq.service \
fstrim.timer \
intel-undervolt.service \
iptables.service \
NetworkManager.service \
reflector.timer \
systemd-resolved.service \
systemd-timesyncd.service \
thermald.service \
tty-conf.service
# BOOT
nvim /etc/mkinitcpio.conf
# HOOKS=(... block encrypt filesystems ...)
mkinitcpio -P
sh repos/scripts/efistub.sh
# REBOOT
exit
umount -R /mnt
reboot
# FINISH
sudo ln -fs /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
sudo pacman -Rns efibootmgr paru-bin-debug
rm -rf .bash_* .lesshst