This repository contains Ansible playbooks and scripts to automatically set up a new Mac for development or update an existing one. It installs and configures various tools and applications, saving time and effort when setting up or maintaining a development environment.
This repository automates the process of setting up a Mac for development. It:
- Installs essential command-line tools and applications
- Configures system preferences and settings
- Sets up development environments for various programming languages
- Installs and configures productivity tools
- Manages dotfiles for consistent configurations across machines
- Provides separate configurations for personal and work setups
- A Mac running macOS (tested on macOS 15.0 arm64)
- Internet connection
-
Clone this repository:
git clone https://github.com/your-username/mac-dev-setup.git cd mac-dev-setup
-
Choose the appropriate installation target:
- For personal setup:
make
- For work setup:
make work
These commands will automatically run the necessary setup scripts, install dependencies, and configure your system based on the chosen profile.
- For personal setup:
-
To install private keys (optional):
make install-keys
This uses Ansible Vault to decrypt and install private keys.
To update an existing Mac that was previously set up using this repository:
-
Navigate to the repository directory:
cd path/to/mac-dev-setup
-
Pull the latest changes:
git pull
-
Run the appropriate installation target:
- For personal setup:
make
- For work setup:
make work
- For personal setup:
This repository supports both personal and work setups:
-
Personal setup (
make
):- Installs a wider range of applications and tools
- Configures personal Git settings
- Sets up personal SSH and GPG keys
-
Work setup (
make work
):- Installs a more focused set of work-related tools
- Avoids installing personal applications
- Can be customized further for specific work environments
defaults.yaml
: Contains default settings and package listslocal.yaml
: Main Ansible playbook that imports various tasksvars/api_keys.yml
: Contains encrypted API keys (see API Keys Documentation)
-
Set up the iTerm2 theme:
- Open iTerm2 -> Preferences -> Profiles
- Select "Mac Dev Environment" profile
- Click "Other Actions" and select "Set as Default"
-
Set up GPG for Git: After running the installation script, manually run:
gpgconf --kill gpg-agent
Then make a Git commit to store the GPG key in the keychain.
This repository is provided as-is, without any warranties or guarantees. Always review scripts and playbooks before running them on your system, especially when they involve system-wide changes or require sudo access.