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
- chruby
- cloc
- Colorized Cat
- CTags
- diff-so-fancy
- direnv
- ExifTool
- Elasticsearch
- Elm
- FFmpeg
- FLAC
- FZF
- GDBM
- Gifsicle
- Git
- GPG
- GPG Agent
- Graphviz
- Heroku CLI
- hr
- htop
- HTTPie
- ImageMagick
- Ioping
- jq
- libffi
- libyaml
- lnav
- Lynis
- mas
- Memcached
- Mecurial
- Mosh
- Namebench
- Network Grep
- Nginx
- Node.js
- Overmind
- Pandoc
- Parallel
- Peco
- pgcli
- Pigz
- Pipe Viewer
- PostgreSQL
- Ranger
- Redis
- ruby-install
- Rust
- ShellCheck
- Tag
- Terminal Notifier
- The Silver Surfer
- Tig
- tmux
- Reattach to User Namespace
- Tree
- Vim
- Watchman
- 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
- HandBrake
- HandBrake CLI
- Hazel
- ImageOptim
- iStat Menus
- iTerm2
- Kap
- Keybase
- ksdiff
- Launch Control
- Marp
- Micro Snitch
- Muzzle
- Ngrok
- Numi
- OpenEmu
- OpenOffice
- Opera
- Path Finder
- Paw
- pgAdmin
- PSequel
- QLStephen
- RescueTime
- Signal
- Spotify
- Sublime Text 3
- Tor Browser
- Trailer
- Transmit
- Viscosity
- Visual Studio Code
- VLC
- Zoom
- Downloads, installs, and configures
App Store applications.
- 1Password
- Acorn
- AquaPath
- CCMenu
- Cocoa JSON Editor
- DaisyDisk
- Day One
- Fantastical
- GarageBand
- Gif Brewery
- Gradient
- iMovie
- iPhoto
- Kaleidoscope
- Key Codes
- Keymo
- Keynote
- Kindle
- Leech
- Marked 2
- Medis
- MoneyWell
- Moom
- Name Mangler
- Numbers
- OmniFocus
- OmniOutliner
- Pages
- Patterns
- PDFpenPro
- Pixelmator
- Prepo
- 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:
- Sublime Text 3 Advanced New File
- Sublime Text 3 Alignment
- Sublime Text 3 Apply Syntax
- Sublime Text 3 AutoFileName
- Sublime Text 3 Autoprefixer
- Sublime Text 3 Bracket Highlighter
- Sublime Text 3 Change Quotes
- Sublime Text 3 Color Highlighter
- Sublime Text 3 CSScomb
- Sublime Text 3 CTags
- Sublime Text 3 DashDoc
- Sublime Text 3 Easy Motion
- Sublime Text 3 Elm
- Sublime Text 3 Emmet
- Sublime Text 3 Emmet LiveStyle
- Sublime Text 3 Gist
- Sublime Text 3 Git Gutter
- Sublime Text 3 Gutter Color
- Sublime Text 3 HTML Prettify
- Sublime Text 3 JSCS Formatter
- Sublime Text 3 JSCS Linter
- Sublime Text 3 Keymaps
- Sublime Text 3 Sublime Linter
- Sublime Text 3 Local History
- Sublime Text 3 Markdown Extended
- Sublime Text 3 Move Tab
- Sublime Text 3 Reek Linter
- Sublime Text 3 Rubocop
- Sublime Text 3 Ruby Extract Method
- Sublime Text 3 Ruby Slim
- Sublime Text 3 SCSS
- Sublime Text 3 SCSS Lint
- Sublime Text 3 Shellcheck
- Sublime Text 3 Sidebar Enhancements
- Sublime Text 3 Table Editor
- Sublime Text 3 Trailing Spaces
- Sublime Text 3 Web Inspector
- Sublime Text 3 Wrap+
- Vim Blockle
- Vim Bundler
- Vim Commentary
- Vim Fugitive
- Vim Git Gutter
- Vim Pathogen
- Vim Rails
- Vim Ruby
- Vim Splitjoin
- Vim Text Object User
- Vim Text Object Ruby Block
- Vim Unimpaired
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 v5.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 Cheat Sheet, Dash, Dropbox, Trailer, 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 (c) 2016 Alchemists. Read LICENSE for details.
Read CHANGES for details. Built with Bashsmith.
Developed by Brooke Kuhlmann at Alchemists.