diff --git a/gentoostrap.sh b/gentoostrap.sh index 4a38e03..305926e 100755 --- a/gentoostrap.sh +++ b/gentoostrap.sh @@ -183,6 +183,9 @@ build-gentoo() { popd cp "$0" "$_optdest/gentoostrap.sh" sudo systemd-nspawn --directory="$_optdest" /gentoostrap.sh -c + + # The nspawn container sadly cannot manipulate the environment entirely, so we need to now do an ACTUAL chroot to install GRUB + } build-gentoo-chroot() { # Build Gentoo, but from within the chroot environment @@ -216,9 +219,17 @@ build-gentoo-chroot() { # Extra packages emerge --jobs --quiet-build y \ + app-admin/sudo \ + app-editors/vim \ sys-fs/{e2fs,xfs}progs \ sys-process/cronie + # Configure sudoers + cat <<-EOF >> "/etc/sudoers" + %wheel ALL=(ALL) ALL + ansible ALL=(ALL) NOPASSWD:ALL + EOF + # Unnghhh... COLONEL... # Dude distribution kernels are awesome emerge --jobs --quiet-build y sys-kernel/installkernel-gentoo sys-kernel/linux-firmware @@ -231,14 +242,16 @@ build-gentoo-chroot() { mkdir -p /boot/efi chmod 0700 /boot/efi + # Configure a new user, add him to sudoers + useradd salt -m -G wheel -s /bin/bash -u 1000 -U + passwd salt + # We've made it this far and now the user has to do just a liiiiiitle bit of configuration clear cat <<-EOF Initial system configuration is complete. There are now just a few tasks left: * Mount the ESP under /boot/efi * Install and configure grub - * Set a root password - * Create a normal user * Reboot and pray Other things you may want to do: