From 0454a3536bdef1657510faa1e472fc5aa9d518a7 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 4 Jan 2021 19:47:49 -0800 Subject: git: store configuration under XDG_CONFIG_HOME Since `git` understand `$XDG_CONFIG_HOME`, let's gather all the configuration files there. --- .gitignore | 1 + Makefile | 5 +++-- Makefile.darwin | 2 +- Makefile.linux | 4 +--- config/git/config | 21 +++++++++++++++++++++ config/git/ignore | 24 ++++++++++++++++++++++++ config/git/user.personal | 3 +++ config/git/user.work | 3 +++ gitconfig | 22 ---------------------- gitconfig.personal | 3 --- gitconfig.twitter | 3 --- gitignore | 24 ------------------------ 12 files changed, 57 insertions(+), 58 deletions(-) create mode 100644 config/git/config create mode 100644 config/git/ignore create mode 100644 config/git/user.personal create mode 100644 config/git/user.work delete mode 100644 gitconfig delete mode 100644 gitconfig.personal delete mode 100644 gitconfig.twitter delete mode 100644 gitignore diff --git a/.gitignore b/.gitignore index 0ff5b07..dff9282 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,4 @@ var/ bookmarks custom-set-variables /emacs.d/transient/history.el +/config/git/user diff --git a/Makefile b/Makefile index 38f2b61..8323e15 100644 --- a/Makefile +++ b/Makefile @@ -10,11 +10,12 @@ endif .PHONY: install-general install-general: + @mkdir -p $(HOME)/.config @mkdir -p $(HOME)/workspace/ @curl -s https://github.com/fcuny.keys -o $(HOME)/.ssh/authorized_keys $(LN) $(PWD)/aspell.en.pws $(HOME)/.aspell.en.pws - $(LN) $(PWD)/gitconfig $(HOME)/.gitconfig - $(LN) $(PWD)/gitignore $(HOME)/.gitignore + $(LN) $(PWD)/config/git $(HOME)/.config/ + $(LN) $(PWD)/emacs $(HOME)/.config/ $(LN) $(PWD)/tmux.conf $(HOME)/.tmux.conf $(LN) $(PWD)/zshenv $(HOME)/.zshenv $(LN) $(PWD)/zshrc $(HOME)/.zshrc diff --git a/Makefile.darwin b/Makefile.darwin index 3621942..8b573fa 100644 --- a/Makefile.darwin +++ b/Makefile.darwin @@ -1,6 +1,6 @@ .PHONY: install-darwin-symlinks install-darwin-symlinks: install-general - $(LN) $(PWD)/gitconfig.twitter $(HOME)/.gitconfig.private + $(LN) $(PWD)/config/git/user.work $(HOME)/.config/user $(LN) $(PWD)/emacs.d $(HOME)/.emacs.d install: install-darwin-symlinks diff --git a/Makefile.linux b/Makefile.linux index 256cd33..a5490dd 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -1,18 +1,16 @@ .PHONY: install-linux-symlinks install-linux-symlinks: install-general - @mkdir -p $(HOME)/.config @mkdir -p $(HOME)/.config/systemd $(LN) $(PWD)/Xmodmap $(HOME)/.Xmodmap $(LN) $(PWD)/Xresources $(HOME)/.Xresources $(LN) $(PWD)/config/alacritty $(HOME)/.config/ + $(LN) $(PWD)/config/git/user.personal $(HOME)/.config/git/user $(LN) $(PWD)/config/i3/ $(HOME)/.config/ $(LN) $(PWD)/config/mpd/ $(HOME)/.config/ $(LN) $(PWD)/config/redshift.conf $(HOME)/.config/redshift.conf $(LN) $(PWD)/config/systemd/user/backup.service $(HOME)/.config/systemd/user/backup.service $(LN) $(PWD)/config/systemd/user/ssh-agent.service $(HOME)/.config/systemd/user/ssh-agent.service $(LN) $(PWD)/config/user-dirs.dirs $(HOME)/.config/user-dirs.dirs - $(LN) $(PWD)/emacs.d/ $(HOME)/.config/ - $(LN) $(PWD)/gitconfig.personal $(HOME)/.gitconfig.private $(LN) $(PWD)/pam_environment $(HOME)/.pam_environment $(LN) $(PWD)/xsession $(HOME)/.xsession diff --git a/config/git/config b/config/git/config new file mode 100644 index 0000000..32f11aa --- /dev/null +++ b/config/git/config @@ -0,0 +1,21 @@ +[color] + ui = true + +[push] + default = simple + +[core] + whitespace = trailing-space,space-before-tab + +[branch] + autosetuprebase = remote + +[include] + path = ~/.config/git/user + +[http] + postBuffer = 524288000 + +[alias] + s = status --short --branch + amend = commit --amend --no-edit diff --git a/config/git/ignore b/config/git/ignore new file mode 100644 index 0000000..c8124cb --- /dev/null +++ b/config/git/ignore @@ -0,0 +1,24 @@ +# osx stuff +.DS_Store +Icon + +# ide +.idea +*.iml +/env/* + +# python stuff +.flake8rc +*pyc + +# ctags stuff +TAGS +tags + +# emacs stuff +.projectile +.dir-locals.el +.pytest_cache/ + +.reviewboardrc +ui/package-lock.json diff --git a/config/git/user.personal b/config/git/user.personal new file mode 100644 index 0000000..092c2f1 --- /dev/null +++ b/config/git/user.personal @@ -0,0 +1,3 @@ +[user] + name = Franck Cuny + email = franck@fcuny.net diff --git a/config/git/user.work b/config/git/user.work new file mode 100644 index 0000000..d95b398 --- /dev/null +++ b/config/git/user.work @@ -0,0 +1,3 @@ +[user] + name = Franck Cuny + email = fcuny@twitter.com diff --git a/gitconfig b/gitconfig deleted file mode 100644 index 02ec952..0000000 --- a/gitconfig +++ /dev/null @@ -1,22 +0,0 @@ -[color] - ui = true - -[push] - default = simple - -[core] - whitespace = trailing-space,space-before-tab - excludesfile = ~/.gitignore - -[branch] - autosetuprebase = remote - -[include] - path = ~/.gitconfig.private - -[http] - postBuffer = 524288000 - -[alias] - s = status --short --branch - amend = commit --amend --no-edit diff --git a/gitconfig.personal b/gitconfig.personal deleted file mode 100644 index 092c2f1..0000000 --- a/gitconfig.personal +++ /dev/null @@ -1,3 +0,0 @@ -[user] - name = Franck Cuny - email = franck@fcuny.net diff --git a/gitconfig.twitter b/gitconfig.twitter deleted file mode 100644 index d95b398..0000000 --- a/gitconfig.twitter +++ /dev/null @@ -1,3 +0,0 @@ -[user] - name = Franck Cuny - email = fcuny@twitter.com diff --git a/gitignore b/gitignore deleted file mode 100644 index c8124cb..0000000 --- a/gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# osx stuff -.DS_Store -Icon - -# ide -.idea -*.iml -/env/* - -# python stuff -.flake8rc -*pyc - -# ctags stuff -TAGS -tags - -# emacs stuff -.projectile -.dir-locals.el -.pytest_cache/ - -.reviewboardrc -ui/package-lock.json -- cgit 1.4.1