Skip to content

Latest commit

 

History

History
446 lines (314 loc) · 9.15 KB

File metadata and controls

446 lines (314 loc) · 9.15 KB

Mac Dev Environment Setup

Git Configuration

git config --global user.name "First Last"       # fill in your name
git config --global user.email "ikke@mijndomain.com"
git config --global http.postBuffer 157286400

Tip: Use git fetch + git merge instead of git pull (or set rebase merge).


Editors & Tools

  • Install VS Code
  • Install PlatformIO in VS Code
  • Install Karabiner-Elements (map Shift-ESC to tilde)

Terminal

  • Install iTerm2 and make it the default terminal
  • Install iTerm2 shell integrations

Homebrew

Install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Liquidprompt

Install Liquidprompt via git (powerline_full theme):

git clone https://github.com/liquidprompt/liquidprompt.git ~/liquidprompt

Add to ~/.zshrc:

# Only load Liquidprompt in interactive shells, not from a script or from scp
[[ $- = *i* ]] && source ~/liquidprompt/liquidprompt
[[ $- = *i* ]] && source ~/liquidprompt/themes/powerline/powerline.theme
[[ $- = *i* ]] && lp_theme powerline

Powerline Fonts

mkdir -p ~/Git/generic
cd ~/Git/generic
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts && ./install.sh
  • In iTerm2: change font to Roboto Mono for Powerline, Regular, 17px
  • Change colors to Solarized Dark in iTerm2
  • Check if VS Code terminal also has the Powerline fonts

Brew Packages

brew update
brew upgrade

Core CLI Tools

brew install fzf
$(brew --prefix)/opt/fzf/install
exec zsh

brew install rustup
rustup-init
cargo install exa

brew install cowsay
brew install coreutils
brew install bat
brew install ripgrep
brew install zoxide
brew install entr
brew install wget

Google Cloud SDK

wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-darwin-arm.tar.gz
# Extract in user home directory, then:
./google-cloud-sdk/install.sh
rm google-cloud-cli-darwin-arm.tar.gz
exec zsh
gcloud components update
gcloud auth login

Ansible

brew install python@3.11
python3.11 -m venv ansible-env
source ansible-env/bin/activate

pip3 install ansible-core==2.11.6
pip3 install apache_libcloud==3.3.1
pip3 install google-auth
pip3 install requests

Ansible Config

Create ~/.ansible.cfg:

[galaxy]
server = https://old-galaxy.ansible.com/

Ansible Galaxy Collections & Roles

ansible-galaxy collection install google.cloud:1.2.0
ansible-galaxy collection install community.google:1.0.0
ansible-galaxy collection install community.general:3.8.1
ansible-galaxy collection install ansible.windows
ansible-galaxy role install googlecloudplatform.google_cloud_ops_agents

Networking

# Traceroute
brew install mtr
  • Install WireGuard (use IPs from wp-voice-ansible)
  • Login via gcloud ssh to one machine in each project

More Brew Packages

# Disk usage
brew install ncdu

# Downloader
brew install aria2

# Calculator
brew install insect

# MySQL CLI
brew install mycli

# PostgreSQL CLI
brew tap dbcli/tap
brew install pgcli

# System info
brew install neofetch

# Markdown reader
brew install glow

# FTP/WebDAV etc.
brew install duck

# Top replacement
brew install bpytop

# Find replacement
brew install fd

# Remote terminal helper
brew install tmate

# Lazygit (TUI)
brew install lazygit

# Video downloader (YouTube etc.)
brew install lux

# Terminal notifier
brew install terminal-notifier

Neovim

brew install neovim
pip3 install pynvim
sh -c "$(wget -O- https://raw.githubusercontent.com/Shougo/dein-installer.vim/master/installer.sh)"
nvim +"call dein#update()" +qall

Redis (Local for Testing)

brew install redis
brew services start redis

Even More Brew Packages

# Disk usage (alternative)
brew install dust

# Cheat sheets (handy shortened manuals)
brew install cheat

# Terminal recorder
brew install asciinema
npm --global i -D git+https://github.com/miraclx/svgembed svg-term-cli

# Zsh autocomplete
brew install zsh-autocomplete

# HTTP client
brew install httpie

# Zsh completions
brew install zsh-completions

Brew Stats

# Count installed formulae / casks
brew list --formula | wc -l
brew list --cask | wc -l

# Packages you explicitly asked for (not pulled in as dependencies)
brew leaves --installed-on-request

# Full dependency tree of everything installed
brew deps --tree --installed

# Disk space used by Homebrew
du -sh "$(brew --prefix)"

# What's outdated
brew outdated

Snapshot — 2026-06-27

Metric Value
Formulae installed 319
Casks installed 8
Explicitly requested (brew leaves --installed-on-request) 57
Outdated packages 137
Disk used (/opt/homebrew) 7.8 GB
Homebrew version 6.0.4

Captured on Apple Silicon (/opt/homebrew). Regenerate any time with the commands above.


kubectl

gcloud components install kubectl

SSL Certificates

Export system root certificates:

security find-certificate -a -p \
  /System/Library/Keychains/SystemRootCertificates.keychain \
  /Library/Keychains/System.keychain > ~/.mac-ca.pem

Fix permissions

for file in $(compaudit); do
  sudo chmod 755 $file
  sudo chmod 755 $(dirname $file)
  sudo chown $(whoami) $file
done

Perl

Install latest .zshrc, then:

rm -fr ~/perl5
PERL_MM_OPT="INSTALL_BASE=$HOME/perl5" cpan local::lib
eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)"
brew install perl
curl -L https://cpanmin.us | perl - App::cpanminus
cpanm App::cpanoutdated
cpan-outdated | cpanm --notest

Perl Modules

cpanm JSON::XS
cpanm Mojolicious
cpanm Mojo::Redis
cpanm LWP::Protocol::https
cpanm Mojolicious::Plugin::Sentry
cpanm Config::YAML
cpanm Carton
cpanm -f Perl::PrereqScanner::Lite
cpanm App::scan_prereqs_cpanfile
cpanm File::JSON::Slurper
cpanm -f AnyEvent
cpanm AnyEvent::AIO
cpanm Coro
cpanm Class::Refresh
cpanm Compiler::Lexer
cpanm Hash::SafeKeys
cpanm Perl::LanguageServer

Redis::Fast (requires OpenSSL)

export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/opt/openssl/lib/
cpanm -n Redis::Fast

Imager::File::PNG (requires libpng)

export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/Cellar/libpng/1.6.44/lib/
export C_INCLUDE_PATH=$C_INCLUDE_PATH:/opt/homebrew/Cellar/libpng/1.6.44/include/
cpanm Imager::File::PNG

Global Gitignore

echo ".DS_Store" > ~/.gitignore
echo ".vscode" >> ~/.gitignore
git config --global core.excludesFile '~/.gitignore'

MacFUSE

brew install --cask macfuse

Add to ~/.zshrc:

export SSL_CERT_FILE="$HOME/.mac-ca.pem"
export MOJO_CA_FILE="$HOME/.mac-ca.pem"           # optional, nice for Mojolicious
export PERL_LWP_SSL_CA_FILE="$HOME/.mac-ca.pem"   # optional, helps LWP too

zellij

Install with Homebrew (puts zellij on PATH, needed for the VS Code terminal below):

brew install zellij

Or run it once without installing:

bash <(curl -L https://zellij.dev/launch)

Theme — Solarized Dark + Powerline

This repo ships a custom Zellij theme, dotconfig/zellij/themes/solarized-powerline.kdl, that keeps the Solarized Dark base (so it matches the VS Code Better Solarized Dark Italics theme and the iTerm2 Solarized Dark palette above) while recolouring the status bar to match the Liquidprompt powerline prompt — the active mode ribbon uses powerline orange, inactive ribbons use the powerline path grey, and the status-bar text is muted Solarized grey instead of the default glaring white.

Install it (Zellij auto-loads ~/.config/zellij/themes/*.kdl):

mkdir -p ~/.config/zellij/themes
cp dotconfig/zellij/themes/solarized-powerline.kdl ~/.config/zellij/themes/

Then select it in ~/.config/zellij/config.kdl:

theme "solarized-powerline"

Zellij reads the theme when a session is created. To apply it to an already-running session, recreate it: detach (Ctrl o then d), zellij kill-session <name>, then reattach — session serialization restores your panes and cwd. See VSCODE.md for details.

On macOS there is no Alt key — Zellij's default Alt-based bindings (e.g. pane/tab navigation) won't fire until you make your terminal send Option as Alt/Meta:

  • iTerm2: Settings → Profiles → Keys → set Left Option key to Esc+ (the Esc+ option, not Normal or Meta). This makes Option send the Alt sequences, so the default Alt bindings work as-is.
  • Ghostty: add macos-option-as-alt = true to ~/.config/ghostty/config
  • Terminal.app: Settings → Profiles → Keyboard → enable Use Option as Meta key

The Ctrl-based bindings work out of the box; only the Alt ones need this.

VS Code integration

Zellij is wired in as the default integrated terminal for this project, with a persistent per-project session — and can be made the default for every project too. See VSCODE.md for both the project and global setup.