-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmacos.yml
More file actions
executable file
·164 lines (164 loc) · 5.11 KB
/
macos.yml
File metadata and controls
executable file
·164 lines (164 loc) · 5.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#!/usr/bin/env ansible-playbook
# vim: set ft=yaml:
---
# TODO:
# - change shell to newer bash installed w/ homebrew /usr/local/bin/bash
# - chrome extensions
# - set default browser?
# - iterm config
# - fonts
# - password manager
# - ssh keys
# - terminfo
# - os settings
- name: Install MacOS Software
hosts: 127.0.0.1
tasks:
- name: Install Homebrew Packages
homebrew:
name: "{{ item }}"
state: present
with_items:
- ansible
- bash
- cloc
- clojure
- coreutils
- cowsay
- emacs
- fswatch
- git
- graphviz
- gtypist
- htop
- hugo
- imagemagick
- ispell
- jq
- leiningen
- moreutils
- neovim
- netcat
- node
- openssl
- pandoc
- parallel
- pass
- pipenv
- python3
- reattach-to-user-namespace
- rename
- ripgrep
- rlwrap
- ruby
- shellcheck
- socat
- tldr
- tmux
- tree
- wget
- yarn
- yq
- name: Install Homebrew Casks
homebrew_cask:
name: "{{ item }}"
state: installed
with_items:
- google-chrome
- firefox
- haskell-platform
- java
- java8
- vagrant
- virtualbox
- name: Setup MacOS Defaults
shell: "{{ item }}"
with_items:
# Battery Display
- defaults write com.apple.menuextra.battery ShowPercent -string \"YES\"
- defaults write com.apple.menuextra.battery ShowTime -string \"NO\"
# Disable auto-correct
- defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Screenshot Location and Format
- defaults write com.apple.screencapture location -string \"$HOME/Desktop\"
- defaults write com.apple.screencapture type -string \"png\"
# Show all files in the Finder
- defaults write com.apple.finder AppleShowAllFiles -bool true
- defaults write NSGlobalDomain AppleShowAllExtensions -bool true
- defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
# Use list view in all Finder windows by default
# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
- defaults write com.apple.finder FXPreferredViewStyle -string \"Nlsv\"
# Autohide the dock without a delay
- defaults write com.apple.dock autohide -bool true
- defaults write com.apple.dock autohide-delay -float 0
# Stop iTunes from responding to the keyboard media keys
- launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist
# Require password immediately after sleep or screen saver begins
- defaults write com.apple.screensaver askForPassword -int 1
- defaults write com.apple.screensaver askForPasswordDelay -int 0
# Allow finder to be quit
- defaults write com.apple.finder QuitMenuItem -bool true
# Set highlight color to light purple
- "defaults write NSGlobalDomain AppleHighlightColor -string '0.968627 0.831373 1.000000'"
# increase key repeat rate
- defaults write -g InitialKeyRepeat -int 15 # normal minimum is 15 (225 ms)
- defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)
- name: Install Pip Packages
pip:
name: "{{ item }}"
state: present
with_items:
- virtualenv
- howdoi
- neovim
- livereload
- name: Install Npm Packages
npm:
name: "{{ item }}"
global: yes
state: present
with_items:
- lumo-cljs
- serve
- yarn
- tldr
- name: Install Gems
gem:
name: "{{ item }}"
state: present
with_items:
- pry
- lolcat
- name: Clone Dotfiles Repo
git:
clone: yes
update: yes
dest: "{{ lookup('env', 'HOME') }}/dotfiles"
- name: Install Dotfiles
file:
state: link
src: "{{ lookup('env', 'HOME') }}/dotfiles/{{ item[0] }}"
dest: "{{ lookup('env', 'HOME') }}/{{ item[1] }}"
with_items:
- [bashrc, .bashrc]
- [bash_profile, .bash_profile]
- [aliases, .aliases]
- [bash_functions, .bash_functions]
- [gitconfig, .gitconfig]
- [tmux.conf, .tmux.conf]
- [editorconfig, .editorconfig]
- [vimrc, .config/nvim/init.vim]
- [snippets/vim, .config/nvim/UltiSnips]
- [after, .config/nvim/after]
- name: Install Plugged (Neovim Plugin Manager)
shell: curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- name: Install Editor Plugins
shell: nvim -c PlugInstall -c q -c q
- name: Open Browser To Install More Software
shell: open {{ item }}
loop:
- https://www.docker.com/docker-mac
- https://www.iterm2.com/downloads.html
- https://www.spectacleapp.com/
- https://totalspaces.binaryage.com/