From 22430b6ba90d3531dcc8570642d4126e70c41fbc Mon Sep 17 00:00:00 2001 From: codepuncher Date: Tue, 3 Feb 2026 18:46:38 +0000 Subject: [PATCH 1/5] feat(setup): install php 8.1 and 8.2 with extensions --- shell/functions | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/shell/functions b/shell/functions index e5c9713..3310e58 100644 --- a/shell/functions +++ b/shell/functions @@ -156,29 +156,31 @@ install_wsl_packages() { ) 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 + bcmath + bz2 + cli + common + curl + fpm + gd + gmp + intl + mbstring + mysql + opcache + readline + soap + tidy + xdebug + xml + xsl + zip ) - - # Join PACKAGES and PHP_PACKAGES - PACKAGES=( "${PACKAGES[@]}" "${PHP_PACKAGES[@]}" ) + PHP_VERSIONS=(8.1 8.2) + for VERSION in "${PHP_VERSIONS[@]}"; do + mapfile -t PHP_COMBINED_PACKAGES < <(printf '%s\n' "${PHP_PACKAGES[@]}" | sed "s/^/php${VERSION}-/") + PACKAGES=( "${PACKAGES[@]}" "${PHP_COMBINED_PACKAGES[@]}" ) + done sudo add-apt-repository ppa:longsleep/golang-backports -y From e691b2bba2cc268c20c36cbb4f942e59481c3401 Mon Sep 17 00:00:00 2001 From: codepuncher Date: Tue, 3 Feb 2026 18:57:30 +0000 Subject: [PATCH 2/5] fix(setup): cleanup nvim and delta installers --- setup.sh | 4 +++- shell/functions | 15 ++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/setup.sh b/setup.sh index 733f58b..4383c02 100755 --- a/setup.sh +++ b/setup.sh @@ -148,5 +148,7 @@ init_links if [[ "${SHELL}" != */zsh ]]; then chsh -s "$(which zsh)" + command zsh +else + echo 'Restart your terminal' fi -command zsh diff --git a/shell/functions b/shell/functions index 3310e58..c66279b 100644 --- a/shell/functions +++ b/shell/functions @@ -227,17 +227,22 @@ install_rustup() { } install_neovim() { - set -x 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}" + local OUTPUT_PATH="/tmp/${FILENAME}" + + curl -L "https://github.com/neovim/neovim/releases/latest/download/${FILENAME}" --output "${OUTPUT_PATH}" + mkdir -p ~/.local/bin + [ -e ~/.local/bin/nvim ] && rm ~/.local/bin/nvim + sudo rm -rf /opt/nvim sudo rm -rf /opt/neovim - sudo tar -C /opt -xzf "${FILENAME}" + + sudo tar -C /opt -xzf "${OUTPUT_PATH}" + ln -s "/opt/${DIRNAME}/bin/nvim" ~/.local/bin/nvim - set +x } gh_get_latest_tag() { @@ -255,7 +260,7 @@ install_git_delta() { VERSION="$(gh_get_latest_tag "${REPO}")" VERSION="${VERSION:-0.16.5}" FILE="git-delta_${VERSION}_amd64.deb" - curl -LO "https://github.com/${REPO}/releases/latest/download/${FILE}" && sudo dpkg -i "${FILE}" + curl -LO "https://github.com/${REPO}/releases/latest/download/${FILE}" && sudo dpkg -i "${FILE}" && rm "${FILE}" } install_node_packages() { From 75e806914c6127654d1d43e8729583cc6e4e1848 Mon Sep 17 00:00:00 2001 From: codepuncher Date: Tue, 3 Feb 2026 19:29:25 +0000 Subject: [PATCH 3/5] fix(setup): broken valet-linux install --- shell/aliases | 11 +++++++++++ shell/functions | 1 + 2 files changed, 12 insertions(+) diff --git a/shell/aliases b/shell/aliases index 32e5873..a9efa58 100644 --- a/shell/aliases +++ b/shell/aliases @@ -377,6 +377,17 @@ gh_set_repo_pat() { gh secret set REPO_PAT -b "${1}" --repo "${remote}-bedrock" } valet() { + if [ ! -f /usr/local/bin/valet ]; then + COMPOSER_BIN_PATH="$(composer config -g home)/vendor/bin" + if [ -f "${COMPOSER_BIN_PATH}/valet" ]; then + "${COMPOSER_BIN_PATH}/valet" "${@}" + else + echo 'Valet is not installed. Please re-run setup.sh' + fi + + return + fi + case "${1}" in open) ARGS=("open") diff --git a/shell/functions b/shell/functions index c66279b..ab5de18 100644 --- a/shell/functions +++ b/shell/functions @@ -137,6 +137,7 @@ install_wsl_packages() { # System cmake + libnss3-tools vim tldr git From 0f631836c653617374d4c0d0456283941789791a Mon Sep 17 00:00:00 2001 From: codepuncher Date: Wed, 4 Feb 2026 17:24:21 +0000 Subject: [PATCH 4/5] feat(setup): add `wslu` for wsl interop --- shell/functions | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shell/functions b/shell/functions index ab5de18..f020143 100644 --- a/shell/functions +++ b/shell/functions @@ -106,6 +106,7 @@ install_arch_packages() { } install_wsl_packages() { + add_wslu_ppa add_eza_ppa add_php_ppa add_gh_cli_ppa @@ -154,6 +155,7 @@ install_wsl_packages() { dnsutils bat zsh + wslu ) PHP_PACKAGES=( @@ -386,6 +388,10 @@ setup_arch_system_emoji_support() { sudo cp ~/.dotfiles/templates/fonts-local.conf /etc/fonts/local.conf } +add_wslu_ppa() { + sudo add-apt-repository ppa:wslutilities/wslu -y +} + 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 From 85955b8eaaa2aab0f35882441e883c42c4b31ccb Mon Sep 17 00:00:00 2001 From: codepuncher Date: Wed, 4 Feb 2026 17:31:38 +0000 Subject: [PATCH 5/5] feat(setup): add `mariadb-server` to wsl --- setup.sh | 1 + shell/functions | 25 +++++++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/setup.sh b/setup.sh index 4383c02..56e7f35 100755 --- a/setup.sh +++ b/setup.sh @@ -78,6 +78,7 @@ install_packages() { post_setup_arch_services elif grep --quiet --ignore-case microsoft /proc/sys/kernel/osrelease; then install_wsl_packages + post_setup_wsl_services fi # shellcheck disable=2119 install_go_packages diff --git a/shell/functions b/shell/functions index f020143..847da19 100644 --- a/shell/functions +++ b/shell/functions @@ -121,6 +121,7 @@ install_wsl_packages() { texlive-fonts-extra # Dev + mariadb-server tmux golang-go python3 @@ -373,14 +374,7 @@ post_install_packages() { post_setup_arch_services() { section_start 'Post setup arch services' - # shellcheck disable=2016 - echo 'Running `mysql_secure_installation`' - sudo mysql_secure_installation - - echo -e 'Creating wp mysql user' - sudo mysql -e "CREATE USER 'wp'@'localhost' IDENTIFIED BY 'wp'" - sudo mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'wp'@'localhost' WITH GRANT OPTION" - sudo mysql -e "FLUSH PRIVILEGES" + setup_mysql } setup_arch_system_emoji_support() { @@ -413,3 +407,18 @@ add_gh_cli_ppa() { 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 } + +setup_mysql() { + # shellcheck disable=2016 + echo 'Running `mysql_secure_installation`' + sudo mysql_secure_installation + + echo -e 'Creating wp mysql user' + sudo mysql -e "CREATE USER IF NOT EXISTS 'wp'@'localhost' IDENTIFIED BY 'wp'" + sudo mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'wp'@'localhost' WITH GRANT OPTION" + sudo mysql -e "FLUSH PRIVILEGES" +} + +post_setup_wsl_services() { + setup_mysql +}