install/install.sh

118 lines
3.5 KiB
Bash
Raw Normal View History

#!/bin/bash
# Void Linux post-install script
echo "$(tput setaf 1) Starting Void Linux post-install script$(tput sgr 0)"
2020-08-15 09:36:25 +02:00
# Install packages
sudo xbps-install -Su
2020-08-23 09:41:59 +02:00
sudo xbps-install -Sy $(cat INSTALL/1_repos)
2020-08-23 20:50:47 +02:00
sudo xbps-install -Sy $(cat INSTALL/2_base)
2020-08-23 20:41:58 +02:00
2020-08-23 21:40:26 +02:00
git config --global credential.helper store
2020-08-23 20:41:58 +02:00
git clone https://gitlab.com/awesome-void/awesomeVoid ~/bin/dotfiles
2020-08-23 08:09:38 +02:00
# Choose gpu
echo "$(tput setaf 1) Which GPU you using?$(tput sgr 0)"
2020-08-23 20:55:07 +02:00
read -p "NVIDIA (n), AMD (a), INTEL (i) or QEMU (q) [n/a/i/q] " -n 1 video
2020-08-23 07:15:03 +02:00
echo
if [[ $video = "n" ]]; then
2020-08-23 20:50:47 +02:00
sudo xbps-install -Sy $(cat INSTALL/3_nvidia)
2020-08-23 11:42:14 +02:00
sudo nvidia-xconfig
2020-08-23 21:37:49 +02:00
2020-08-23 22:31:37 +02:00
read -p "Want install PCI passthrough? NO (n) or YES (y) [n/y] " -n 1 pass
echo
if [[ $pass = "y" ]]; then
modprobe kvm-amd
sudo ./INSTALL/pass.sh
2020-08-23 22:31:37 +02:00
elif [[ $pass = "n" ]]; then
2020-08-23 22:42:04 +02:00
echo "continuing"
2020-08-23 22:37:55 +02:00
else
echo "Invalid option. EXITING!"
exit 1
2020-08-23 22:33:24 +02:00
fi
2020-08-23 20:55:07 +02:00
elif [[ $video = "a" ]]; then
sudo xbps-install -Sy $(cat INSTALL/3_ati)
2020-08-23 21:37:49 +02:00
modprobe kvm-amd
2020-08-23 20:55:07 +02:00
elif [[ $video = "i" ]]; then
sudo xbps-install -Sy $(cat INSTALL/3_intel)
2020-08-23 07:15:03 +02:00
elif [[ $video = "q" ]]; then
2020-08-23 20:50:47 +02:00
sudo xbps-install -Sy $(cat INSTALL/3_qemu)
2020-08-23 11:42:14 +02:00
2020-08-23 07:15:03 +02:00
else
2020-08-23 12:40:36 +02:00
echo "Invalid option. EXITING!"
2020-08-23 07:15:03 +02:00
exit 1
fi
2020-08-23 09:41:59 +02:00
sudo xbps-install -Sy $(cat INSTALL/4_desktop)
2020-08-23 10:12:04 +02:00
# Choose window manager
echo "$(tput setaf 1) Which windows manager you want use?$(tput sgr 0)"
2020-08-23 11:40:10 +02:00
read -p "OPENBOX (o) or AWESOME (a) or SOMETHING ELSE (s) [o/a/n] " -n 1 vm
2020-08-23 10:12:04 +02:00
echo
if [[ $vm = "o" ]]; then
2020-08-23 20:50:47 +02:00
sudo xbps-install -Sy $(cat INSTALL/5_openbox)
sudo -u $USER obmenu-generator -p -i -u -d -c
2020-08-23 21:36:36 +02:00
echo "autorandr common &
tint2 &
setxkbmap cz &
nitrogen --restore &
volumeicon &
conky &" >> ~/.config/openbox/autostart
2020-08-23 23:12:09 +02:00
# cp ~/bin/dotfiles/home/zen/.config/openbox/rc.xml ~/.config/openbox
2020-08-23 10:12:04 +02:00
elif [[ $vm = "a" ]]; then
2020-08-23 20:50:47 +02:00
sudo xbps-install -Sy $(cat INSTALL/5_awesome)
2020-08-23 11:42:14 +02:00
2020-08-23 11:40:10 +02:00
elif [[ $vm = "s" ]]; then
2020-08-23 10:12:04 +02:00
echo "$(tput setaf 1) Install something else..$(tput sgr 0)"
2020-08-23 11:42:14 +02:00
2020-08-23 10:12:04 +02:00
else
echo "Invalid option."
exit 1
fi
2020-08-23 09:41:59 +02:00
#sudo xbps-install -Sy $(cat INSTALL/6_media)
#sudo xbps-install -Sy $(cat INSTALL/7_virtual)
#sudo xbps-install -Sy $(cat INSTALL/8_big)
#sudo xbps-install -Sy $(cat INSTALL/)
#sudo xbps-install -Sy $(cat INSTALL/)
2020-08-22 22:14:13 +02:00
# nested virtualization AMD
2020-08-23 06:30:30 +02:00
#modprobe kvm-amd
2020-08-22 22:14:13 +02:00
# make fish base shell
2020-08-15 09:36:25 +02:00
sudo usermod --shell /bin/fish zen
2020-08-23 09:51:59 +02:00
echo ". ~/.config/fish/aliases.fish" >> ~/.config/fish/config.fish
2020-08-23 10:34:52 +02:00
echo "alias xterm 'sakura'" >> ~/.config/fish/aliases.fish
2020-08-23 20:45:13 +02:00
# socklog
sudo usermod -a -G socklog $USER
# čeština
sudo micro /etc/default/libc-locales
2020-08-23 06:29:31 +02:00
sudo xbps-reconfigure -f glibc-locales
2020-08-15 09:36:25 +02:00
# creating bare repository
2020-08-23 11:52:45 +02:00
mkdir ~/.void
cd ~/.void
2020-08-15 09:36:25 +02:00
git init --bare
2020-08-23 08:06:04 +02:00
# Install services
sudo ln -s /etc/sv/dbus /var/service
sudo ln -s /etc/sv/elogind /var/service
#sudo ln -s /etc/sv/acpid /var/service
sudo ln -s /etc/sv/socklog-unix /var/service
sudo ln -s /etc/sv/nanoklogd /var/service
sudo ln -s /etc/sv/crond /var/service
sudo ln -s /etc/sv/chronyd /var/service
2020-08-23 12:04:43 +02:00
read -p "Spustit lightdm nyní? ano (a) nebo ne (n)? [a/n] " -n 1 lightdm
2020-08-23 11:51:15 +02:00
echo
2020-08-23 12:04:43 +02:00
if [[ $lightdm = "a" ]]; then
2020-08-23 11:51:15 +02:00
sudo ln -s /etc/sv/lightdm /var/service
elif [[ $lightdm = "n" ]]; then
2020-08-23 11:58:37 +02:00
echo "$(tput setaf 1) Enjoy void linux$(tput sgr 0)"
2020-08-23 11:55:32 +02:00
else
2020-08-23 12:40:36 +02:00
echo "Invalid option. EXITING!"
2020-08-23 12:01:31 +02:00
exit 1
2020-08-23 11:51:15 +02:00
fi