forked from extern/nix-config
0be668443e
This makes it easier to immediately start using dotfiles and other config settings on first boot. It may even be useful to add an option to run the entire bootstrap script in the installation media. Note that if this route is taken, some assumptions regarding installation will have to be changed to adjust for the chroot environment.
42 lines
1.6 KiB
Bash
Executable File
42 lines
1.6 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Higher-level configs
|
|
#
|
|
# https://wiki.archlinux.org/index.php/General_recommendations
|
|
|
|
set -xe
|
|
|
|
# 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
|
|
|
|
# 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 the rng-tools daemon
|
|
arch-chroot /mnt ln -sf /usr/lib/systemd/system/rngd.service \
|
|
/etc/systemd/system/sysinit.target.wants/rngd.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.d/01_wheel_all
|
|
|
|
# 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"
|
|
|
|
# Lock the root account (i.e. disable root login)
|
|
arch-chroot /mnt passwd -l root
|
|
|
|
# Clone this repository to the user's $HOME
|
|
arch-chroot /mnt git clone https://github.com/GloverDonovan/.files /home/$USERNAME/.files
|