[meta] Add Prezto config

pull/28/head
Alpha Chen 10 years ago
parent a67bfc366c
commit 315f30d521

@ -1,25 +0,0 @@
require 'fileutils'
include FileUtils
def with_mount(image)
out = `hdiutil mount #{image}`
mountpoint = out.split(/\s+/).last
yield(mountpoint)
ensure
puts `hdiutil unmount #{mountpoint}`
end
cd File.expand_path('~/.ssh')
with_mount "~/Dropbox/sekritz.sparseimage" do |mountpoint|
from = Dir["#{mountpoint}/ssh keys/*"]
to = from.map {|file| File.basename(file) }
from.zip(to).each do |from, to|
next if File.exist?(to)
cp from, to
puts `chmod go-r #{to}`
puts `ssh-add -K #{to}`
end
end

@ -0,0 +1,12 @@
---
- homebrew: name=stow
- command: >
chdir={{ ansible_env.HOME }}/.dotfiles
stow --stow --target={{ ansible_env.HOME }} {{ item }}
with_items: stow
- file:
src: "{{ ansible_env.HOME }}/.dotfiles/{{ item.key }}"
dest: "{{ ansible_env.HOME}}/{{ item.value }}"
state: link
with_dict: ln
- local_action: command ruby scripts/setup_ssh_keys.rb

@ -1,13 +1,4 @@
--- ---
- homebrew: name=stow
# - git: repo=https://github.com/kejadlen/dotfiles.git dest=~/.dotfiles force=no # - git: repo=https://github.com/kejadlen/dotfiles.git dest=~/.dotfiles force=no
- command: > - include: dotfiles.yml
chdir={{ ansible_env.HOME }}/.dotfiles - include: prezto.yml
stow --stow --target={{ ansible_env.HOME }} {{ item }}
with_items: stow
- file:
src: "{{ ansible_env.HOME }}/.dotfiles/{{ item.key }}"
dest: "{{ ansible_env.HOME}}/{{ item.value }}"
state: link
with_dict: ln
- local_action: command ruby setup_ssh_keys.rb

@ -0,0 +1,13 @@
---
- homebrew: name=zsh
- file:
src: "{{ ansible_env.HOME }}/.dotfiles/src/prezto"
dest: "{{ ansible_env.HOME}}/.zprezto"
state: link
- file:
src: "{{ ansible_env.HOME }}/.zprezto/runcoms/{{ item }}"
dest: "{{ ansible_env.HOME}}/.{{ item }}"
state: link
with_lines: ls ~/.zprezto/runcoms | grep -v README.md
- command: chsh -s zsh alpha
sudo: True
Loading…
Cancel
Save