From a318f2989b3e101be390929da2d1d93be45475cd Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 1 Nov 2021 10:59:31 +0000 Subject: [PATCH] Move git config into XDG_CONFIG_HOME --- roles/home-cli/files/gitconfig | 2 +- roles/home-cli/tasks/dirs.yml | 5 ++++- roles/home-cli/tasks/dotfiles.yml | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/roles/home-cli/files/gitconfig b/roles/home-cli/files/gitconfig index 9a970e9..23c2660 100644 --- a/roles/home-cli/files/gitconfig +++ b/roles/home-cli/files/gitconfig @@ -18,4 +18,4 @@ last = log -1 HEAD --pretty=fuller lastmail = format-patch --stdout -1 HEAD [include] - path = .gitconfig.local + path = local diff --git a/roles/home-cli/tasks/dirs.yml b/roles/home-cli/tasks/dirs.yml index 06b9666..3c2fd08 100644 --- a/roles/home-cli/tasks/dirs.yml +++ b/roles/home-cli/tasks/dirs.yml @@ -39,4 +39,7 @@ ansible.builtin.file: path: "{{ ansible_env.HOME }}/.config" state: directory - mode: '0700' +- name: Create ~/.config/git directory + ansible.builtin.file: + path: "{{ ansible_env.HOME }}/.config/git" + state: directory diff --git a/roles/home-cli/tasks/dotfiles.yml b/roles/home-cli/tasks/dotfiles.yml index 9df4187..a7b04a9 100644 --- a/roles/home-cli/tasks/dotfiles.yml +++ b/roles/home-cli/tasks/dotfiles.yml @@ -37,10 +37,10 @@ ansible.builtin.copy: src: mailcap dest: "{{ ansible_env.HOME }}/.mailcap" -- name: Copy .gitconfig +- name: Copy .config/git/config ansible.builtin.copy: src: gitconfig - dest: "{{ ansible_env.HOME }}/.gitconfig" + dest: "{{ ansible_env.HOME }}/.config/git/config" - name: Copy .quiltrc-dpkg ansible.builtin.copy: src: quiltrc-dpkg