Skip to content

About

Repo to bootstrap a new macos laptop

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

macos-config

Personal macOS setup managed by the bootstrap script and Makefile. Homebrew installs applications and command-line tools, while chezmoi applies the files under home/.

Set up a new Mac

Run the bootstrap script:

curl -Ls https://raw.githubusercontent.com/rocpatel/macos-config/main/bootstrap | sh

The script installs Apple's Command Line Tools when needed, clones this repository to ~/Documents/workspace/github.com/rocpatel/macos-config, and runs make bootstrap from the checkout.

If the Command Line Tools installer opens, let it finish and then run the bootstrap command again.

To use a different workspace directory, set GITHUB_WORKSPACE:

GITHUB_WORKSPACE=/path/to/github/workspace \
  curl -Ls https://raw.githubusercontent.com/rocpatel/macos-config/main/bootstrap | sh

Use an existing checkout

Run these commands from the repository root:

make help
make bootstrap

make bootstrap applies the macOS defaults, installs everything in the Brewfile, and applies the dotfiles with chezmoi. It is safe to run again when the configuration changes.

The Brewfile provisions a complete Kubernetes and multi-cloud development workstation: AWS, Azure, and Google Cloud CLIs; Kubernetes and GitOps tools; Terraform and OpenTofu; container security utilities; OpenCode for AI-assisted development; and the local shell and editor dependencies. Version-sensitive tools such as Go, Node, and Terraform are managed by mise instead of being pinned as Homebrew formulas.

The individual steps are also available:

make macos-defaults  # Apply macOS preferences
make homebrew        # Install and update Brewfile dependencies
make dotfiles        # Install dependencies and apply the dotfiles
make ssh-key         # Create an optional Ed25519 SSH key

The SSH-key target is intentionally separate from bootstrap and refuses to overwrite an existing key.

Preview dotfile changes

Before running make dotfiles, inspect what chezmoi will change:

chezmoi --source . diff

The .chezmoiroot file tells chezmoi to use home/ as its source state, so repository files such as the Brewfile, Makefile, and README are not copied to the home directory.

Finish tmux setup

After starting tmux for the first time, press prefix + I to install the plugins declared in .tmux.conf with TPM.

Ghostty session startup

Ghostty runs ~/.local/bin/tmux-start for each new terminal surface. If tmux has existing sessions, an fzf picker shows each session's name, window count, and active directory. The picker can also create a new named session.

When no sessions exist, a new session starts automatically. Press Escape to cancel the picker and open a normal Zsh shell instead. Detaching from or exiting tmux also leaves the Ghostty window at a normal shell.

About

Repo to bootstrap a new macos laptop

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages