Skip to content

Instantly share code, notes, and snippets.

@nathansgreen
Last active February 26, 2024 15:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathansgreen/62be25d6edbecf587cec6d6da185423c to your computer and use it in GitHub Desktop.
Save nathansgreen/62be25d6edbecf587cec6d6da185423c to your computer and use it in GitHub Desktop.
Initial setup for a new MacOS install
#!/usr/bin/env sh
# stuff to do when setting up a fresh install of MacOS
set -o errexit -o nounset -o noclobber
[ -e /etc/pam.d/sudo_local ] || \
echo 'auth sufficient pam_tid.so' \
| sudo tee /etc/pam.d/sudo_local
softwareupdate --install-rosetta --agree-to-license
command -v brew >/dev/null || \
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" \
&& (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/ngreen/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
brew install --cask maccy
open -a /Applications/Maccy.app
brew install --cask google-drive
open -a "/Applications/Google Drive.app"
if [ ! -e ~/.ssh/github_id ]; then
ssh-keygen -t ed25519 -C "$USER@${domain:-$HOST}" -f ~/.ssh/github_id
ssh-add ~/.ssh/github_id
[ -e ~/.ssh/config ] || cat >~/.ssh/config <<EOF
Host github.com
User git
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/github_id
ForwardAgent yes
EOF
fi
brew install --cask stats
open -a /Applications/Stats.app
brew install qemu tor w3m
brew install --cask discord signal skype slack
brew install --cask vscodium warp
brew install --cask keepassxc tor-browser
brew install --cask packer terraform utm vagrant # virtualbox
brew install tcpdump; brew install --cask wireshark
brew install coreutils gnu-getopt gnu-tar gnu-sed gnu-time
brew install curl-openssl dash jq shellcheck shfmt socat tcpdump wget yq
brew install just
brew install --cask jetbrains-toolbox
open -a "/Applications/JetBrains Toolbox.app"
mkdir -p ~/Documents/Develop
(cd ~/Documents/Develop \
&& git clone https://github.com/heroicode/project-generator \
&& [ -e ~/bin/generate-project ] || \
ln -s $PWD/project-generator/generate-project.sh ~/bin/generate-project)
[ -e ~/.docker/cli-plugins ] || \
brew install docker docker-compose \
&& mkdir -p ~/.docker/cli-plugins \
&& ln -sfn /opt/homebrew/opt/docker-compose/bin/docker-compose \
~/.docker/cli-plugins/docker-compose
brew tap homebrew/cask-fonts
brew install --cask font-cascadia-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment