From 30af79c1956619fddf4df10da2d2bcf14d3f058d Mon Sep 17 00:00:00 2001 From: codepuncher Date: Mon, 2 Feb 2026 15:35:43 +0000 Subject: [PATCH 01/10] feat(setup): use bash "strict mode" --- setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index ebd9a73..a316b05 100755 --- a/setup.sh +++ b/setup.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Uncomment below line for 'debug mode' -# set -x +# Set "strict mode" +set -euo pipefail -SCRIPT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +SCRIPT_PATH="${BASH_SOURCE%/*}" if [[ -f "${SCRIPT_PATH}/shell/functions" ]]; then source "${SCRIPT_PATH}/shell/functions" fi From 0750dfd0dede08d1ed7523eef60b028000a3473c Mon Sep 17 00:00:00 2001 From: codepuncher Date: Mon, 2 Feb 2026 15:36:15 +0000 Subject: [PATCH 02/10] fix(setup): ensure `~/.local/bin` exists --- shell/functions | 1 + 1 file changed, 1 insertion(+) diff --git a/shell/functions b/shell/functions index 93bed3c..9c6b487 100644 --- a/shell/functions +++ b/shell/functions @@ -203,6 +203,7 @@ install_neovim() { local DIRNAME='nvim-linux-x86_64' local FILENAME="${DIRNAME}.tar.gz" curl -LO "https://github.com/neovim/neovim/releases/latest/download/${FILENAME}" -o "/tmp/${FILENAME}" + mkdir -p ~/.local/bin rm ~/.local/bin/nvim sudo rm -rf /opt/nvim sudo rm -rf /opt/neovim From e9e20b6943103c9783ac2a751e38be4fc9f7b648 Mon Sep 17 00:00:00 2001 From: codepuncher Date: Mon, 2 Feb 2026 15:41:35 +0000 Subject: [PATCH 03/10] fix(wsl): use 1Password from MS Store --- git/users/wsl.gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/users/wsl.gitconfig b/git/users/wsl.gitconfig index 68ac36a..a23f3cf 100644 --- a/git/users/wsl.gitconfig +++ b/git/users/wsl.gitconfig @@ -6,4 +6,4 @@ sshCommand = ssh.exe [gpg "ssh"] - program = "/mnt/c/Users/LeeHanbury-Pickett/AppData/Local/1Password/app/8/op-ssh-sign-wsl" + program = "/mnt/c/Users/LeeHanbury-Pickett/AppData/Local/Microsoft/WindowsApps/op-ssh-sign-wsl.exe" From 6ec9a844d03830f136959e688a96f7cba7bf1a41 Mon Sep 17 00:00:00 2001 From: codepuncher Date: Mon, 2 Feb 2026 15:48:21 +0000 Subject: [PATCH 04/10] fix(wsl): replace `exa` with `eza` --- shell/functions | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/shell/functions b/shell/functions index 9c6b487..0576155 100644 --- a/shell/functions +++ b/shell/functions @@ -106,6 +106,8 @@ install_arch_packages() { } install_wsl_packages() { + add_eza_ppa + PACKAGES=( # Text processing pandoc @@ -135,11 +137,11 @@ install_wsl_packages() { vim tldr git + gpg jq ripgrep - exa + eza fd-find - # git-delta xsel xclip imagemagick @@ -149,6 +151,8 @@ install_wsl_packages() { sudo add-apt-repository ppa:longsleep/golang-backports -y + sudo apt update + # shellcheck disable=2046 sudo apt install -y "${PACKAGES[@]}" @@ -350,3 +354,10 @@ setup_arch_system_emoji_support() { sudo pamac install noto-fonts-emoji sudo cp ~/.dotfiles/templates/fonts-local.conf /etc/fonts/local.conf } + +add_eza_ppa() { + sudo mkdir -p /etc/apt/keyrings + wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg + echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list + sudo chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list +} From 7d107fb489d320af0fc7e5e65d301c6fedb21b56 Mon Sep 17 00:00:00 2001 From: codepuncher Date: Tue, 3 Feb 2026 11:49:34 +0000 Subject: [PATCH 05/10] remove mailpit --- shell/functions | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/shell/functions b/shell/functions index 0576155..60a4dae 100644 --- a/shell/functions +++ b/shell/functions @@ -157,7 +157,6 @@ install_wsl_packages() { sudo apt install -y "${PACKAGES[@]}" install_rustup - install_mailpit install_neovim install_git_delta # ensure fd is available @@ -191,17 +190,6 @@ install_rustup() { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y } -install_mailpit() { - # shellcheck disable=2024 - if ! sudo bash < <(curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh); then - echo 'Failed to install Mailpit' >&2 - return 1 - fi - sudo ln -s "${HOME}/.dotfiles/templates/mailpit.service" "/etc/systemd/system/mailpit.service" - sudo systemctl enable mailpit && sudo systemctl start mailpit - sudo ln -s /usr/local/bin/mailpit /usr/sbin/sendmail -} - install_neovim() { set -x local DIRNAME='nvim-linux-x86_64' From a80fee865820e910af096fbea1e397c4b4956d64 Mon Sep 17 00:00:00 2001 From: codepuncher Date: Tue, 3 Feb 2026 11:50:21 +0000 Subject: [PATCH 06/10] fix(setup): ensure fd is symlinked without error --- shell/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/functions b/shell/functions index 60a4dae..3f70b4d 100644 --- a/shell/functions +++ b/shell/functions @@ -160,7 +160,7 @@ install_wsl_packages() { install_neovim install_git_delta # ensure fd is available - ln -s "$(which fdfind)" ~/.local/bin/fd + ln -sf "$(which fdfind)" ~/.local/bin/fd } setup_arch_services() { From a05998e310dcc052e150bef4250130f088e28048 Mon Sep 17 00:00:00 2001 From: codepuncher Date: Tue, 3 Feb 2026 11:51:05 +0000 Subject: [PATCH 07/10] feat(setup): add php8.1 to WSL --- shell/functions | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/shell/functions b/shell/functions index 3f70b4d..d1bc43d 100644 --- a/shell/functions +++ b/shell/functions @@ -107,6 +107,7 @@ install_arch_packages() { install_wsl_packages() { add_eza_ppa + add_php_ppa PACKAGES=( # Text processing @@ -149,6 +150,31 @@ install_wsl_packages() { bat ) + PHP_PACKAGES=( + php8.1-bcmath + php8.1-bz2 + php8.1-cli + php8.1-common + php8.1-curl + php8.1-fpm + php8.1-gd + php8.1-gmp + php8.1-intl + php8.1-mbstring + php8.1-mysql + php8.1-opcache + php8.1-readline + php8.1-soap + php8.1-tidy + php8.1-xdebug + php8.1-xml + php8.1-xsl + php8.1-zip + ) + + # Join PACKAGES and PHP_PACKAGES + PACKAGES=( "${PACKAGES[@]}" "${PHP_PACKAGES[@]}" ) + sudo add-apt-repository ppa:longsleep/golang-backports -y sudo apt update @@ -349,3 +375,8 @@ add_eza_ppa() { echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list sudo chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list } + +add_php_ppa() { + sudo add-apt-repository ppa:ondrej/php -y +} + From 54d3f4de78500c894b313b9fd9938f9a38b0fb08 Mon Sep 17 00:00:00 2001 From: codepuncher Date: Tue, 3 Feb 2026 13:04:10 +0000 Subject: [PATCH 08/10] fix(setup): various bugs --- setup.sh | 10 +++++++--- shell/functions | 10 +++++++--- shell/profile | 3 +++ shell/zshrc | 2 +- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/setup.sh b/setup.sh index a316b05..79a08d3 100755 --- a/setup.sh +++ b/setup.sh @@ -3,7 +3,7 @@ # Set "strict mode" set -euo pipefail -SCRIPT_PATH="${BASH_SOURCE%/*}" +SCRIPT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) if [[ -f "${SCRIPT_PATH}/shell/functions" ]]; then source "${SCRIPT_PATH}/shell/functions" fi @@ -21,12 +21,15 @@ backup() { } move_link() { - backup "${1}" "${2}" + if backup "${1}" "${2}"; then + echo "${1} backed up" + fi + from="${SCRIPT_PATH}/${2}" to="${HOME}/${1}" new_path="$(dirname "${to}")" mkdir -p "${new_path}" - ln -s "${from}" "${to}" + ln -sf "${from}" "${to}" } init_links() { @@ -140,6 +143,7 @@ install_packages install_tools init_dirs init_links + if [[ "${SHELL}" != */zsh ]]; then chsh -s "$(which zsh)" fi diff --git a/shell/functions b/shell/functions index d1bc43d..5320077 100644 --- a/shell/functions +++ b/shell/functions @@ -6,7 +6,7 @@ section_start() { } reinstall_dotfiles() { - rm -rf ~/.{local/bin,npm,nvm,zinit,go/bin,config/composer/vendor} + rm -rf ~/.{local/bin,npm,nvm,zinit,go/bin,config/composer/vendor,nvim,config/nvim} cd ~/.dotfiles && ./setup.sh } @@ -148,6 +148,7 @@ install_wsl_packages() { imagemagick dnsutils bat + zsh ) PHP_PACKAGES=( @@ -209,7 +210,9 @@ setup_arch_services() { } install_nvm() { - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash + export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.config/nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" && \ + mkdir -p "${NVM_DIR}" && \ + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash } install_rustup() { @@ -222,7 +225,7 @@ install_neovim() { local FILENAME="${DIRNAME}.tar.gz" curl -LO "https://github.com/neovim/neovim/releases/latest/download/${FILENAME}" -o "/tmp/${FILENAME}" mkdir -p ~/.local/bin - rm ~/.local/bin/nvim + [ -e ~/.local/bin/nvim ] && rm ~/.local/bin/nvim sudo rm -rf /opt/nvim sudo rm -rf /opt/neovim sudo tar -C /opt -xzf "${FILENAME}" @@ -252,6 +255,7 @@ install_node_packages() { if [[ ! -d "${NVM_DIR}" ]] || [[ ! -d "${HOME}/.nvm" ]]; then install_nvm fi + PACKAGES=( @ansible/ansible-language-server @fsouza/prettierd diff --git a/shell/profile b/shell/profile index 4355700..77de502 100644 --- a/shell/profile +++ b/shell/profile @@ -32,3 +32,6 @@ if [ -d "/usr/local/cuda-10.0/bin/" ]; then export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} fi . "$HOME/.cargo/env" + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm diff --git a/shell/zshrc b/shell/zshrc index fe10ed9..280cc54 100644 --- a/shell/zshrc +++ b/shell/zshrc @@ -130,7 +130,7 @@ compdef __git_branch_names gpDo # Node export NVM_SYMLINK_CURRENT=true export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion if ! type node &>/dev/null; then nvm install --lts && nvm use --lts && nvm alias default 'lts/*' From aa9f64a23b7a1aecfa5cd3692cd64a694f3ab39c Mon Sep 17 00:00:00 2001 From: codepuncher Date: Tue, 3 Feb 2026 13:10:22 +0000 Subject: [PATCH 09/10] feat(setup): install gh cli --- shell/functions | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/shell/functions b/shell/functions index 5320077..dd6d5ac 100644 --- a/shell/functions +++ b/shell/functions @@ -108,6 +108,7 @@ install_arch_packages() { install_wsl_packages() { add_eza_ppa add_php_ppa + add_gh_cli_ppa PACKAGES=( # Text processing @@ -138,6 +139,7 @@ install_wsl_packages() { vim tldr git + gh gpg jq ripgrep @@ -384,3 +386,12 @@ add_php_ppa() { sudo add-apt-repository ppa:ondrej/php -y } +add_gh_cli_ppa() { + (type -p wget >/dev/null || (sudo apt update && sudo apt install wget -y)) \ + && sudo mkdir -p -m 755 /etc/apt/keyrings \ + && out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \ + && cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ + && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ + && sudo mkdir -p -m 755 /etc/apt/sources.list.d \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null + } From c5ac505032991d6d3d3d145b4602d4515797046d Mon Sep 17 00:00:00 2001 From: codepuncher Date: Tue, 3 Feb 2026 13:22:43 +0000 Subject: [PATCH 10/10] fix shellcheck issues --- setup.sh | 1 + shell/functions | 2 ++ 2 files changed, 3 insertions(+) diff --git a/setup.sh b/setup.sh index 79a08d3..f8e1b8b 100755 --- a/setup.sh +++ b/setup.sh @@ -94,6 +94,7 @@ install_zinit() { } install_tpm() { + # shellcheck disable=SC2031 TMUX_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}/tmux" TPM_PATH="${TMUX_HOME}/plugins/tpm" if [[ -d "${TPM_PATH}" ]]; then diff --git a/shell/functions b/shell/functions index dd6d5ac..534b322 100644 --- a/shell/functions +++ b/shell/functions @@ -212,6 +212,7 @@ setup_arch_services() { } install_nvm() { + # shellcheck disable=SC2155 export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.config/nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" && \ mkdir -p "${NVM_DIR}" && \ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash @@ -387,6 +388,7 @@ add_php_ppa() { } add_gh_cli_ppa() { + # shellcheck disable=SC2086,SC2002 (type -p wget >/dev/null || (sudo apt update && sudo apt install wget -y)) \ && sudo mkdir -p -m 755 /etc/apt/keyrings \ && out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \