From 52cc4cb1ca110ec8c2a05efc5fb8b0feb239729b Mon Sep 17 00:00:00 2001 From: Hadeed Ahmad <me@hadeedahmad.com> Date: Sun, 17 Nov 2024 14:31:26 +0500 Subject: [PATCH] Fix stuff --- README.md | 8 ++--- ...-commands-after.bash => user_commands.bash | 7 +++- user_commands.bash.1 | 35 +++++++++++++++++++ user_pkglist.txt | 2 +- user_pkglist.txt.1 | 13 +++++++ 5 files changed, 59 insertions(+), 6 deletions(-) rename user-commands-after.bash => user_commands.bash (77%) create mode 100644 user_commands.bash.1 create mode 100644 user_pkglist.txt.1 diff --git a/README.md b/README.md index 0aecd28..a3eaef0 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ ## Instructions Run these commands before installation: -```sh - curl -fsSL -o ~/user_pkglist.txt https://git.hadeedahmad.com/hadeed/dots/raw/branch/main/user_pkglist.txt - curl -fsSL -o ~/user-commands-after.bash https://git.hadeedahmad.com/hadeed/dots/raw/branch/main/user-commands-after.bash - chmod +x ~/user-commands-after.bash +```bash +wget -qo ~/user_pkglist https://git.hadeedahmad.com/hadeed/dots/raw/branch/main/user_pkglist.txt +wget -qo ~/user_commands.bash https://git.hadeedahmad.com/hadeed/dots/raw/branch/main/user_commands.bash +chmod +x ~/user_commands.bash ``` diff --git a/user-commands-after.bash b/user_commands.bash similarity index 77% rename from user-commands-after.bash rename to user_commands.bash index 2f727a7..3401367 100644 --- a/user-commands-after.bash +++ b/user_commands.bash @@ -5,7 +5,7 @@ USER_HOME=$(getent passwd "$USER" | cut -d: -f6) echo "%wheel ALL=(ALL:ALL) NOPASSWD: ALL" | EDITOR='tee -a' visudo -systemctl enable --now docker.service +systemctl enable docker.service usermod -aG docker "$USER" usermod --shell /usr/bin/zsh "$USER" @@ -16,15 +16,20 @@ su - "$USER" <<EOF 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" diff --git a/user_commands.bash.1 b/user_commands.bash.1 new file mode 100644 index 0000000..3401367 --- /dev/null +++ b/user_commands.bash.1 @@ -0,0 +1,35 @@ +#!/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" diff --git a/user_pkglist.txt b/user_pkglist.txt index 7d5f88c..ac9de4c 100644 --- a/user_pkglist.txt +++ b/user_pkglist.txt @@ -6,7 +6,7 @@ kitty neovim pyenv starship -tiny-xxd +tinyxxd ttf-jetbrains-mono ttf-nerd-fonts-symbols-common xsel diff --git a/user_pkglist.txt.1 b/user_pkglist.txt.1 new file mode 100644 index 0000000..ac9de4c --- /dev/null +++ b/user_pkglist.txt.1 @@ -0,0 +1,13 @@ +bat +docker +docker-compose +eza +kitty +neovim +pyenv +starship +tinyxxd +ttf-jetbrains-mono +ttf-nerd-fonts-symbols-common +xsel +zsh