Shell scripts for customized macOS machine setup and configuration.
This project provides a highly opinionated default configuration built upon the macOS project. Should the configuration provided by this project not be to your liking, feel free to fork and customize for your specific needs.
- Features
- Requirements
- Setup
- Usage
- Additional Software
- Versioning
- Code of Conduct
- Contributions
- License
- History
- Credits
- Downloads, installs, and configures Homebrew Formula command line software:
- Readline
- OpenSSL
- asciinema
- Bash
- Bash Completion
- Certbot
- chruby
- cloc
- Colorized Cat
- Crystal
- CTags
- diff-so-fancy
- direnv
- duti
- ExifTool
- Elasticsearch
- Elm
- FLAC
- FZF
- Git
- GPG
- GPG Agent
- Graphics Magick
- Graphviz
- Heroku CLI
- hr
- HTTPie
- Ioping
- jq
- lnav
- Lynis
- mas
- Mecurial
- Mosh
- Namebench
- Network Grep
- Nginx
- Node.js
- Overmind
- Pandoc
- Parallel
- Peco
- pgcli
- Pigz
- Pipe Viewer
- PostgreSQL
- Ranger
- Redis
- ruby-install
- Rust
- SASSC
- ShellCheck
- Siege
- Sleepwatcher
- Tag
- The Silver Surfer
- Tig
- tmux
- Reattach to User Namespace
- Tree
- Vim
- Watch
- Yank
- Yarn
- YouTube Download
- Z
- Downloads, installs, and configures Homebrew Cask command line
software:
- Alfred
- App Cleaner
- Bartender
- Carbon Copy Cloner
- Cardhop
- ClipGrab
- Dash
- DNS Crypt
- Doxie
- Dropbox
- Encrypt Me
- Firefox
- Google Chrome
- GPG Suite
- HandBrake
- HandBrake CLI
- Hazel
- ImageOptim
- iStat Menus
- iTerm2
- Keybase
- ksdiff
- Launch Control
- Marp
- Micro Snitch
- Muzzle
- Ngrok
- Numi
- OpenEmu
- OpenOffice
- Path Finder
- Paw
- pgAdmin
- PSequel
- QLStephen
- Signal
- Skitch
- Spotify
- Sublime Text 3
- Tor Browser
- Trailer
- Transmit
- Viscosity
- Visual Studio Code
- VLC
- Witch
- Zoom
- Downloads, installs, and configures
App Store applications.
- 1Password
- Acorn
- AquaPath
- CCMenu
- Cocoa JSON Editor
- Contrast
- DaisyDisk
- Day One
- Fantastical
- GarageBand
- Gifox
- Gradient
- iMovie
- iPhoto
- Kaleidoscope
- Key Codes
- Keymo
- Keynote
- Kindle
- Leech
- Marked 2
- Medis
- MoneyWell
- Moom
- Name Mangler
- Numbers
- OmniFocus
- OmniOutliner
- Pages
- Patterns
- PDFpenPro
- Pixelmator
- Shush
- Slack
- Sip
- Tweetbot
- WiFi Explorer
- Witch
- xScope
- Downloads, installs, and configures software applications not supported via Homebrew or the App Store:
- Downloads, installs, and configures software extensions:
Open a terminal window and execute one of the following setup sequences depending on your version preference:
Current Version (stable):
git clone https://github.com/bkuhlmann/mac_os-config.git
cd mac_os-config
git checkout 7.0.0
Master Version (unstable):
git clone https://github.com/bkuhlmann/mac_os-config.git
cd mac_os-config
See the macOS project for usage as it provides the command line interface to the configuration defined by this project.
While this project's configuration is opinionated and tailored for my setup, you can easily fork
this project and customize it for your environment. Start by editing the files found in the bin
and lib
directories. Here is a breakdown of each:
bin/apply_basic_settings
: Applies basic and initial settings for setting up a machine.bin/apply_default_settings
: Applies useful system and application defaults.bin/install_app_store
: Installs macOS, GUI-based, App Store applications.bin/install_applications
: Installs macOS, GUI-based, non-App Store applications.bin/install_extensions
: Installs macOS application extensions and add-ons.bin/install_homebrew_casks
: Installs Homebrew Casks.bin/install_homebrew_formulas
: Installs Homebrew Formulas.bin/restore_backup
: Restores system/application settings from backup image.bin/setup_software
: Configures and launches (if necessary) installed software.lib/settings.sh
: Defines custom settings for software applications, extensions, etc.
TIP: The installer determines which applications/extensions to install as defined in the
settings.sh
script. Applications defined with the "APP_NAME" suffix and extensions defined with
the "EXTENSION_PATH" suffix inform the installer what to care about. Removing/commenting out these
applications/extensions within the settings.sh
file will cause the installer to skip these
applications/extensions.
Native to macOS, newsyslog can be used to
configure system-wide log rotation across multiple projects. It's a good recommendation to set this
up so that disk space is carefully maintained. Here's how to configure it for your system, start by
creating a configuration for your projects in the /etc/newsyslog.d
directory. In my case, I use
the following configurations:
-
/etc/newsyslog.d/alchemists.conf
# logfilename [owner:group] mode count size when flags /Users/bkuhlmann/Dropbox/Development/Work/**/log/*.log 644 2 5120 * GJN
-
/etc/newsyslog.d/homebrew.conf
# logfilename [owner:group] mode count size when flags /usr/local/var/log/**/*.log 644 2 5120 * GJN
These configurations ensure that logs are rotated every 5MB (5120KB). In order to test that these configurations are valid, run:
sudo newsyslog -nvv
If you don't see any errors in the output, then your configuration settings are correct.
The last thing to do is to add a launch configuration to ensure the log rotations happen at
regularly scheduled intervals. To do this create the following file:
$HOME/Library/LaunchAgents/com.apple.newsyslog.plist
. It should have the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.apple.newsyslog</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/newsyslog</string>
</array>
<key>LowPriorityIO</key>
<true/>
<key>Nice</key>
<integer>1</integer>
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>30</integer>
</dict>
</dict>
</plist>
That's it. System-wide log rotation is setup for your projects.
The following are additional steps, not easily automated, that are worth completing after the install scripts have been executed:
- Configure System Preferences:
- Security & Privacy:
- General:
- Require password immediately after sleep or screen saver begins.
- Enable message when screen is locked. Example:
<twitter> | <email> | <phone> | <url>
. - Allow your Apple Watch to unlock your Mac.
- FileVault:
- Enable FileVault and save the recovery key in a secure location (i.e. 1Password).
- Firewall:
- Enabled it.
- Automatically allow signed software.
- Enable stealth mode.
- Privacy:
- Apps like Dash, Dropbox, etc. will need to be enabled for accessibility.
- General:
- Notifications:
- Enable Do Not Disturb from 9pm to 7am.
- Enable When display is sleeping.
- Enable When mirroring.
- Enable allow repeated calls.
- Disable Show notifications on lock screen for all apps.
- Disable Play sounds for notifications for all apps.
- Configure all calendar apps to show banners instead of alerts for notifications.
- Printers & Scanners:
- Add printer/scanner.
- iCloud:
- Enable Find My Mac.
- Internet Accounts:
- Add all accounts used by Mail.
- Network:
- Configure Wi-Fi.
- Users & Groups:
- Update avatar.
- Remove unused login items.
- Disable guest account.
- Security & Privacy:
Read Semantic Versioning for details. Briefly, it means:
- Major (X.y.z) - Incremented for any backwards incompatible public API changes.
- Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
- Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
Please note that this project is released with a CODE OF CONDUCT. By participating in this project you agree to abide by its terms.
Read CONTRIBUTING for details.
Copyright 2016 Alchemists. Read LICENSE for details.
Read CHANGES for details. Built with Bashsmith.
Developed by Brooke Kuhlmann at Alchemists.