scripts/init-void.sh
2024-08-19 15:31:13 +03:00
Ask

24 lines
449 B
Bash
Executable File

{76fef26676ae0625d8b3c41d3347ee71a700a979 true 449 init-void.sh 0xc001f0c9a0}

#!/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
if [[ "$1" == "--wsl" ]]; then
cat <<EOF > /etc/wsl.conf
[user]
default=$USERNAME
EOF
fi