mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-15 21:03:59 +01:00
14dbf3d51f
Since I am trying to get 004-postinstall to work in the installation media, the config paths need /mnt added to them.
32 lines
1.2 KiB
Bash
Executable File
32 lines
1.2 KiB
Bash
Executable File
#!/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
|
|
|
|
# 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
|
|
|
|
# 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
|
|
|
|
# Enable colors in pacman by uncommenting the Color line.
|
|
sed -i '/Color/s/^#//g' /mnt/etc/pacman.conf
|
|
|
|
# Show package upgrades as a list
|
|
sed -i '/VerbosePkgLists/s/^#//g' /mnt/etc/pacman.conf
|
|
|
|
# Give users in the wheel group permission to use sudo
|
|
echo "%wheel ALL=(ALL) ALL" >> /mnt/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
|