2024-08-03 10:53:26 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-08-18 19:55:17 +03:00
|
|
|
# TODO: setup network using iwd
|
|
|
|
# TODO: setup PolicyKit
|
|
|
|
# TODO: setup lightdm
|
|
|
|
# TODO: setup compositor
|
|
|
|
# TODO: install nvidia drivers (if nvidia gpu installed)
|
|
|
|
|
2024-08-19 12:52:36 +03:00
|
|
|
|
|
|
|
install_doas=1
|
2024-08-19 15:24:15 +03:00
|
|
|
sync_dotfiles=1
|
2024-08-19 12:52:36 +03:00
|
|
|
|
|
|
|
usage() {
|
|
|
|
echo "Usage: $0 [OPTIONS]"
|
|
|
|
echo 'Options:'
|
|
|
|
echo ' -h, --help Display this message'
|
|
|
|
echo " --no-doas Don't install doas"
|
2024-08-19 15:24:15 +03:00
|
|
|
echo " --no-sync Don't Sync dotfiles"
|
2024-08-19 12:52:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
case $1 in
|
|
|
|
-h | --help)
|
|
|
|
usage
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
--no-doas)
|
|
|
|
install_doas=0
|
|
|
|
;;
|
2024-08-19 15:24:15 +03:00
|
|
|
--no-sync)
|
|
|
|
sync_dotfiles=0
|
|
|
|
;;
|
2024-08-19 12:52:36 +03:00
|
|
|
*)
|
|
|
|
echo "Invalid argument: $1" >&2
|
|
|
|
usage
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
2024-08-03 10:53:26 +03:00
|
|
|
# update the package manager
|
|
|
|
sudo xbps-install -Suy xbps
|
|
|
|
|
|
|
|
# setup doas
|
2024-08-19 12:52:36 +03:00
|
|
|
if [ install_doas -eq 1 ]; then
|
|
|
|
sudo xbps-install -y opendoas
|
|
|
|
sudo bash -c "echo 'permit nopass $USER as root' > /etc/doas.conf"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if command -v doas &> /dev/null; then
|
|
|
|
doas="doas"
|
|
|
|
else
|
|
|
|
doas="sudo"
|
|
|
|
fi
|
2024-08-03 10:53:26 +03:00
|
|
|
|
|
|
|
# update conflicted deps
|
2024-08-19 12:52:36 +03:00
|
|
|
$doas xbps-install -yu util-linux
|
2024-08-03 10:53:26 +03:00
|
|
|
# install deps required for setup
|
2024-08-19 15:24:15 +03:00
|
|
|
$doas xbps-install -y git make gcc libX11-devel libXft-devel libXinerama-devel xorg-server xinit xauth xorg-fonts xorg-input-drivers pkg-config
|
2024-08-03 10:53:26 +03:00
|
|
|
|
2024-08-07 11:28:44 +03:00
|
|
|
mkdir ./.setup-void.temp
|
|
|
|
cd ./.setup-void.temp
|
2024-08-03 10:53:26 +03:00
|
|
|
|
2024-08-19 15:24:15 +03:00
|
|
|
if [ sync_dotfiles -eq 1 ]; then
|
|
|
|
$doas xbps-install -y rsync
|
|
|
|
git clone https://github.com/spirit-x64/dotfiles.git
|
|
|
|
rsync -a --exclude='.git/' --exclude='LICENSE' --exclude='.gitignore' dotfiles/ $HOME
|
|
|
|
fi
|
|
|
|
|
2024-08-03 10:53:26 +03:00
|
|
|
git clone https://github.com/spirit-x64/dwm.git
|
|
|
|
git clone https://github.com/spirit-x64/dmenu.git
|
|
|
|
git clone https://github.com/spirit-x64/st.git
|
|
|
|
|
|
|
|
|
|
|
|
cd dwm
|
2024-08-19 12:52:36 +03:00
|
|
|
$doas make clean install
|
2024-08-03 10:53:26 +03:00
|
|
|
|
|
|
|
cd ../dmenu
|
2024-08-19 12:52:36 +03:00
|
|
|
$doas make clean install
|
2024-08-03 10:53:26 +03:00
|
|
|
|
|
|
|
cd ../st
|
2024-08-19 12:52:36 +03:00
|
|
|
$doas make clean install
|
2024-08-03 10:53:26 +03:00
|
|
|
|
2024-08-18 19:57:49 +03:00
|
|
|
cd ..
|
|
|
|
|
2024-08-03 10:53:26 +03:00
|
|
|
echo 'exec dwm' > $HOME/.xinitrc
|
|
|
|
|
|
|
|
# system full-update
|
2024-08-19 12:52:36 +03:00
|
|
|
$doas xbps-install -Suy
|
2024-08-03 10:53:26 +03:00
|
|
|
# install other packages i use
|
2024-08-19 12:52:36 +03:00
|
|
|
$doas xbps-install -y patch wget curl vim firefox vscode juliaup yt-dlp tree
|
2024-08-03 10:53:26 +03:00
|
|
|
|
2024-08-19 12:52:36 +03:00
|
|
|
$doas ln -s /usr/bin/julialauncher /usr/bin/julia
|
2024-08-03 10:53:26 +03:00
|
|
|
|
|
|
|
juliaup self update
|
|
|
|
juliaup add 1.0.0
|
2024-08-06 07:12:46 +03:00
|
|
|
juliaup add 1.10
|
2024-08-03 10:53:26 +03:00
|
|
|
juliaup add 1.11
|
2024-08-06 07:12:46 +03:00
|
|
|
juliaup default 1.10
|
2024-08-07 11:28:44 +03:00
|
|
|
|
|
|
|
# clean up
|
|
|
|
rm -fr ./.setup-void.temp/
|