scripts/init-void.sh
Spirit 8c7b996411
configure doas cause sodu sucks
or i dont know how to use it idk
2024-08-19 10:19:41 -07:00
Ask

27 lines
541 B
Bash
Executable File

{51da0bdcf2d1b673b28ad220a1cb5d388a23bf33 true 541 init-void.sh 0xc0030d9960}

#!/bin/bash
if [ -z "$USERNAME" ]; then
USERNAME="spirit"
fi
cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
xbps-install -Suy xbps
xbps-install -uy
xbps-install -y base-system
xbps-remove -y base-voidstrap
xbps-reconfigure -fa
useradd -m -G wheel -s /bin/bash $USERNAME
sed -i 's/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
xbps-install -y opendoas
bash -c "echo 'permit nopass $USERNAME as root' > /etc/doas.conf"
if [[ "$1" == "--wsl" ]]; then
cat <<EOF > /etc/wsl.conf
[user]
default=$USERNAME
EOF
fi