OS X environment provisioning using Ansible.
- Set name of Mac in
System Settings
->General
->About
- Activate universal control: https://support.apple.com/en-us/102459 or install Synergy
Open a "Terminal" of a fresh macOS installation and execute the following commands:
# Setup [Homebrew](http://brew.sh/)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install essentials formulaes
brew install ansible git zsh nvm jump thefuck zsh-autosuggestions rust rustup mas
# Install essential casks
brew install --cask iterm2 sourcetree spotify brave-browser visual-studio-code dropboxdrop 1password@7 karabiner-elements espanso rectangle
# Install OhMyZsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Install PowerLevel10k Theme
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# Initialize rust
rustup default stable
# Optional: configure Dropbox / 1Password / zsh
# Retrieve this project including its configuration
mkdir -p ~/git/private/OSX ~/Sync
cd ~/git/private/OSX
# Clone this project, making sure you have the GitHub SSH key configured properly following https://docs.github.com/de/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
git clone [email protected]:Maarc/ansiblOSX.git
cd ansiblOSX
# Edit the group_wars/*_vars.yml file to select the software you want to install
# Import the used roles
ansible-galaxy install -r roles/requirements.yml -p roles --force
# Install all used software and dependencies
ansible-playbook -K main.yml
# Seed the conf files (dot and espanso)
cd dotfiles/
./conf/update_conf_files.sh
This section helps you to update the lists of software to install (group_vars/*_var.yml) based on your current setup.
Dump all installed taps:
brew tap | sort | sed 's/^/ - /'
Dump all installed apps:
brew list | sort | sed 's/^/ - /'
Dump all installed casks:
brew cask list | sort | sed 's/^/ - /'
Dump all installed gems and their version:
gem list | tail -n+1 | sed 's/^/ - { name: /' |sed 's/ (/, version: /' | sed 's/)/, pre: false }/' | sed 's/ default: / /'
... or without version:
gem list | tail -n+1 | sed 's/^/ - { name: /' |sed 's/ (.*/ }/'
Update the field "pre" to "true" for "asciidoctor-pdf" and remove the duplicated versions.
Dump all installed applications from the app store and their unique id:
mas list |sort -k2 |rev |cut -f2- -d' ' |rev |sed 's/ /, name: "/1' |sed 's/^/ - { id: /' |sed 's/$/" }/'