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.
- Downloads, installs, and configures Homebrew Formula command line software:
- asciinema
- Bash
- Bash Completion
- Bat
- Certbot
- chruby
- cloc
- Crystal
- CTags
- diff-so-fancy
- direnv
- duti
- Elm
- ExifTool
- fd
- FLAC
- FZF
- Git
- GPG
- Graphics Magick
- Graphviz
- Mecurial
- hr
- htop
- HTTPie
- Hyperfine
- Ioping
- jq
- lame
- lnav
- Lynis
- Mac App Store
- Mosh
- Namebench
- NCurses Disk Usage
- Nginx
- Network Grep
- Node.js
- Noti
- OpenSSL
- Overmind
- Pandoc
- Parallel
- Peco
- pgcli
- Pigz
- PostgreSQL
- Pretty Ping
- Pipe Viewer
- Ranger
- Readline
- Reattach to User Namespace
- Redis
- Ruby Install
- Rust
- SASSC
- ShellCheck
- Siege
- Sleepwatcher
- Tag
- Terraform
- The Silver Surfer
- Tig
- tmux
- Tree
- Vim
- Watch
- Yank
- Yarn
- Z
- Downloads, installs, and configures Homebrew Cask command line
software:
- Alfred
- App Cleaner
- Bartender
- Brave
- Carbon Copy Cloner
- Cardhop
- ClipGrab
- Dash
- Doxie
- Dropbox
- Firefox
- Google Chrome
- 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
- Signal
- 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
- Bear
- CCMenu
- Cocoa JSON Editor
- Contrast
- DaisyDisk
- Day One
- Fantastical
- GarageBand
- Gifox
- Gradient
- iMovie
- iPhoto
- Kaleidoscope
- Key Codes
- Keymou
- 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 8.0.0
Master Version (unstable):
git clone https://github.com/bkuhlmann/mac_os-config.git
cd mac_os-config
The following will walk you through the steps of installing/re-installing your machine.
Double check you have the following in place:
- A recent backup of your machine and a copy of your credentials to restore the backup.
- A copy of your of your Apple credentials.
See the macOS project for usage as it provides the command line interface for running the configuration defined by this project.
The following are additional steps, not easily automated, that are worth completing after the install scripts have been executed:
- 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:
- iStat Menus (double click, within the Applications folder, to install as a system preference).
- Hazel (double click, within the Applications folder, to install as a system preference).
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.
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.
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.