/dotfiles

macos dotfiles

Primary LanguageShellMIT LicenseMIT

dotfiles

lint

Introduction

A collection of scripts to bootstrap a clean install of macOS.

Installation

  1. Perform a Software Update.

  2. Install xcode command line tools:

    xcode-select --install
  3. If this is an Apple silicon machine, install Rosetta:

    softwareupdate --install-rosetta --agree-to-license
  4. Clone this repository by running the following command:

    mkdir ~/Projects
    git clone https://github.com/craighurley/dotfiles.git ~/Projects/dotfiles

    Note: after you setup your SSH keys, consider updating the origin to git@github.com:craighurley/dotfiles.git.

  5. Install homebrew by running the following command:

    ~/Projects/dotfiles/.brew_install
  6. Run the following command to do everything.

    ~/Projects/dotfiles/bootstrap.sh

    Notes:

    • you will be prompted for your password a number of times during script execution.

    Essentially, bootstrap.sh executes the following commands:

    # Create useful directories.
    ~/Projects/dotfiles/.directories
    
    # Copy templates to ~. These files don't really belong in version control, hence they are not symlinked.
    ~/Projects/dotfiles/.templates
    
    # Configure sensible defaults in macOS.
    ~/Projects/dotfiles/.macos
    
    # Install command line package manager and additional command line tools.
    ~/Projects/dotfiles/.brew
    
    # Install command line package manager and additional applications.
    ~/Projects/dotfiles/.cask
    
    # Open Firefox now, to generate the default profile.
    
    # Backup existing dotfiles and symlink to the dotfiles in this project.
    ~/Projects/dotfiles/.dotfiles
    
    # Apply preferences to applications.
    ~/Projects/dotfiles/.preferences
  7. Restart your computer.

  8. If you want to automatically install applications from the App Store, open the App Store and sign in, then run the following command:

    ~/Projects/dotfiles/.mas

Post Install Tasks

  1. Import Terminal config.
  2. Import iTerm config.
  3. Import ssh keys.
  4. Update details:
    • ~/.ssh/config.
    • ~/.ssh/authorized_keys.
    • ~/.gitconfig.custom and any additional custom configurations.
    • ~/.extra.
    • ~/.pypirc.
    • ~/.aws/config.
    • ~/.aws/credentials.
    • ~/.saml2aws.
  5. Sign into Firefox account to sync settings.
  6. Sign into Chrome account to sync settings.
  7. Sign into GitHub in VS Code to sync settings.
  8. Run docker, configure settings and import containers.
  9. Download/install binary apps:

Update

Run the following commands to get the latest version of this project:

cd ~/Projects/dotfiles/
git pull origin master

Feedback

Suggestions/improvements welcome!