2018-10-31 16:31:40 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Common post-install system configuration that doesn't involve any
|
|
|
|
# external packages (besides fish)
|
|
|
|
#
|
|
|
|
# https://wiki.archlinux.org/index.php/General_recommendations
|
|
|
|
|
|
|
|
set -xe
|
|
|
|
|
|
|
|
echo -n "Enter a username for the local account with administrative rights: "
|
|
|
|
read USERNAME
|
|
|
|
|
|
|
|
# Start and enable the DHCP client daemon service
|
2018-11-16 03:15:15 +01:00
|
|
|
systemctl enable --now dhcpcd.service
|
2018-10-31 16:31:40 +01:00
|
|
|
|
|
|
|
# Set the timezone with systemd, and sync it periodically with a remote server
|
|
|
|
timedatectl set-timezone America/New_York
|
|
|
|
timedatectl set-ntp true
|
|
|
|
|
|
|
|
# Change the systemd wait time from 90s to 30s, mitigating a potential hang at shutdown
|
|
|
|
echo "DefaultTimeoutStartSec=30s" >> /etc/systemd/system.conf
|
|
|
|
echo "DefaultTimeoutStopSec=30s" >> /etc/systemd/system.conf
|
|
|
|
|
|
|
|
# Enable colors in pacman by uncommenting the Color line.
|
|
|
|
sed -i '/Color/s/^#//g' /etc/pacman.conf
|
2018-11-20 01:12:27 +01:00
|
|
|
sed -i '/VerbosePkgLists/s/^#//g' /etc/pacman.conf
|
2018-10-31 16:31:40 +01:00
|
|
|
|
|
|
|
# Give users in the wheel group permission to use sudo
|
|
|
|
echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers
|
|
|
|
|
|
|
|
# Create a new user account with sudo privileges and the fish shell.
|
|
|
|
arch-chroot /mnt useradd -m -g users -G wheel -s /usr/bin/fish "$USERNAME"
|
|
|
|
|
|
|
|
# Then, set the password equal to the username (change this later).
|
|
|
|
echo "$USERNAME:$USERNAME" | chpasswd
|