1
Fork 0
dots/user_commands.bash.1

36 lines
756 B
Groff
Raw Normal View History

#!/bin/bash
USER=$1
USER_HOME=$(getent passwd "$USER" | cut -d: -f6)
echo "%wheel ALL=(ALL:ALL) NOPASSWD: ALL" | EDITOR='tee -a' visudo
2024-11-17 09:31:26 +00:00
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
2024-11-17 09:31:26 +00:00
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
2024-11-17 09:31:26 +00:00
mkdir dl docs pics
su - "$USER" -c "xdg-user-dirs-update"
su - "$USER" <<EOF
pyenv install 3.13
pyenv global 3.13
EOF
2024-11-17 09:31:26 +00:00
mkdir "$USER_HOME/.ssh"
chmod 700 "$USER_HOME/.ssh"