2018-10-31 16:31:40 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2018-12-03 00:31:56 +01:00
|
|
|
# Higher-level configs
|
2018-10-31 16:31:40 +01:00
|
|
|
#
|
|
|
|
# https://wiki.archlinux.org/index.php/General_recommendations
|
|
|
|
|
|
|
|
set -xe
|
|
|
|
|
2018-12-03 17:12:07 +01:00
|
|
|
# Create the output directories if they don't exist yet
|
|
|
|
arch-chroot /mnt mkdir -p /etc/systemd/system/multi-user.target.wants
|
|
|
|
arch-chroot /mnt mkdir -p /etc/systemd/system/sysinit.target.wants
|
|
|
|
|
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-04 02:26:32 +01:00
|
|
|
echo "%wheel ALL=(ALL) ALL" > /mnt/etc/sudoers.d/01_wheel_all
|
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"
|
2018-12-04 03:38:03 +01:00
|
|
|
|
|
|
|
# Lock the root account (i.e. disable root login)
|
|
|
|
arch-chroot /mnt passwd -l root
|