-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost-install-root.sh
More file actions
executable file
·54 lines (45 loc) · 1.05 KB
/
post-install-root.sh
File metadata and controls
executable file
·54 lines (45 loc) · 1.05 KB
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
#!/usr/bin/env bash
set -euo pipefail
if [ $(id -u) -ne 0 ]; then
echo "Please run this script as root!"
exit 1
fi
message()
{
echo -e "\e[1;31m>> \e[0m$1"
}
message "** Running post install script for root **"
# install packages
message "Installing packages"
pacman -S --noconfirm \
bat \
btop \
eza \
man-db \
man-pages \
neovim \
plocate \
polkit \
podman \
podman-compose \
reflector \
zoxide \
1>/dev/null
# change reflector settings
message "Installing Reflector config and enabling timer"
cat <<'EOF' > /etc/xdg/reflector/reflector.conf
--save /etc/pacman.d/mirrorlist
--protocol https
--country Netherlands
--latest 5
--sort rate
EOF
systemctl enable reflector.timer 1>/dev/null
# change default settings
message "Setting timezone, locales and hostname"
timedatectl set-timezone Europe/Amsterdam 1>/dev/null
timedatectl set-ntp true 1>/dev/null
hostnamectl set-hostname archvm 1>/dev/null
localectl set-keymap us 1>/dev/null
localectl set-locale en_US.UTF-8 1>/dev/null
message "** DONE **"