Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ brew 'autoenv'
brew 'awscli'
brew 'bash'
brew 'cmake'
brew 'colima'
brew 'coreutils'
brew 'crane'
brew 'ctags'
brew 'cue'
brew 'curl'
brew 'direnv'
brew 'docker'
brew 'docker-buildx'
brew 'docker-compose'
brew 'editorconfig'
brew 'fd'
brew 'fzf'
Expand All @@ -34,15 +38,11 @@ brew 'kubernetes-cli'
brew 'markdownlint-cli2'
brew 'neovim'
brew 'pandoc'
brew 'podman'
brew 'podman-compose'
brew 'pre-commit'
brew 'prettier'
brew 'ripgrep'
brew 'rustup'
brew 'shellcheck'
brew 'libkrun/krun/krunkit', trusted: true
brew 'libkrun/krun/gvproxy', trusted: true
brew 'sqlite'
brew 'step'
brew 'terraform-docs'
Expand All @@ -63,5 +63,4 @@ cask 'ghostty'
cask 'linear'
cask 'font-jetbrains-mono-nerd-font'
cask 'obsidian'
cask 'podman-desktop'
cask 'spotify'
2 changes: 0 additions & 2 deletions Brewfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ brew 'kubernetes-cli'
brew 'markdownlint-cli2'
brew 'neovim'
brew 'pandoc'
brew 'podman'
brew 'podman-compose'
brew 'pre-commit'
brew 'prettier'
brew 'ripgrep'
Expand Down
1 change: 0 additions & 1 deletion configs/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ alias avenv="source venv/bin/activate"
alias azlogin="az login"
alias brewu="brew update && brew upgrade -y"
alias cvenv="python3 -m venv venv"
alias docker=podman
alias gcloudlogin='gcloud auth application-default login && gcloud auth login'
alias gpgreset="gpgconf --kill gpg-agent && gpg --card-status"
alias json="python -m json.tool"
Expand Down
2 changes: 1 addition & 1 deletion configs/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ -d "$HOME/.oh-my-zsh" ]; then
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell"

plugins=(autoenv asdf git podman docker-compose terraform)
plugins=(autoenv asdf git docker docker-compose terraform)

# Compilation flags
# export ARCHFLAGS="-arch x86_64"
Expand Down
47 changes: 46 additions & 1 deletion scripts/install-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,44 @@ elif [[ "$IS_DEBIAN" == true ]]; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi

# Docker Engine from Docker's apt repo. Ubuntu derivatives set UBUNTU_CODENAME.
DOCKER_DISTRO=""
DOCKER_SUITE=""
if [[ -n "${UBUNTU_CODENAME:-}" ]]; then
DOCKER_DISTRO="ubuntu"
DOCKER_SUITE="$UBUNTU_CODENAME"
elif [[ "$DISTRO_ID" == "debian" ]]; then
DOCKER_DISTRO="debian"
DOCKER_SUITE="$VERSION_CODENAME"
fi

DOCKER_PACKAGES=()
if [[ -n "$DOCKER_DISTRO" ]]; then
echo "Adding Docker apt repository ..."
DOCKER_KEY_FPR="9DC858229FC7DD38854AE2D88D81803C0EBFCD88"
DOCKER_KEY_TMP="$(mktemp)"
sudo apt install -y ca-certificates curl gnupg
curl -fsSL "https://download.docker.com/linux/$DOCKER_DISTRO/gpg" -o "$DOCKER_KEY_TMP"
if ! gpg --show-keys --with-colons "$DOCKER_KEY_TMP" | grep -q "^fpr:::::::::$DOCKER_KEY_FPR:"; then
echo "Docker apt key fingerprint mismatch. Aborting." >&2
rm -f "$DOCKER_KEY_TMP"
exit 1
fi
sudo install -m 0755 -d /etc/apt/keyrings
sudo install -m 0644 "$DOCKER_KEY_TMP" /etc/apt/keyrings/docker.asc
rm -f "$DOCKER_KEY_TMP"
sudo tee /etc/apt/sources.list.d/docker.sources >/dev/null <<EOF
Types: deb
URIs: https://download.docker.com/linux/$DOCKER_DISTRO
Suites: $DOCKER_SUITE
Components: stable
Signed-By: /etc/apt/keyrings/docker.asc
EOF
DOCKER_PACKAGES=(docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin)
else
echo "No Docker apt repository for $DISTRO_ID. Skipping Docker."
fi

echo "Updating apt ..."
sudo apt update -y

Expand All @@ -64,7 +102,14 @@ elif [[ "$IS_DEBIAN" == true ]]; then
python-dev-is-python3 \
shellcheck \
tmux \
yq
yq \
"${DOCKER_PACKAGES[@]}"

# The docker group grants root-equivalent access. Takes effect on next login.
if [[ ${#DOCKER_PACKAGES[@]} -gt 0 ]] && ! id -nG "$USER" | grep -qw docker; then
sudo usermod -aG docker "$USER"
echo "Added $USER to the docker group. Log out and back in to use docker without sudo."
fi

echo "Updating Homebrew ..."
brew update
Expand Down
15 changes: 15 additions & 0 deletions scripts/install-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ fi
echo "Updating Claude Code ..."
"$CLAUDE_BIN" update

# Point the Docker CLI at Homebrew's plugin dir so buildx and compose load
DOCKER_PLUGIN_DIR="/opt/homebrew/lib/docker/cli-plugins"
DOCKER_CONFIG_FILE="$HOME/.docker/config.json"
if [[ "$OS_TYPE" == "Darwin" ]] && command -v jq >/dev/null 2>&1; then
mkdir -p "$HOME/.docker"
[ -s "$DOCKER_CONFIG_FILE" ] || echo '{}' > "$DOCKER_CONFIG_FILE"
if ! jq -e --arg d "$DOCKER_PLUGIN_DIR" '(.cliPluginsExtraDirs // []) | index($d)' "$DOCKER_CONFIG_FILE" >/dev/null; then
echo "Adding Homebrew Docker CLI plugin dir to $DOCKER_CONFIG_FILE ..."
DOCKER_CONFIG_TMP="$(mktemp)"
jq --arg d "$DOCKER_PLUGIN_DIR" '.cliPluginsExtraDirs = ((.cliPluginsExtraDirs // []) + [$d])' "$DOCKER_CONFIG_FILE" > "$DOCKER_CONFIG_TMP"
cat "$DOCKER_CONFIG_TMP" > "$DOCKER_CONFIG_FILE"
rm -f "$DOCKER_CONFIG_TMP"
fi
fi

# Install latest Terraform via tfenv if no versions are installed
if command -v tfenv >/dev/null 2>&1 && ! tfenv list >/dev/null 2>&1; then
echo "Installing Terraform via tfenv ..."
Expand Down
Loading