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
|
|
|
|
|
2018-12-02 16:47:27 +01:00
|
|
|
# Enable the DHCP client daemon service
|
|
|
|
arch-chroot /mnt ln -sf /usr/lib/systemd/system/dhcpcd.service \
|
|
|
|
/etc/systemd/system/multi-user.target.wants/dhcpcd.service
|
2018-10-31 16:31:40 +01:00
|
|
|
|
2018-12-02 16:47:27 +01:00
|
|
|
# Enable the timesync daemon service (sync the time periodically with a remote server)
|
|
|
|
arch-chroot /mnt ln -sf /usr/lib/systemd/system/systemd-timesyncd.service \
|
|
|
|
/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service
|
2018-10-31 16:31:40 +01:00
|
|
|
|
|
|
|
# Enable colors in pacman by uncommenting the Color line.
|
2018-12-02 16:51:28 +01:00
|
|
|
sed -i '/Color/s/^#//g' /mnt/etc/pacman.conf
|
|
|
|
|
|
|
|
# Show package upgrades as a list
|
|
|
|
sed -i '/VerbosePkgLists/s/^#//g' /mnt/etc/pacman.conf
|
2018-10-31 16:31:40 +01:00
|
|
|
|
|
|
|
# Give users in the wheel group permission to use sudo
|
2018-12-02 16:51:28 +01:00
|
|
|
echo "%wheel ALL=(ALL) ALL" >> /mnt/etc/sudoers
|
2018-10-31 16:31:40 +01:00
|
|
|
|
|
|
|
# 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
|