Skip to content

Scripts to automate the installation and setup of a new Mac, so I don't have to waste time

License

Notifications You must be signed in to change notification settings

citypaul/mac-dev-machine-setup

Repository files navigation

Mac Dev Machine Setup

This repository contains Ansible playbooks and scripts to automatically set up a new Mac for development. It installs and configures various tools and applications, saving time and effort when setting up a new machine.

Prerequisites

  • A Mac running macOS (tested on macOS 15.0 arm64)
  • Internet connection

Installation

  1. Clone this repository:

    git clone https://github.com/your-username/mac-dev-setup.git
    cd mac-dev-setup
    
  2. Choose the appropriate installation script:

    • For personal setup: ./install-personal.sh
    • For work setup: ./install-work.sh

    These scripts will:

    • Run setup.sh to install or update Homebrew, Python, and Ansible
    • Execute the appropriate Ansible playbook with the necessary tags
  3. To install private keys (optional):

    ./install-keys.sh
    

    This script uses Ansible Vault to decrypt and install private keys.

Configuration

  • The defaults.yaml file contains default settings and package lists.
  • The local.yaml file is the main Ansible playbook that imports various tasks.
  • The vars/api_keys.yml file contains encrypted API keys. For more information, see API Keys Documentation.

Post-Installation Steps

  1. Set up the iTerm2 theme:

    • Open iTerm2 -> Preferences -> Profiles
    • Select "Mac Dev Environment" profile
    • Click "Other Actions" and select "Set as Default"

    iterm theme instructions

  2. Set up GPG for Git: After running the installation script, manually run:

    gpgconf --kill gpg-agent
    

    Then make a Git commit. This will store the GPG key in the keychain.

Screenshots

Alacritty Terminal with Zellij

alacritty theme

iTerm2 Theme

iterm theme

Tmux Theme

tmux theme

Troubleshooting

  • If you encounter issues with Python or pip, try the following steps:

    1. Ensure you have the latest version of Homebrew:

      brew update && brew upgrade
    2. Reinstall Python using Homebrew:

      brew reinstall python
    3. Restart your terminal or source your .zshrc:

      source ~/.zshrc
  • If Homebrew is installed but not recognized, restart your terminal and run the script again.

  • If certain tools are not recognized after installation, try sourcing your .zshrc file:

    source ~/.zshrc
  • In some cases, you may need to run the installation script multiple times to ensure all components are properly installed and configured.

  • If you encounter permission issues, ensure you have the necessary rights to install software on your system.

Additional Resources

Contributing

This is a personal project for my own setup, but if you find any issues or have suggestions, please feel free to open an issue or submit a pull request.

License

[Include your license information here]

About

Scripts to automate the installation and setup of a new Mac, so I don't have to waste time

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages