scripts/init-void.sh
2024-08-19 10:06:11 +03:00
Ask

24 lines
447 B
Bash
Executable File

{a0214d18b402cf532ec359ac64f1948de0a2b351 true 447 init-void.sh 0xc002e591f0}

#!/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
ed -i 's/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
if [[ "$1" == "--wsl" ]]; then
cat <<EOF > /etc/wsl.conf
[user]
default=$USERNAME
EOF
fi