2026-06-03 13:16:36 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
# Roid.SH: minimalistic Void Linux setup script for Termux environment
|
|
|
|
|
# that includes sound support via PulseAudio server
|
|
|
|
|
# This is a stand-alone version with no parameterization available
|
|
|
|
|
# Created by Luxferre in 2026, released into the public domain
|
|
|
|
|
|
|
|
|
|
ALL_REPOS="void-repo-nonfree"
|
|
|
|
|
ALL_PKGS='base-container-full base-devel curl git nano mc dtach fzf zip p7zip unrar rlwrap jq htop rsync netcat socat gnupg pass progress discount aria2 lynx nmap pulseaudio alsa-plugins-pulseaudio mpg123 dumbplay'
|
|
|
|
|
|
|
|
|
|
echo 'Setting up host environment...'
|
|
|
|
|
pkg upgrade -y
|
|
|
|
|
pkg install -y proot-distro pulseaudio
|
|
|
|
|
cat >> $HOME/.profile <<'EOF'
|
|
|
|
|
pulseaudio --start --exit-idle-time=-1 # ROID_INST
|
|
|
|
|
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1 # ROID_INST
|
|
|
|
|
EOF
|
|
|
|
|
cat >> $HOME/.bashrc <<'EOF'
|
|
|
|
|
alias void="proot-distro login -P -e TERMUX_HOME=$HOME void-glibc-full" # ROID_INST
|
|
|
|
|
alias voidrun='proot-distro run -P void-glibc-full --' # ROID_INST
|
|
|
|
|
alias roidclean='killall pulseaudio' # ROID_INST
|
|
|
|
|
EOF
|
|
|
|
|
echo 'Installing Void Linux...'
|
|
|
|
|
proot-distro install ghcr.io/void-linux/void-glibc-full
|
|
|
|
|
echo 'Extra repository setup...'
|
|
|
|
|
proot-distro run void-glibc-full -- sh -c "xbps-install -Suyy && xbps-install -Sy $ALL_REPOS"
|
|
|
|
|
echo 'Package setup...'
|
|
|
|
|
proot-distro run void-glibc-full -- sh -c "xbps-install -Suyy && xbps-install -Sy $ALL_PKGS"
|
|
|
|
|
echo 'Post-installation steps...'
|
|
|
|
|
cat > $HOME/.roid-postinstall <<'GLOBALEOF'
|
|
|
|
|
#!/bin/sh
|
|
|
|
|
cat > /root/.bash_profile <<'EOF'
|
|
|
|
|
export LC_ALL=C.UTF-8
|
|
|
|
|
export LANG=C.UTF-8
|
|
|
|
|
[[ -f /root/.bashrc ]] && [[ $- == *i* ]] && . /root/.bashrc
|
|
|
|
|
EOF
|
|
|
|
|
cat > /root/.bashrc <<'EOF'
|
|
|
|
|
PS1='\W # '
|
|
|
|
|
. /root/.roidrc
|
|
|
|
|
EOF
|
2026-06-04 06:43:15 +03:00
|
|
|
curl -fsSL https://codeberg.org/luxferre/roid/raw/branch/master/.roidrc-minimal > /root/.roidrc
|
2026-06-03 13:16:36 +03:00
|
|
|
GLOBALEOF
|
|
|
|
|
proot-distro run void-glibc-full -e TERMUX_HOME=$HOME -- sh $HOME/.roid-postinstall
|
|
|
|
|
rm $HOME/.roid-postinstall
|
|
|
|
|
echo 'Font setup...'
|
|
|
|
|
TDIR="$(mktemp -d)"
|
|
|
|
|
cd $TDIR
|
|
|
|
|
FONTURL='https://github.com/tonsky/FiraCode/releases/download/6.2/Fira_Code_v6.2.zip'
|
2026-06-04 06:43:15 +03:00
|
|
|
curl -fsSL -o font.zip "$FONTURL"
|
2026-06-03 13:16:36 +03:00
|
|
|
unzip -j font.zip ttf/FiraCode-Retina.ttf
|
|
|
|
|
mv FiraCode-Retina.ttf $HOME/.termux/font.ttf
|
|
|
|
|
cd && rm -rf $TDIR
|
|
|
|
|
echo 'Done. Restart the Termux shell to take effect, then type void to start the OS'
|