Skip to content

Instantly share code, notes, and snippets.

@emilisto
Created March 22, 2013 15:59
Show Gist options
  • Save emilisto/5222425 to your computer and use it in GitHub Desktop.
Save emilisto/5222425 to your computer and use it in GitHub Desktop.
class people::emilisto {
#include osx::chsh
include macvim
include firefox
include chrome
include slate
# Skype is Broken!
# include skype
include transmission
include virtualbox
include iterm2::dev
include dropbox
include vagrant
include zsh
include vlc
# Needs license?
# include things
include spotify
include onepassword
include python
include dockutil
$home = "/Users/${::luser}"
$my = "${home}/my"
$dotfiles = "${my}/dotfiles"
# Configuration Setup
$env = {
directories => {
# FIXME: why is my username hard coded here? Should be possible to use {::luser}
home => "/Users/${::luser}",
dotfiles => "/Users/${::luser}/.dotfiles"
},
dotfiles => [
'shell',
'gitconfig',
# FIXME: add custom janus deps here
#'janus/jellybeans',
#'janus/vim-rails',
'vimrc.after',
'vimrc.before',
'gvimrc.after',
'gvimrc.before',
'zshrc',
'slate',
'ackrc',
],
packages => {
brew => [
'wget',
'gpg2',
'tmux'
]
}
}
# OSX Defaults
# Taken from https://gist.github.com/jfryman/4963514
boxen::osx_defaults { 'Disable Dashboard':
key => 'mcx-disabled',
domain => 'com.apple.dashboard',
value => 'YES',
user => "${::luser}",
}
boxen::osx_defaults { 'Disable reopen windows when logging back in':
key => 'TALLogoutSavesState',
domain => 'com.apple.loginwindow',
value => 'false',
user => "${::luser}",
}
boxen::osx_defaults { 'Disable press-and-hold character picker':
key => 'ApplePressAndHoldEnabled',
domain => 'NSGlobalDomain',
value => 'false',
user => "${::luser}",
}
boxen::osx_defaults { 'Display full POSIX path as Finder Window':
key => '_FXShowPosixPathInTitle',
domain => 'com.apple.finder',
value => 'true',
user => "${::luser}",
}
boxen::osx_defaults { 'Secure Empty Trash':
key => 'EmptyTrashSecurely',
domain => 'com.apple.finder',
value => 'true',
user => "${::luser}",
}
boxen::osx_defaults { 'Always use current directory in default search':
key => 'FXDefaultSearchScope',
domain => 'com.apple.finder',
value => 'SCcf',
user => "${::luser}",
}
boxen::osx_defaults { 'Do not create .DS_Store':
key => 'DSDontWriteNetworkStores',
domain => 'com.apple.dashboard',
value => 'true',
user => "${::luser}",
}
boxen::osx_defaults { 'Disable the "Are you sure you want to open this application?" dialog':
key => 'LSQuarantine',
domain => 'com.apple.LaunchServices',
value => 'true',
user => "${::luser}",
}
boxen::osx_defaults { 'key repeat rate':
domain => 'NSGlobalDomain',
key => 'KeyRepeat',
value => '0',
user => "${::luser}",
}
boxen::osx_defaults { 'initial key repeat delay':
domain => 'NSGlobalDomain',
key => 'InitialKeyRepeat',
value => '0',
user => "${::luser}",
}
boxen::osx_defaults { 'Expand save panel by default':
key => 'NSNavPanelExpandedStateForSaveMode',
domain => 'NSGlobalDomain',
value => 'true',
user => "${::luser}",
}
boxen::osx_defaults { 'Expand print panel by default':
key => 'PMPrintingExpandedStateForPrint',
domain => 'NSGlobalDomain',
value => 'true',
user => "${::luser}",
}
boxen::osx_defaults { 'Minimize on Double-Click':
key => 'AppleMiniaturizeOnDoubleClick',
domain => 'NSGlobalDomain',
value => 'true',
user => "${::luser}",
}
boxen::osx_defaults { 'Put my Dock on the left':
key => 'orientation',
domain => 'com.apple.dock',
value => 'left',
user => "${::luser}",
}
boxen::osx_defaults { 'Make function keys do real things, and not apple things':
key => 'com.apple.keyboard.fnState',
domain => 'NSGlobalDomain',
value => 'true',
user => "${::luser}",
}
boxen::osx_defaults { 'Always open Finder windows in list view mode':
key => 'FXPreferredViewStyle',
domain => 'com.apple.finder',
value => 'Nlsv',
user => "${::luser}",
}
boxen::osx_defaults { 'Disable the warning before emptying the Trash':
key => 'WarnOnEmptyTrash',
domain => 'com.apple.finder',
value => 'false',
user => "${::luser}",
}
# Dockutil
dockutil::item { 'Remove Photo Booth':
label => 'Photo Booth',
item => 'Photo Booth',
action => 'remove',
}
dockutil::item { 'Remove Mission Control':
label => 'Mission Control',
item => 'Mission Control',
action => 'remove',
}
dockutil::item { 'Remove Launchpad':
label => 'Launchpad',
item => 'Launchpad',
action => 'remove',
}
dockutil::item { 'Remove Safari':
label => 'Safari',
item => 'Safari',
action => 'remove',
}
dockutil::item { 'Remove Contacts':
label => 'Contacts',
item => 'Contacts',
action => 'remove',
}
dockutil::item { 'Add iTerm':
label => 'iTerm',
item => '/Applications/iTerm.app',
}
dockutil::item { 'Add Spotify':
label => 'Spotify',
item => '/Applications/Spotify.app',
}
dockutil::item { 'Add Chrome':
label => 'Chrome',
item => '/Applications/Google Chrome.app',
}
# Install Janus
repository { 'janus':
source => 'carlhuda/janus',
path => "${env['directories']['home']}/.vim",
}
~> exec { 'Boostrap Janus':
command => 'rake',
cwd => "${env['directories']['home']}/.vim",
refreshonly => true,
environment => [
"HOME=${env['directories']['home']}",
],
}
# Install oh-my-zsh
repository { "oh-my-zsh":
source => 'robbyrussell/oh-my-zsh',
path => "${env['directories']['home']}/.oh-my-zsh"
}
# Install z
repository { "z":
source => 'rupa/z',
path => "${env['directories']['home']}/z"
}
# Install dotfiles
repository { "dotfiles-private":
source => 'emilisto/dotfiles-private',
path => "${env['directories']['dotfiles']}"
}
# TODO: iTerm2 color theme
### This really shoudl be a shell script. DO IT!
-> people::emilisto::dotfile::link { $env['dotfiles']:
source_dir => $env['directories']['dotfiles'],
dest_dir => $env['directories']['home'],
}
# Misc Helpers until I can figure out where to put this
define dotfile::link($source_dir, $dest_dir) {
file { "${dest_dir}/.${name}":
ensure => symlink,
target => "${source_dir}/${name}",
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment