[meta] various changes for installation on Sierra
change
commit 4a1aa5851bd1e72586c3132b5e0cdb4cbf3150be
author Alpha Chen <alpha.chen@gmail.com>
date
parent 4fec9284
diff --git a/.ssh/old_id_rsa.pub b/.ssh/old_id_rsa.pub
deleted file mode 100644
index 8d2e2c7e..00000000
--- a/.ssh/old_id_rsa.pub
+++ /dev/null
@@ -1 +0,0 @@
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtNVr7YQs2r7lB7CyGRY2/GW2WYqs1NbPCFu3IYGOGXhKn8A8dA1pL7Jvs/njufrkbVh6CQ0fkQgf7AtTL7q+KORyh7VDawg4euqYRhyyJl+vlZAI0hRnF6qoPy9s3j2CI/9EbmAmAvNbsp6kCpsg0RB5ik0Q+pr7PBORGnAew8JOo6zEuUOOBwIldK/TXLaO9SowSHtCdq9tHXl/2X2mP8hhT0BOSLDbQFK0vJii0Dy0QrktSFZRDbs+8e20HxkyKPu4+rOmQfR/ymE3YdSxLLgcXe/zDIMZiTQrI2Lsc2PcE56NeXNXtmr3ZlnO5LLaZGqdOvKDE6x6PTd2q1l0/ alpha@mirepoix.local
diff --git a/Brewfile b/Brewfile
index d19b4537..02af80bf 100644
--- a/Brewfile
+++ b/Brewfile
@@ -36,10 +36,11 @@ cask 'firefox'
 cask 'flux'
 cask 'font-fira-mono-for-powerline'
 cask 'font-hack'
-cask 'font-sauce-code-powerline'
+cask 'font-source-code-pro-for-powerline'
 cask 'google-chrome'
 cask 'hammerspoon'
 cask 'little-snitch'
+cask 'logitech-options'
 cask 'moom'
 cask 'night-owl'
 cask 'omnifocus'
diff --git a/README.md b/README.md
index befefaa0..cf86b93e 100644
--- a/README.md
+++ b/README.md
@@ -77,7 +77,7 @@ git clone --recursive https://github.com/kejadlen/dotfiles.git ~/.dotfiles
 
 # Run Ansible
 cd ~/.dotfiles/ansible
-echo localhost > hosts.private
+echo "localhost ansible_connection=local" > hosts.private
 ansible-playbook main.yml --ask-pass --ask-become-pass
 ```
 
diff --git a/Rakefile b/Rakefile
index 1364471f..e651d4be 100644
--- a/Rakefile
+++ b/Rakefile
@@ -58,9 +58,9 @@ namespace :sync do
 end
 
 namespace :bitbar do
-  FILE = 'onebusaway.30s.rb'
+  FILE = "onebusaway.30s.rb"
 
-  desc 'Toggle OneBusAway BitBar plugin'
+  desc "Toggle OneBusAway BitBar plugin"
   task :oba do
     if File.exist?(File.expand_path("../bitbar/enabled/#{FILE}", __FILE__))
       rm File.expand_path("../bitbar/enabled/#{FILE}", __FILE__)
@@ -68,6 +68,43 @@ namespace :bitbar do
       ln_s File.expand_path("../bitbar/#{FILE}", __FILE__),
            File.expand_path("../bitbar/enabled/#{FILE}", __FILE__)
     end
-    sh 'open bitbar://refreshPlugin?name=onebusaway.*'
+    sh "open bitbar://refreshPlugin?name=onebusaway.*"
+  end
+end
+
+namespace :pave do
+  PATHS = %w[
+    BTSync/
+    Downloads/
+    Dropbox/
+    Library/Application\ Support/Adium\ 2.0
+    Library/Preferences/com.YoruFukurouProject.YoruFukurou.plist
+    Library/Preferences/com.adiumX.adiumX.plist
+  ]
+
+  desc "Backup files for paving"
+  task :backup, [:to_dir] do |t, args|
+    to_dir = args[:to_dir]
+
+    PATHS.each do |path|
+      from = File.expand_path("~/#{path}")
+      to = File.expand_path("#{to_dir}/#{path}")
+
+      mkdir_p to.pathmap("%d")
+      sh *%W[ rsync --archive --delete --verbose #{from} #{to} ]
+    end
+  end
+
+  desc "Restore files for paving"
+  task :restore, [:from_dir] do |t, args|
+    from_dir = args[:from_dir]
+
+    PATHS.each do |path|
+      from = File.expand_path("#{from_dir}/#{path}")
+      to = File.expand_path("~/#{path}")
+
+      mkdir_p to.pathmap("%d")
+      sh *%W[ rsync --archive --delete --verbose #{from} #{to} ]
+    end
   end
 end
diff --git a/ansible/roles/homebrew/tasks/main.yml b/ansible/roles/homebrew/tasks/main.yml
index 2c7bce88..4fd99798 100644
--- a/ansible/roles/homebrew/tasks/main.yml
+++ b/ansible/roles/homebrew/tasks/main.yml
@@ -1,34 +1,12 @@
-- name: install formulae
-  homebrew:
-    name: "{{ item.name }}"
-    install_options: "{{ item.install_options | default(omit) }}"
-    state: present
-  with_items: "{{ formulae }}"
+- name: install homebrew-bundle
+  command: brew tap Homebrew/bundle
 
-- name: link homebrew apps
-  command: /usr/local/bin/brew linkapps
-
-- name: create ~/Applications
-  file: path={{ ansible_env.HOME }}/Applications state=directory
-
-# This is necessary since we want to enable sudo when setting up Homebrew-Cask.
+# Not sure if this is needed anymore - was used for installing casks
 - name: authenticate sudo
   ping:
   become: yes
 
-- name: setup homebrew/cask
-  command: /usr/local/bin/brew cask
-
-- name: install casks
-  homebrew_cask: name={{ item }} state=installed
-  with_items: "{{ casks }}"
-
-- name: tap caskroom/fonts
-  homebrew_tap: tap=caskroom/fonts state=present
-
-- name: install fonts
-  homebrew_cask: name=font-{{ item }} state=installed
-  with_items: "{{ fonts }}"
-
-- name: tap personal homebrew repo
-  homebrew_tap: tap=kejadlen/personal
+- name: homebrew-bundle install
+  command: brew bundle
+  args:
+    chdir: ~/.dotfiles
diff --git a/ansible/roles/homebrew/vars/main.yml b/ansible/roles/homebrew/vars/main.yml
deleted file mode 100644
index 483ed75c..00000000
--- a/ansible/roles/homebrew/vars/main.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-formulae:
-  - name: ctags
-  - name: direnv
-  - name: fasd
-  - name: git
-  - name: macvim
-    install_options: with-override-system-vim
-  - name: reattach-to-user-namespace
-  - name: terminal-notifier
-  - name: the_silver_searcher
-  - name: tmux
-  - name: tree
-  - name: youtube-dl
-  - name: zsh
-
-casks:
-  - 1password
-  - acorn
-  - adium
-  - alfred
-  - arq
-  - bartender
-  - bitbar
-  - bittorrent-sync
-  - black-ink
-  - colloquy
-  - dash
-  - disk-inventory-x
-  - dropbox
-  - fantastical
-  - firefox
-  - flux
-  - google-chrome
-  - hammerspoon
-  - kindle
-  - little-snitch
-  - moom
-  - night-owl
-  - openscad
-  - plug
-  - qlmarkdown
-  - qlstephen
-  - quicklook-csv
-  - quicklook-json
-  - slack
-  - steam
-  - taskpaper
-  - things
-  - transmission
-  - vlc
-
-fonts:
-  - hack
-  - sauce-code-powerline
diff --git a/ansible/roles/osx/tasks/main.yml b/ansible/roles/osx/tasks/main.yml
index 588fc64d..b983e52e 100644
--- a/ansible/roles/osx/tasks/main.yml
+++ b/ansible/roles/osx/tasks/main.yml
@@ -1,11 +1,3 @@
-- name: copy application preferences
-  synchronize:
-    src: "{{ item }}"
-    dest: "{{ item }}"
-    rsync_opts: --ignore-existing
-  with_items: "{{ app_prefs }}"
-  when: inventory_hostname != "localhost"
-
 - include: dock.yml
 - include: terminal.yml
 
diff --git a/ansible/roles/osx/vars/main.yml b/ansible/roles/osx/vars/main.yml
index 0bfc6cb5..d9dfe826 100644
--- a/ansible/roles/osx/vars/main.yml
+++ b/ansible/roles/osx/vars/main.yml
@@ -125,8 +125,8 @@ osx_defaults:
     value: 0
   - domain: com.apple.driver.AppleBluetoothMultitouch.trackpad
     key: TrackpadThreeFingerDrag
-    type: int
-    value: 1
+    type: bool
+    value: true
   - domain: com.apple.driver.AppleBluetoothMultitouch.trackpad
     key: TrackpadThreeFingerHorizSwipeGesture
     type: int
@@ -184,14 +184,3 @@ osx_defaults:
     key: AppleEnableSwipeNavigateWithScrolls
     type: bool
     value: false
-
-app_prefs:
-  - ~/Library/Application Support/Adium 2.0
-  - ~/Library/Containers/com.reederapp.rkit2.mac
-  - ~/Library/Preferences/com.YoruFukurouProject.YoruFukurou.plist
-  - ~/Library/Preferences/com.adiumX.adiumX.plist
-  - ~/Library/Preferences/com.culturedcode.things.plist
-  - ~/Library/Preferences/com.flexibits.fantastical.plist
-  - ~/Library/Preferences/com.kapeli.dashdoc.plist
-  - ~/Library/Preferences/com.surteesstudios.Bartender.plist
-  - ~/Library/Preferences/org.herf.Flux.plist