mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-16 00:31:31 +01:00
Compare commits
No commits in common. "12e521a2c634c2bb50af60717c2c4ef5a1394cd8" and "2c36af66156331c803a4080202a9d7921eb511a9" have entirely different histories.
12e521a2c6
...
2c36af6615
|
@ -4,54 +4,54 @@
|
||||||
vars_files:
|
vars_files:
|
||||||
- ../ansible-packages.yml
|
- ../ansible-packages.yml
|
||||||
vars:
|
vars:
|
||||||
DOTFILES: "$HOME/.dotfiles"
|
DOTFILES: '$HOME/.dotfiles'
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install required system packages (debian)
|
- name: Install required system packages (debian)
|
||||||
apt:
|
apt:
|
||||||
install_recommends: no
|
install_recommends: no
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
pkg: "{{ packages + packages_debian }}"
|
pkg: '{{ packages + packages_debian }}'
|
||||||
when: ansible_facts['os_family'] == "Debian"
|
when: ansible_facts['os_family'] == "Debian"
|
||||||
|
|
||||||
- name: Install required system packages (arch)
|
- name: Install required system packages (debian)
|
||||||
pacman:
|
pacman:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
name: "{{ packages + packages_archlinux }}"
|
name: '{{ packages + packages_archlinux }}'
|
||||||
when: ansible_facts['os_family'] == "Archlinux"
|
when: ansible_facts['os_family'] == "Archlinux"
|
||||||
|
|
||||||
- name: dotfiles repo
|
- name: dotfiles repo
|
||||||
git:
|
git:
|
||||||
repo: https://git.decapod.one/brethil/dotfiles
|
repo: https://git.decapod.one/brethil/dotfiles
|
||||||
dest: "{{ DOTFILES }}"
|
dest: '{{ DOTFILES }}'
|
||||||
version: master
|
version: master
|
||||||
when: local_development is not defined
|
when: local_development is not defined
|
||||||
|
|
||||||
- name: directories
|
- name: directories
|
||||||
file:
|
file:
|
||||||
dest: "{{ item }}"
|
dest: '{{ item }}'
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0700
|
mode: 0700
|
||||||
loop: "{{ directories }}"
|
loop: '{{ directories }}'
|
||||||
vars:
|
vars:
|
||||||
directories:
|
directories:
|
||||||
- "$HOME/bin"
|
- '$HOME/bin'
|
||||||
- "$HOME/projects"
|
- '$HOME/projects'
|
||||||
- "$HOME/git"
|
- '$HOME/git'
|
||||||
- "$HOME/.config/git"
|
- '$HOME/.config/git'
|
||||||
|
|
||||||
- name: antibody # TODO: antibody is available on apt(debian)/brew/pacman
|
- name: antibody # TODO: antibody is available on apt(debian)/brew/pacman
|
||||||
shell: |
|
shell: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
curl -sfL https://git.io/antibody | sh -s - -b $HOME/bin/
|
curl -sfL https://git.io/antibody | sh -s - -b $HOME/bin/
|
||||||
$HOME/bin/antibody bundle "{{ DOTFILES }}/antibody_plugins.txt"
|
/opt/homebrew/bin/antibody bundle "{{ DOTFILES }}/antibody_plugins.txt"
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
creates: /usr/local/bin/antibody
|
creates: /usr/local/bin/antibody
|
||||||
|
|
||||||
- name: zsh as default shell
|
- name: zsh as default shell
|
||||||
user:
|
user:
|
||||||
name: "{{ ansible_user }}"
|
name: '{{ ansible_user }}'
|
||||||
shell: /usr/bin/zsh
|
shell: /usr/bin/zsh
|
||||||
|
|
||||||
- name: zsh config
|
- name: zsh config
|
||||||
|
@ -61,23 +61,22 @@
|
||||||
block: |
|
block: |
|
||||||
export DOTFILES={{ DOTFILES }}
|
export DOTFILES={{ DOTFILES }}
|
||||||
source $DOTFILES/brethil_dotfile.sh
|
source $DOTFILES/brethil_dotfile.sh
|
||||||
create: true
|
|
||||||
|
|
||||||
- name: dotfiles symlink
|
- name: dotfiles symlink
|
||||||
file:
|
file:
|
||||||
src: "{{ DOTFILES }}/{{ item.key }}"
|
src: '{{ DOTFILES }}/{{ item.key }}'
|
||||||
dest: "{{ item.value }}"
|
dest: '{{ item.value }}'
|
||||||
state: link
|
state: link
|
||||||
force: yes
|
force: yes
|
||||||
loop: "{{ files | dict2items }}"
|
loop: '{{ files | dict2items }}'
|
||||||
vars:
|
vars:
|
||||||
files:
|
files:
|
||||||
"tmux.conf": "~/.tmux.conf"
|
'tmux.conf': '~/.tmux.conf'
|
||||||
"vim/vimrc": "~/.vimrc"
|
'vim/vimrc': '~/.vimrc'
|
||||||
"pdbrc.py": "~/.pdbrc.py"
|
'pdbrc.py': '~/.pdbrc.py'
|
||||||
# "ipython": "~/.ipython" # FIXME: ipython config is more complex
|
# "ipython": "~/.ipython" # FIXME: ipython config is more complex
|
||||||
"ansible/ansible.cfg": "~/.ansible.cfg"
|
'ansible/ansible.cfg': '~/.ansible.cfg'
|
||||||
"gitignore": "~/.config/git/ignore"
|
'gitignore': '~/.git/config/ignore'
|
||||||
|
|
||||||
- name: check undodir_migration
|
- name: check undodir_migration
|
||||||
stat: path=${HOME}/.vim_runtime/temp_dirs/undodir
|
stat: path=${HOME}/.vim_runtime/temp_dirs/undodir
|
||||||
|
@ -93,16 +92,16 @@
|
||||||
|
|
||||||
- name: git config facts
|
- name: git config facts
|
||||||
community.general.git_config:
|
community.general.git_config:
|
||||||
name: "include.path"
|
name: 'include.path'
|
||||||
scope: global
|
scope: global
|
||||||
register: config_value
|
register: config_value
|
||||||
- debug:
|
- debug:
|
||||||
msg: "Git config include.path={{ config_value }}"
|
msg: 'Git config include.path={{ config_value }}'
|
||||||
|
|
||||||
- name: git config
|
- name: git config
|
||||||
community.general.git_config:
|
community.general.git_config:
|
||||||
name: "include.path"
|
name: 'include.path'
|
||||||
value: "{{ DOTFILES }}/gitconfig"
|
value: '{{ DOTFILES }}/gitconfig'
|
||||||
scope: global
|
scope: global
|
||||||
when: config_value is not defined
|
when: config_value is not defined
|
||||||
|
|
||||||
|
@ -110,7 +109,7 @@
|
||||||
copy:
|
copy:
|
||||||
src: ../../gitignore
|
src: ../../gitignore
|
||||||
dest: ~/.gitignore
|
dest: ~/.gitignore
|
||||||
mode: "0600"
|
mode: '0600'
|
||||||
backup: yes
|
backup: yes
|
||||||
|
|
||||||
- name: annoyances
|
- name: annoyances
|
||||||
|
|
|
@ -61,8 +61,7 @@ nnoremap <leader>\ :0Git<CR>
|
||||||
nnoremap <leader>d :Gvdiffsplit<CR>
|
nnoremap <leader>d :Gvdiffsplit<CR>
|
||||||
nnoremap <leader>b :Git blame<CR>
|
nnoremap <leader>b :Git blame<CR>
|
||||||
nnoremap <leader>gp :Git push<CR>
|
nnoremap <leader>gp :Git push<CR>
|
||||||
nnoremap <leader>gl :Commits<CR>
|
nnoremap <leader>gl :vert Git log %<CR>
|
||||||
nnoremap <leader>gL :BCommits<CR>
|
|
||||||
nnoremap <leader>gc :Git commit<CR>
|
nnoremap <leader>gc :Git commit<CR>
|
||||||
nnoremap <leader>gpf :Git push --force-with-lease<CR>
|
nnoremap <leader>gpf :Git push --force-with-lease<CR>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user