1
Fork 0
dots/user_commands.bash.1
2024-11-17 14:35:49 +05:00

35 lines
756 B
Bash

#!/bin/bash
USER=$1
USER_HOME=$(getent passwd "$USER" | cut -d: -f6)
echo "%wheel ALL=(ALL:ALL) NOPASSWD: ALL" | EDITOR='tee -a' visudo
systemctl enable docker.service
usermod -aG docker "$USER"
usermod --shell /usr/bin/zsh "$USER"
su - "$USER" <<EOF
mkdir -p "$USER_HOME/docs/repos"
cd "$USER_HOME/docs/repos"
git clone https://git.hadeedahmad.com/hadeed/dots
cd dots
git remote set-url origin git@git.hadeedahmad.com:hadeed/dots
python bin/stow.py
EOF
cd "$USER_HOME"
rm -rf Desktop Documents Downloads Music Pictures Public Templates Videos
mkdir dl docs pics
su - "$USER" -c "xdg-user-dirs-update"
su - "$USER" <<EOF
pyenv install 3.13
pyenv global 3.13
EOF
mkdir "$USER_HOME/.ssh"
chmod 700 "$USER_HOME/.ssh"