- Cyberduck
- Firefox
- Google Chrome
- iTerm2
- Little Snitch
- Microsoft Office
- Tunnelblick
- Visual Studio Code
- VLC
- Wireshark - temporarily removed new build required to fix issue requiring Rosetta 2 see here
It is best practice to start from a clean slate which include a clean wipe of the machine to ensure a clean/fresh install. Depending on your level of paranoia this would include wiping a brand new machine as well. Possibly the most important detail would be to turn on Filevault. You will only be prompted for this during the inital machine setup after you've entered you iCloud details otherwise after going through the intial setup prompts you can enable afterwards see here. Afterwards, perform the following to setup the machine:
-
Install Xcode or Xcode Tools (Homebrew Requirement). In atleast v4.2.4 or higher it appears the installer will automatically install Xcode Tools if required
xcode-select --install
-
Install Homebrew
Update
$PATH
in.bashrc
to include Homebrew binaries. Ensure Homebrew binaries come first as this will be important to ensure packages such aspython3
andpip3
use the Homebrew binaries for these over the built-in system versionsexport PATH=/opt/homebrew/bin:$PATH
then
source ~/.bashrc
-
Install Python3
brew install python3
-
Install Ansible
python3 -m pip install --user ansible
Update
$PATH
in.bashrc
as this is where the Ansible binaries are installedexport PATH=$PATH:~/Library/Python/3.11/bin
then
source ~/.bashrc
-
Create a directory to store repositories in and clone the repo
mkdir ~/Documents/Code cd ~/Documents/Code git clone https://github.com/johnsoga/MacOS.git cd MacOS
All applications listed above will be installed using the apps.yml
playbook
ansible-playbook -i ansible_hosts.txt apps.yml
Customizations on the docks animations & layout are done using the dock.yml
playbook
ansible-playbook -i ansible_hosts.txt dock.yml
In general trying to automate setting MacOS/OSX System Preferences is a bit of a hit-or-miss game filled with trial and error. While some options can be reliably set using the defaults
command, a popular example here, this can involve logging out or resetting the machine which is not desirable. Even more so there is not a 1-to-1 mapping of System Preferences to plist's to be updated via defaults
leaving some configurations that seemingly cannot be set that way. To me this leaves the better approach to be using the tools(however irritating they maybe) that Apple has provided, put simply Automator. I've created an Automator application that can be double-clicked to install that will go through and set various System Preferences namely:
- Look up & data detectors (Disable)
- Secondary click/Two-finger right-click (Enable)
- Tap to click (Enable)
- Scroll direction: Natural (Disable)
- App Expose (Enable)
- Battery Percentage in Menu Bar (Enable)
- Show Spotlight in Menu Bar (Disable)
- Require password immediately after sleep (Enable)
- Firewall: Turn on (Enable)
cd automator
unzip SystemPreferencesSetup.zip
open SystemPreferencesSetup.app
- Open Little Snitch to finish installation and activate
Personally I don't use it outside of my phone, navigate to: System Settings > Game Center > Sign Out