From 66fd7eea72d439b0929211c799d7ebd9e33b240b Mon Sep 17 00:00:00 2001 From: Hadeed Ahmad Date: Sun, 17 Nov 2024 12:19:13 +0500 Subject: [PATCH] Add instructions and a single install script --- README.md | 8 ++++++++ install-scripts/01-dots.sh | 9 --------- install-scripts/02-sudo.sh | 3 --- install-scripts/03-dirs.sh | 4 ---- install-scripts/04-pyenv.sh | 4 ---- install-scripts/05-docker.sh | 5 ----- install-scripts/06-zsh.sh | 3 --- user-commands-after.bash | 30 ++++++++++++++++++++++++++++++ packages.txt => user_pkglist.txt | 6 +----- zsh/dot-zshrc | 2 +- 10 files changed, 40 insertions(+), 34 deletions(-) create mode 100644 README.md delete mode 100755 install-scripts/01-dots.sh delete mode 100755 install-scripts/02-sudo.sh delete mode 100755 install-scripts/03-dirs.sh delete mode 100755 install-scripts/04-pyenv.sh delete mode 100755 install-scripts/05-docker.sh delete mode 100755 install-scripts/06-zsh.sh create mode 100644 user-commands-after.bash rename packages.txt => user_pkglist.txt (76%) diff --git a/README.md b/README.md new file mode 100644 index 0000000..0e3c071 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +## Instructions + +Run these commands: +```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 +``` diff --git a/install-scripts/01-dots.sh b/install-scripts/01-dots.sh deleted file mode 100755 index a04ea76..0000000 --- a/install-scripts/01-dots.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -mkdir -p ~/docs/repos -cd docs/repos - -git clone https://git.hadeedahmad.com/hadeed/dots -cd dots - -python bin/stow.py diff --git a/install-scripts/02-sudo.sh b/install-scripts/02-sudo.sh deleted file mode 100755 index 5dc2e66..0000000 --- a/install-scripts/02-sudo.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -echo "%wheel ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers diff --git a/install-scripts/03-dirs.sh b/install-scripts/03-dirs.sh deleted file mode 100755 index b3c13fe..0000000 --- a/install-scripts/03-dirs.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -rm -rf ~/Desktop ~/Documents ~/Downloads ~/Music ~/Pictures ~/Public ~/Templates ~/Videos -xdg-user-dirs-update diff --git a/install-scripts/04-pyenv.sh b/install-scripts/04-pyenv.sh deleted file mode 100755 index da3dc40..0000000 --- a/install-scripts/04-pyenv.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -pyenv install 3.13 -pyenv global 3.13 diff --git a/install-scripts/05-docker.sh b/install-scripts/05-docker.sh deleted file mode 100755 index 66a8eaa..0000000 --- a/install-scripts/05-docker.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -sudo systemctl enable --now docker.service -sudo usermod -aG docker $(whoami) -reboot diff --git a/install-scripts/06-zsh.sh b/install-scripts/06-zsh.sh deleted file mode 100755 index dde988b..0000000 --- a/install-scripts/06-zsh.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -sudo usermod --shell /usr/bin/zsh $(whoami) diff --git a/user-commands-after.bash b/user-commands-after.bash new file mode 100644 index 0000000..2f727a7 --- /dev/null +++ b/user-commands-after.bash @@ -0,0 +1,30 @@ +#!/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 --now docker.service +usermod -aG docker "$USER" + +usermod --shell /usr/bin/zsh "$USER" + +su - "$USER" <