Git Product home page Git Product logo

mac-setup's Introduction

mac-setup

Intro

Scripts and notes for bootstrapping a new Mac with multiple accounts (I use separate accounts for work, personal, consulting, etc.).

Bootstrap

Start with a clean install of OSX and go through the installation wizard as usual (set iCloud ID, etc.) for one of your accounts. Then download the bootstrap script and execute it from the command line. This does the following:

  • installs the Xcode command-line tools (needed by just about everything else)
  • installs ansible
  • creates a 'brew' group and installs homebrew
  • adjusts permissions so any user added to the brew group will be able to manage homebrew (all users can use brew packages, just not install or update)
  • clones the repo and runs config.sh

Update config

Whenever you want to update, just run config.sh. It will pull the latest changes from Git and apply any new configuration to the current user. Each time it runs, it will prompt for the sudo password up front and your Ansible vault password (see Security section).

Creating users

Use the System Preferences - Users and Groups pane to create users as usual, then login as the new user and follow the wizard to configure iCloud, etc. Once completed, in a terminal do the following:

cd /Users/Shared/mac-setup ./config.sh

A default configuration will be used to configure the user, but this can be overridden by creating a new file in the /users folder named .yml. You can use one of my included user files as a template - copy it and rename it to your username and customize as needed. Refer to the documentation for each role for what variables are available for customization.

Documentation

Each of the roles has their own documentation, including which variables can be overridden

Security

I use 1Password already to manage passwords, so it made sense to use it as well to store API keys, SSH keys, software licenses, etc. Whenever the scripts require this information, they retrieve it from 1Password's cloud service using their command-line utility.

The 1Password parameters (Secret Key, Subdomain, Email, Master-Password) are stored in an encrypted Ansible vault. See the README for the 'onepass' role for info on how to set these parameters for your own 1Password account.

mac-setup's People

Contributors

mdhaney avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.