#!/bin/bash
HDOS_ROOT=/opt/hdos
rm -rf ${HDOS_ROOT}
apt install git sudo curl wget zsh -yqq

git clone https://git.corrupt.link/liz/hdos.git ${HDOS_ROOT}
chmod -R 755 ${HDOS_ROOT}

cp ${HDOS_ROOT}/lists/sources.list /etc/apt/sources.list

apt update

apt upgrade -yqq

xargs apt install -y < ${HDOS_ROOT}/lists/apt-packages

apt autoremove -y

${HDOS_ROOT}/scripts/nvm
${HDOS_ROOT}/scripts/codium
${HDOS_ROOT}/scripts/ohmyzsh

chsh root /usr/bin/zsh
chsh hacdc /usr/bin/zsh

sudo -u hacdc ${HDOS_ROOT}/scripts/ohmyzsh
sudo -u hacdc ${HDOS_ROOT}/scripts/nvm
sudo -u hacdc ${HDOS_ROOT}/scripts/pyenv
sudo -u hacdc gpg --list-keys
cp ${HDOS_ROOT}/dotfiles/zshrc /root/.zshrc
cp ${HDOS_ROOT}/dotfiles/zshrc /home/hacdc/.zshrc
chown hacdc:hacdc /home/hacdc/.zshrc

cp ${HDOS_ROOT}/dotfiles/slick-greeter.conf /etc/lightdm/
cp ${HDOS_ROOT}/dotfiles/htown.png /etc/lightdm/
