Skip to content

Instantly share code, notes, and snippets.

@victorouse
Last active November 4, 2019 00:17
Show Gist options
  • Select an option

  • Save victorouse/95a6b365b0068c1191da71e01fef4b4e to your computer and use it in GitHub Desktop.

Select an option

Save victorouse/95a6b365b0068c1191da71e01fef4b4e to your computer and use it in GitHub Desktop.
So Fresh So Clean So Mac (Munki).md

Prerequisites

XCode Command Line Tools

Autopkg repositories

Name
https://github.com/autopkg/recipes.git
https://github.com/autopkg/keeleysam-recipes.git
https://github.com/autopkg/hansen-m-recipes.git
https://github.com/autopkg/scriptingosx-recipes.git
https://github.com/autopkg/timsutton-recipes.git
https://github.com/autopkg/jleggat-recipes.git
https://github.com/jarias/autopkg-munki-recipes.git
https://github.com/autopkg/sheagcraig-recipes.git
https://github.com/autopkg/hjuutilainen-recipes.git
https://github.com/autopkg/homebysix-recipes.git
https://github.com/facebook/Recipes-for-AutoPkg.git
https://github.com/jessepeterson/autopkg-recipes.git
https://github.com/autopkg/nmcspadden-recipes.git

Editors

Name Source
Sublime Text 3 SublimeText3.munki.recipe
PyCharm PyCharm.munki.recipe
IntelliJ IDEA IntelliJ-CE.munki.recipe

Languages

Name Source
Python 3 Python3.munki.recipe
Java 8 JDK OracleJava8JDK.munki.recipe
Go Go.munki.recipe
Node (via n) `https://git.io/n-install

Development

Name Source
Git Git.munki.recipe
iTerm 2 iTerm2.munki.recipe
Zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"; chsh -s /bin/zsh
Oh my zsh `curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh
Homebrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Virtualbox VirtualBox.munki.recipe
Vagrant Vagrant.munki.recipe (requires HashiCorpURLProvider.py)
Docker Toolbox DockerToolbox.munki.recipe

Graphics

Name Source
Adobe Photoshop CC 2017 Direct
Adobe Illustrator CC 2017 Direct
Sketch Sketch.munki.recipe

Misc

Name Source
Transmission Transmission.munki.recipe
Flux Flux.munki.recipe
Caffiene Caffeine.munki.recipe
VLC VLC.munki.recipe
BetterTouchTool BetterTouchTool.munki.recipe
UnRarX UnRarX.munki.recipe
Adobe Flash Player AdobeFlashPlayer.munki.recipe
Chrome GoogleChrome.munki.recipe
Java 8 JRE OracleJava8.munki.recipe

Tweaks

Name Source
Disable press-and-hold defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
Increase key repeat rate defaults write NSGlobalDomain KeyRepeat -int 1
Reverse trackpad scroll defaults write -g com.apple.swipescrolldirection -bool false
Move dock to left defaults write com.apple.dock orientation left; killall Dock
Use scale minimize effect defaults write com.apple.dock mineffect -string scale; killall Dock
Auto hide/show dock defaults write com.apple.dock autohide -bool true; killall Dock
Lower auto hide/show dock defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -float 0.2; killall Dock
Show battery percentage defaults write com.apple.menuextra.battery ShowPercent -bool true
Disable mouse acceleraton defaults write .GlobalPreferences com.apple.mouse.scaling -1
@victorouse
Copy link
Author

victorouse commented Dec 3, 2016

Script installs

Zsh + Oh-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"; chsh -s /bin/zsh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh

Node (via n)

https://git.io/n-install | bash

Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Mac tweaking

defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write -g com.apple.swipescrolldirection -bool false
defaults write com.apple.dock orientation left; killall Dock
defaults write com.apple.dock mineffect -string scale; killall Dock
defaults write com.apple.dock autohide -bool true; killall Dock
defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -float 0.2; killall Dock
defaults write com.apple.menuextra.battery ShowPercent -bool true
defaults write .GlobalPreferences com.apple.mouse.scaling -1

Set computer name

sudo scutil --set ComputerName "newname"
sudo scutil --set LocalHostName "newname"
sudo scutil --set HostName "newname" 

@victorouse
Copy link
Author

victorouse commented Dec 3, 2016

Set Munki repo URL (server)

defaults write com.github.autopkg MUNKI_REPO /Library/Server/Web/Data/Sites/Default/munki_repo

Create developer manifest (server)

/Library/Server/Web/Data/Sites/Default/munki_repo/manifests/developer contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>

Configure Munkiimport (server)

$ munkiimport --configure
Path to munki repo (example: /Volumes/repo): /Library/Server/Web/Data/Sites/Default/munki_repo
Repo fileshare URL (example: afp://munki.example.com/repo): 
pkginfo extension (Example: .plist): .plist
pkginfo editor (examples: /usr/bin/vi or TextMate.app; leave empty to not open an editor after import): /usr/bin/vi
Default catalog to use (example: testing): developer

Set munki SoftwareRepoURL and ClientIdentifier (client)

sudo defaults write /Library/Preferences/ManagedInstalls SoftwareRepoURL "http://[ip-address-of-host]/munki_repo"
sudo defaults write /Library/Preferences/ManagedInstalls ClientIdentifier "developer"

Autopkg repositories

autopkg repo-add https://github.com/autopkg/recipes.git
autopkg repo-add https://github.com/autopkg/keeleysam-recipes.git
autopkg repo-add https://github.com/autopkg/hansen-m-recipes.git
autopkg repo-add https://github.com/jarias/autopkg-munki-recipes
autopkg repo-add https://github.com/autopkg/scriptingosx-recipes.git
autopkg repo-add https://github.com/autopkg/timsutton-recipes.git
autopkg repo-add https://github.com/autopkg/jleggat-recipes.git
autopkg repo-add https://github.com/autopkg/sheagcraig-recipes.git
autopkg repo-add https://github.com/autopkg/hjuutilainen-recipes.git
autopkg repo-add https://github.com/autopkg/homebysix-recipes.git
autopkg repo-add https://github.com/autopkg/foigus-recipes.git
autopkg repo-add https://github.com/jessepeterson/autopkg-recipes.git
autopkg repo-add https://github.com/facebook/Recipes-for-AutoPkg.git

Additional processors

curl https://raw.githubusercontent.com/autopkg/hjuutilainen-recipes/master/HashiCorp/HashiCorpURLProvider.py > HashiCorpURLProvider.py

Run Autopkg recipes

autopkg run -v SublimeText3.munki.recipe
autopkg run -v PyCharm.munki.recipe
autopkg run -v IntelliJ-CE.munki.recipe
autopkg run -v Python3.munki.recipe
autopkg run -v OracleJava8JDK.munki.recipe
autopkg run -v OracleJava8.munki.recipe
autopkg run -v Go.munki.recipe
autopkg run -v iTerm2.munki.recipe
autopkg run -v VirtualBox.munki.recipe
autopkg run -v Vagrant.munki.recipe
autopkg run -v DockerToolbox.munki.recipe
autopkg run -v Sketch.munki.recipe
autopkg run -v Transmission.munki.recipe
autopkg run -v Flux.munki.recipe
autopkg run -v Intellij.munki.recipe
autopkg run -v Caffeine.munki.recipe
autopkg run -v VLC.munki.recipe
autopkg run -v BetterTouchTool.munki.recipe
autopkg run -v UnRarX.munki.recipe
autopkg run -v AdobeFlashPlayer.munki.recipe
autopkg run -v GoogleChrome.munki.recipe
autopkg run -v Python3.munki.recipe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment