1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-16 00:31:31 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
bretello
12e521a2c6
vim: remap <leader>gl to Commits, add <leader>gL for :Bcommits 2022-12-21 13:54:02 +01:00
bretello
977a45e109
ansible: fix setup
- apply prettier
- fix misc issues
2022-12-18 13:36:26 +01:00
2 changed files with 29 additions and 27 deletions

View File

@ -4,54 +4,54 @@
vars_files:
- ../ansible-packages.yml
vars:
DOTFILES: '$HOME/.dotfiles'
DOTFILES: "$HOME/.dotfiles"
tasks:
- name: Install required system packages (debian)
apt:
install_recommends: no
update_cache: yes
pkg: '{{ packages + packages_debian }}'
pkg: "{{ packages + packages_debian }}"
when: ansible_facts['os_family'] == "Debian"
- name: Install required system packages (debian)
- name: Install required system packages (arch)
pacman:
update_cache: yes
name: '{{ packages + packages_archlinux }}'
name: "{{ packages + packages_archlinux }}"
when: ansible_facts['os_family'] == "Archlinux"
- name: dotfiles repo
git:
repo: https://git.decapod.one/brethil/dotfiles
dest: '{{ DOTFILES }}'
dest: "{{ DOTFILES }}"
version: master
when: local_development is not defined
- name: directories
file:
dest: '{{ item }}'
dest: "{{ item }}"
state: directory
mode: 0700
loop: '{{ directories }}'
loop: "{{ directories }}"
vars:
directories:
- '$HOME/bin'
- '$HOME/projects'
- '$HOME/git'
- '$HOME/.config/git'
- "$HOME/bin"
- "$HOME/projects"
- "$HOME/git"
- "$HOME/.config/git"
- name: antibody # TODO: antibody is available on apt(debian)/brew/pacman
shell: |
set -euo pipefail
curl -sfL https://git.io/antibody | sh -s - -b $HOME/bin/
/opt/homebrew/bin/antibody bundle "{{ DOTFILES }}/antibody_plugins.txt"
$HOME/bin/antibody bundle "{{ DOTFILES }}/antibody_plugins.txt"
args:
executable: /bin/bash
creates: /usr/local/bin/antibody
- name: zsh as default shell
user:
name: '{{ ansible_user }}'
name: "{{ ansible_user }}"
shell: /usr/bin/zsh
- name: zsh config
@ -61,22 +61,23 @@
block: |
export DOTFILES={{ DOTFILES }}
source $DOTFILES/brethil_dotfile.sh
create: true
- name: dotfiles symlink
file:
src: '{{ DOTFILES }}/{{ item.key }}'
dest: '{{ item.value }}'
src: "{{ DOTFILES }}/{{ item.key }}"
dest: "{{ item.value }}"
state: link
force: yes
loop: '{{ files | dict2items }}'
loop: "{{ files | dict2items }}"
vars:
files:
'tmux.conf': '~/.tmux.conf'
'vim/vimrc': '~/.vimrc'
'pdbrc.py': '~/.pdbrc.py'
"tmux.conf": "~/.tmux.conf"
"vim/vimrc": "~/.vimrc"
"pdbrc.py": "~/.pdbrc.py"
# "ipython": "~/.ipython" # FIXME: ipython config is more complex
'ansible/ansible.cfg': '~/.ansible.cfg'
'gitignore': '~/.git/config/ignore'
"ansible/ansible.cfg": "~/.ansible.cfg"
"gitignore": "~/.config/git/ignore"
- name: check undodir_migration
stat: path=${HOME}/.vim_runtime/temp_dirs/undodir
@ -92,16 +93,16 @@
- name: git config facts
community.general.git_config:
name: 'include.path'
name: "include.path"
scope: global
register: config_value
- debug:
msg: 'Git config include.path={{ config_value }}'
msg: "Git config include.path={{ config_value }}"
- name: git config
community.general.git_config:
name: 'include.path'
value: '{{ DOTFILES }}/gitconfig'
name: "include.path"
value: "{{ DOTFILES }}/gitconfig"
scope: global
when: config_value is not defined
@ -109,7 +110,7 @@
copy:
src: ../../gitignore
dest: ~/.gitignore
mode: '0600'
mode: "0600"
backup: yes
- name: annoyances

View File

@ -61,7 +61,8 @@ nnoremap <leader>\ :0Git<CR>
nnoremap <leader>d :Gvdiffsplit<CR>
nnoremap <leader>b :Git blame<CR>
nnoremap <leader>gp :Git push<CR>
nnoremap <leader>gl :vert Git log %<CR>
nnoremap <leader>gl :Commits<CR>
nnoremap <leader>gL :BCommits<CR>
nnoremap <leader>gc :Git commit<CR>
nnoremap <leader>gpf :Git push --force-with-lease<CR>