mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-01-18 03:48:44 +01:00
4b97b8df9d
This not only fixes the issue where set -x would cause the read line to be altered, but also separates user input from what the install scripts actually do.
28 lines
857 B
Bash
Executable File
28 lines
857 B
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
|
|
|
|
# Start and enable the DHCP client daemon service
|
|
systemctl enable --now dhcpcd.service
|
|
|
|
# Sync the time periodically with a remote server
|
|
timedatectl set-ntp true
|
|
|
|
# Enable colors in pacman by uncommenting the Color line.
|
|
sed -i '/Color/s/^#//g' /etc/pacman.conf
|
|
sed -i '/VerbosePkgLists/s/^#//g' /etc/pacman.conf
|
|
|
|
# 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
|