2024-11-17 07:19:13 +00:00
|
|
|
#!/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
|
2024-11-17 07:19:13 +00:00
|
|
|
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
|
2024-11-17 07:19:13 +00:00
|
|
|
|
|
|
|
python bin/stow.py
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cd "$USER_HOME"
|
|
|
|
rm -rf Desktop Documents Downloads Music Pictures Public Templates Videos
|
2024-11-17 10:26:28 +00:00
|
|
|
mkdir -p dl docs pics
|
|
|
|
chown "$USER" dl docs pics
|
2024-11-17 07:19:13 +00:00
|
|
|
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"
|
2024-11-17 10:26:28 +00:00
|
|
|
chown "$USER" "$USER_HOME/.ssh"
|
2024-11-17 09:31:26 +00:00
|
|
|
chmod 700 "$USER_HOME/.ssh"
|