Last active
February 12, 2021 07:05
-
-
Save chrisguest75/f00b41223ede85a9525f927323cf0ef5 to your computer and use it in GitHub Desktop.
Configure a new Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # Bootstrap script for setting up a new OSX machine | |
| # | |
| # This should be idempotent so it can be run multiple times. | |
| # | |
| # Notes: | |
| # | |
| # - If installing full Xcode, it's better to install that first from the app | |
| # store before running the bootstrap script. Otherwise, Homebrew can't access | |
| # the Xcode libraries as the agreement hasn't been accepted yet. | |
| # | |
| # BasedOn: https://gist.github.com/codeinthehole/26b37efa67041e1307db | |
| # | |
| # missing | |
| # oh-my-zsh | |
| # font-hack-nerd-font | |
| # discord | |
| # sketchbook | |
| # o365 | |
| # ms remote desktop | |
| # vault | |
| # kuttl-cli | |
| # youtube-dl | |
| # gomplate | |
| # terraform_landscape | |
| # onedrive | |
| echo "Starting bootstrapping" | |
| # Check for Homebrew, install if we don't have it | |
| if test ! $(which brew); then | |
| echo "Installing homebrew..." | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| fi | |
| # Update homebrew recipes | |
| brew update | |
| # Install GNU core utilities (those that come with OS X are outdated) | |
| # brew tap homebrew/dupes | |
| # brew install coreutils | |
| # brew install gnu-sed --with-default-names | |
| # brew install gnu-tar --with-default-names | |
| # brew install gnu-indent --with-default-names | |
| # brew install gnu-which --with-default-names | |
| # brew install gnu-grep --with-default-names | |
| # Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed | |
| # brew install findutils | |
| # Install Bash 4 | |
| # brew install bash | |
| PACKAGES=( | |
| tmux | |
| tmuxinator | |
| bash | |
| shellcheck | |
| bats-core | |
| zsh | |
| git | |
| gh | |
| git-extras | |
| imagemagick | |
| jq | |
| yq | |
| ssh-copy-id | |
| watch | |
| wget | |
| curl | |
| dive | |
| container-diff | |
| container-structure-test | |
| awscli | |
| aws-okta | |
| tfenv | |
| terraform-docs | |
| checkov | |
| kubectx | |
| skaffold | |
| kubernetes-cli | |
| kind | |
| pyenv | |
| pipenv | |
| nvm | |
| circleci | |
| nmap | |
| ) | |
| echo "Installing packages..." | |
| brew install ${PACKAGES[@]} | |
| echo "Cleaning up..." | |
| brew cleanup | |
| echo "Installing cask..." | |
| #brew install caskroom/cask/brew-cask | |
| CASKS=( | |
| 1password | |
| keepassx | |
| keybase | |
| homebrew/cask/docker | |
| google-chrome | |
| iterm2 | |
| spectacle | |
| vagrant | |
| virtualbox | |
| virtualbox-extension-pack | |
| vlc | |
| hex-fiend | |
| slack | |
| spotify | |
| pritunl | |
| visual-studio-code | |
| ) | |
| echo "Installing cask apps..." | |
| brew install ${CASKS[@]} | |
| echo "Installing fonts..." | |
| #brew tap caskroom/fonts | |
| #FONTS=( | |
| # font-inconsolidata | |
| # font-roboto | |
| # font-clear-sans | |
| #) | |
| #brew cask install ${FONTS[@]} | |
| echo "Configuring OSX..." | |
| # Set fast key repeat rate | |
| # defaults write NSGlobalDomain KeyRepeat -int 0 | |
| # Require password as soon as screensaver or sleep mode starts | |
| # defaults write com.apple.screensaver askForPassword -int 1 | |
| # defaults write com.apple.screensaver askForPasswordDelay -int 0 | |
| # Show filename extensions by default | |
| #defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
| # Enable tap-to-click | |
| # defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true | |
| # defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 | |
| # Disable "natural" scroll | |
| # defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false | |
| echo "Creating folder structure..." | |
| [[ ! -d ~/Code ]] && mkdir ~/Code | |
| echo "Bootstrapping complete" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment