Skip to content

Instantly share code, notes, and snippets.

@georgiyordanov
Forked from angelyordanov/osx_setup.md
Last active May 8, 2026 10:04
Show Gist options
  • Select an option

  • Save georgiyordanov/c205f161c74aa1316258af7bcac10821 to your computer and use it in GitHub Desktop.

Select an option

Save georgiyordanov/c205f161c74aa1316258af7bcac10821 to your computer and use it in GitHub Desktop.
Mac OS X setup

Setup Mac OS X

Setup

1. Before setup

Make sure everything is up to date. Wait for FileVault to finish encrypting the hard drive.

2. Install homebrew and other CLI tools

http://brew.sh/

# install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# add Homebrew to PATH:
echo >> ~/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv zsh)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv zsh)"

# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"

# Download and install Node.js:
nvm install 24

3. Install software

homebrew

brew install \
  git \
  vim \
  tmux \
  yt-dlp \
  container \
  sqlcmd

# macbook only
brew install mas # Mac App Store command line interface

homebrew-cask

brew install --cask \
  dropbox \
  microsoft-office \
  google-chrome \
  stolendata-mpv \
  transmission \
  the-unarchiver \
  daisydisk \
  sourcetree \
  visual-studio-code \
  docker-desktop \
  iterm2

# macbook only
brew install --cask \
  firefox \
  brave-browser \
  1password \
  tripmode \
  coconutbattery \
  microsoft-teams

App Store (macbook only)

mas install 1295203466 # Microsoft Remote Desktop
mas install 937984704 # Amphetamine

Manually install

  • dotnet

4. Borrow a few OSX settings from mathiasbynens dotfiles

###############################################################################
# General                                                                     #
###############################################################################

# Disable all automatic text corrections
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticTextCompletionEnabled -bool false

# Disable language indicator
defaults write kCFPreferencesAnyApplication TSMLanguageIndicatorEnabled -bool false

###############################################################################
# System preferences                                                          #
###############################################################################

# Move dock to left
defaults write com.apple.dock orientation left

# Trackpad: enable tap to click for this user and for the login screen
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1

# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0

# Use function keys
defaults write -g com.apple.keyboard.fnState -bool true

###############################################################################
# Finder                                                                      #
###############################################################################

# Finder: show hidden files by default
defaults write com.apple.finder AppleShowAllFiles -bool true

# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true

# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true

# Finder: allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true

# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

# Avoid creating .DS_Store files on network or USB volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true

# Use list view in all Finder windows by default
# Four-letter codes for the other view modes: `icnv`, `clmv`, `glyv`
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"

# Show the ~/Library folder
chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library

# Show the /Volumes folder
sudo chflags nohidden /Volumes

###############################################################################
# Address Book, Dashboard, iCal, TextEdit, and Disk Utility                   #
###############################################################################

# Use plain text mode for new TextEdit documents
defaults write com.apple.TextEdit RichText -int 0

# Open and save files as UTF-8 in TextEdit
defaults write com.apple.TextEdit PlainTextEncoding -int 4
defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4

source: https://github.com/mathiasbynens/dotfiles/blob/master/.macos

5. Create/Update ~/.gitconfig

git config --global user.name "Georgi Yordanov"
git config --global user.email georgi.yordanov@gmail.com
git config --global merge.conflictstyle diff3
git config --global alias.stashu 'stash -u'
git config --global rerere.enabled true
git maintenance start
git config --global maintenance.prefetch.enabled false
git config --global pull.ff only
git config --global fetch.prune true
git config --global init.defaultBranch main
git config --global diff.algorithm histogram

6. Setup tailscale as a daemon (Mac Mini only)

brew install --formula tailscale

sudo brew services stop tailscale

sudo tee /Library/LaunchDaemons/com.tailscale.tailscaled.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.tailscale.tailscaled</string>
  <key>ProgramArguments</key>
  <array>
    <string>/opt/homebrew/opt/tailscale/bin/tailscaled</string>
    <string>--port=41641</string>
  </array>
  <key>KeepAlive</key>
  <true/>
  <key>StandardOutPath</key>
  <string>/opt/homebrew/var/log/tailscaled.log</string>
  <key>StandardErrorPath</key>
  <string>/opt/homebrew/var/log/tailscaled.log</string>
</dict>
</plist>
EOF

sudo launchctl load /Library/LaunchDaemons/com.tailscale.tailscaled.plist

sudo tailscale up

sudo tailscale status

sudo tailscale set --advertise-routes=10.0.0.0/8,192.168.20.0/24
@georgiyordanov
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment