diff options
author | Kenny Ballou <kballou@devnulllabs.io> | 2020-10-14 10:05:44 -0600 |
---|---|---|
committer | Kenny Ballou <kballou@devnulllabs.io> | 2020-12-15 14:04:46 -0700 |
commit | 418ec7b94aa8202e5f5f0a59f2bb97a7c0510068 (patch) | |
tree | 0a08e1653ba5d8efc527bbaf4e5914ffb9c8b6b9 /config/git | |
parent | 164cd37871e6235584ce23f3a0bf516a51b31489 (diff) | |
download | dotfiles-418ec7b94aa8202e5f5f0a59f2bb97a7c0510068.tar.gz dotfiles-418ec7b94aa8202e5f5f0a59f2bb97a7c0510068.tar.xz |
dots: now for something completely different
Use home-manager to configure user packages, dotfiles, and various other
configurations.
Add home-manager configuration for installing and managing user packages
and profiles. Convert nearly all configuration to use home-manager to
install and link configuration files.
In no particular order of reference, I've used and/or referenced the
following configurations and posts for this homeification: [[0], [1],
[2], [3], [4], [5], [6], [7], [8], [9], [10]].
[0]: https://gitlab.com/NobbZ/nix-home-manager-dotfiles
[1]: https://www.malloc47.com/migrating-to-nixos/
[2]: https://lucperkins.dev/blog/home-manager/
[3]: https://github.com/jwiegley/nix-config
[4]: https://www.thedroneely.com/posts/declarative-user-package-management-in-nixos/
[5]: https://hugoreeves.com/posts/2019/nix-home/
[6]: https://rycee.gitlab.io/home-manager/
[7]: https://rycee.net/posts/2017-07-02-manage-your-home-with-nix.html
[8]: https://github.com/abcdw/rde
[9]: https://github.com/ryantm/dotfiles
[10]: https://git.sr.ht/~vdemeester/home
Signed-off-by: Kenny Ballou <kballou@devnulllabs.io>
Diffstat (limited to 'config/git')
-rw-r--r-- | config/git/default.nix | 20 | ||||
-rw-r--r-- | config/git/git/config | 58 | ||||
-rw-r--r-- | config/git/git/gitk | 62 | ||||
-rw-r--r-- | config/git/git/global-ignore | 3 | ||||
-rwxr-xr-x | config/git/git/template.d/hooks/gtags | 7 | ||||
-rwxr-xr-x | config/git/git/template.d/hooks/post-checkout | 3 | ||||
-rwxr-xr-x | config/git/git/template.d/hooks/post-commit | 3 | ||||
-rwxr-xr-x | config/git/git/template.d/hooks/post-merge | 3 | ||||
-rwxr-xr-x | config/git/git/template.d/hooks/post-rewrite | 5 |
9 files changed, 164 insertions, 0 deletions
diff --git a/config/git/default.nix b/config/git/default.nix new file mode 100644 index 00000000..6c1a800a --- /dev/null +++ b/config/git/default.nix @@ -0,0 +1,20 @@ +{ pkgs, config, ... }: +{ + xdg.configFile.gitconfig = { + source = ./git/config; + target = "git/config"; + }; + xdg.configFile.gitignore = { + source = ./git/global-ignore; + target = "git/global-ignore"; + }; + xdg.configFile.gitk = { + source = ./git/gitk; + target = "git/gitk"; + }; + xdg.configFile.template = { + recursive = true; + source = ./git/template.d; + target = "git/template.d"; + }; +} diff --git a/config/git/git/config b/config/git/git/config new file mode 100644 index 00000000..3a899632 --- /dev/null +++ b/config/git/git/config @@ -0,0 +1,58 @@ +[user] + name = Kenny Ballou + email = kballou@devnulllabs.io + signingKey = B0CAA28A02958308 +[interactive] + diffFilter = delta --color-only +[core] + editor = vim + excludesfile = /home/kb/.config/git/global-ignore + pager = delta --plus-color="#012800" --minus-color="#340001" --theme='zenburn' +[merge] + ff = only + tool = gvimdiff + conflictstyle = diff3 +[color] + status = auto + branch = auto + interactive = auto + diff = auto +[status] + showUntrackedFiles = all +[push] + default = simple +[alias] + serve = !git daemon --reuseaddr \ + --port=8000 \ + --verbose \ + --base-path=. \ + --export-all ./.git + branches = branch -a + tags = tag + stashes = stash list + remotes = remote -v + graph = log --graph --branches --remotes --tags --date-order + commit-reference = !git --no-pager show \ + --no-patch \ + --date=short \ + --pretty='format:%h ("%s", %ad)\n' \ + $@ +[grep] + extendRegexp = true + lineNumber = true +[pull] + ff = only +[transfer] + fsckObjects = true +[rerere] + enabled = true +[fetch] + prune = true +[sendmail] + smtpserver = /usr/bin/msmtp +[sendemail] + confirm = auto +[init] + templatedir = /home/kb/.config/git/template.d +[github] + user = kennyballou diff --git a/config/git/git/gitk b/config/git/git/gitk new file mode 100644 index 00000000..fbe3be49 --- /dev/null +++ b/config/git/git/gitk @@ -0,0 +1,62 @@ +set mainfont {{DejaVu Sans Mono} 12} +set textfont {{DejaVu Sans Mono} 12} +set uifont {{DejaVu Sans Mono} 12} +set tabstop 4 +set findmergefiles 0 +set maxgraphpct 50 +set maxwidth 16 +set cmitmode patch +set wrapcomment none +set autoselect 1 +set autosellen 40 +set showneartags 1 +set maxrefs 20 +set visiblerefs {"master"} +set hideremotes 0 +set showlocalchanges 1 +set datetimeformat {%Y-%m-%d %H:%M:%S} +set limitdiffs 1 +set uicolor #3f3f3f +set want_ttk 1 +set bgcolor #3f3f3f +set fgcolor #efefef +set uifgcolor #f0f0f0 +set uifgdisabledcolor #999 +set colors {"#7F9F7F" "#CC9393" "#8CD0D3" "#DC8CC3" darkgrey brown "#DFAF8F"} +set diffcolors {{#dca3a3} #7f9f7f #8cd0d3} +set mergecolors {red blue green purple brown "#009090" magenta "#808000" "#009000" "#ff0080" cyan "#b07070" "#70b0f0" "#70f0b0" "#f0b070" "#ff70b0"} +set markbgcolor #c0bed1 +set diffcontext 3 +set selectbgcolor #bc6c9c +set foundbgcolor yellow +set currentsearchhitbgcolor orange +set extdifftool opendiff +set perfile_attrs 0 +set headbgcolor #7F9F7F +set headfgcolor black +set headoutlinecolor black +set remotebgcolor #ffddaa +set tagbgcolor yellow +set tagfgcolor black +set tagoutlinecolor black +set reflinecolor black +set filesepbgcolor #aaaaaa +set filesepfgcolor black +set linehoverbgcolor #ffff80 +set linehoverfgcolor black +set linehoveroutlinecolor black +set mainheadcirclecolor #FF9800 +set workingfilescirclecolor #FF5C8D +set indexcirclecolor #A6E22E +set circlecolors {"#DCDCCC" "#8CD0D3" "#999999" "#8CD0D3" "#8CD0D3"} +set linkfgcolor #D7D7AF +set circleoutlinecolor #232323 +set geometry(main) 1333x855+0+19 +set geometry(state) normal +set geometry(topwidth) 1333 +set geometry(topheight) 357 +set geometry(pwsash0) "968 1" +set geometry(pwsash1) "1195 1" +set geometry(botwidth) 738 +set geometry(botheight) 493 +set permviews {} diff --git a/config/git/git/global-ignore b/config/git/git/global-ignore new file mode 100644 index 00000000..b8da6609 --- /dev/null +++ b/config/git/git/global-ignore @@ -0,0 +1,3 @@ +GTAGS +GRTAGS +GPATH diff --git a/config/git/git/template.d/hooks/gtags b/config/git/git/template.d/hooks/gtags new file mode 100755 index 00000000..8420abc7 --- /dev/null +++ b/config/git/git/template.d/hooks/gtags @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +DIR="$(git rev-parse --git-dir)" +trap 'rm -r "${DIR}/$$.gtags"' EXIT +mkdir "${DIR}/$$.gtags" +git ls-files | gtags --file=- "${DIR}/$$.gtags" +mv ${DIR}/$$.gtags/* "${DIR}/.." diff --git a/config/git/git/template.d/hooks/post-checkout b/config/git/git/template.d/hooks/post-checkout new file mode 100755 index 00000000..96641273 --- /dev/null +++ b/config/git/git/template.d/hooks/post-checkout @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +.git/hooks/gtags >/dev/null 2>&1 & diff --git a/config/git/git/template.d/hooks/post-commit b/config/git/git/template.d/hooks/post-commit new file mode 100755 index 00000000..96641273 --- /dev/null +++ b/config/git/git/template.d/hooks/post-commit @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +.git/hooks/gtags >/dev/null 2>&1 & diff --git a/config/git/git/template.d/hooks/post-merge b/config/git/git/template.d/hooks/post-merge new file mode 100755 index 00000000..96641273 --- /dev/null +++ b/config/git/git/template.d/hooks/post-merge @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +.git/hooks/gtags >/dev/null 2>&1 & diff --git a/config/git/git/template.d/hooks/post-rewrite b/config/git/git/template.d/hooks/post-rewrite new file mode 100755 index 00000000..c2f96972 --- /dev/null +++ b/config/git/git/template.d/hooks/post-rewrite @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +case "$1" in + rebase) exec .git/hooks/post-merge ;; +esac |