feat: enable systemd-timesyncd, install dwm
This commit is contained in:
parent
245998ea91
commit
4a7813fb74
3 changed files with 10 additions and 7 deletions
66
base.sh
Executable file
66
base.sh
Executable file
|
|
@ -0,0 +1,66 @@
|
|||
#!/bin/bash -e
|
||||
cd "$(dirname "$0")"
|
||||
. ./config
|
||||
|
||||
NORMAL='\e[0m'
|
||||
BOLD='\e[1m'
|
||||
GREEN='\e[32m'
|
||||
|
||||
PACMAN='pacman --noconfirm --needed -Syu'
|
||||
|
||||
# System config
|
||||
cp -rfT rootfs/ /
|
||||
ln -sf "/usr/share/zoneinfo/$tz" /etc/localtime
|
||||
hwclock --systohc
|
||||
for l in "${locales[@]}"; do
|
||||
sed -i "/#\s*$l/s/^#\s*//" /etc/locale.gen
|
||||
done
|
||||
locale-gen
|
||||
echo "LANG=$lang.UTF-8" > /etc/locale.conf
|
||||
echo "$hostname" > /etc/hostname
|
||||
|
||||
# Packages
|
||||
$PACMAN "${pkg[@]}"
|
||||
systemctl enable \
|
||||
NetworkManager \
|
||||
reflector.timer \
|
||||
systemd-timesyncd
|
||||
|
||||
if [ -d /sys/module/battery/ ]; then
|
||||
$PACMAN "${laptop_pkg[@]}"
|
||||
systemctl enable tlp
|
||||
fi
|
||||
|
||||
# Users
|
||||
echo "root:$root_passwd" | chpasswd
|
||||
useradd -mG wheel "$username"
|
||||
echo "$username:$user_passwd" | chpasswd
|
||||
|
||||
sed -i '/^# %wheel\s\+ALL=(ALL:ALL)\s\+ALL/s/^#\s*//' /etc/sudoers
|
||||
|
||||
# drivers
|
||||
if blkid | grep -q LUKS; then
|
||||
sed -i '/^HOOKS=(/s/filesystems/encrypt filesystems/' /etc/mkinitcpio.conf
|
||||
fi
|
||||
|
||||
case "$(lscpu | grep Vendor)" in
|
||||
*AuthenticAMD*)
|
||||
$PACMAN amd-ucode
|
||||
;;
|
||||
*GenuineIntel*)
|
||||
$PACMAN intel-ucode
|
||||
;;
|
||||
esac
|
||||
./gpu.sh
|
||||
|
||||
# Bootloader
|
||||
sed -i '/GRUB_DISABLE_OS_PROBER=/s/.*/GRUB_DISABLE_OS_PROBER=true/' /etc/default/grub
|
||||
|
||||
if [ -n "$grub_timeout" ]; then
|
||||
sed -i "/GRUB_TIMEOUT=/s/.*/GRUB_TIMEOUT=$grub_timeout/" /etc/default/grub
|
||||
fi
|
||||
|
||||
grub-install --target=x86_64-efi --bootloader-id=GRUB
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
|
||||
echo -e "${BOLD}${GREEN}DONE. Ctrl+D, umount -R /mnt and reboot${NORMAL}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue