Migrate global configuration to and expand home

- Move lots of system config to home (browser, editors, etc.)
- Improve catppuccin support (kitty, cursors, etc.)
- Improve overall theme (fonts, icons in kitty)
- Add coded's system hardware configuration ("shorthair")
- Add the ed editor
- Split minion's system hardware configuration ("greylag") into several files
- Improve shell support (aliases, useful packages, replacements, etc.)

Change-Id: Ie6d40f809b2662268a9a6fa8b241641bbfef9442
Reviewed-on: https://git.clicks.codes/c/Chimera/NixFiles/+/383
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/home/git/default.nix b/modules/home/git/default.nix
new file mode 100644
index 0000000..6a161ea
--- /dev/null
+++ b/modules/home/git/default.nix
@@ -0,0 +1,175 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+{
+  options.chimera.git = {
+    gitReview.enable = lib.mkEnableOption "Enable git review";
+    delta.enable = lib.mkEnableOption "Enable delta, an alternative pager for git diffs that highlights syntax";
+    auth = {
+      clicksUsername = lib.mkOption {
+        type = lib.types.str;
+        description = "Username for Clicks Gerrit";
+      };
+    };
+  };
+
+  config = {
+
+    home.packages = (if config.chimera.git.gitReview.enable then [ pkgs.git-review ] else [ ]);
+
+    programs.zsh.shellAliases =
+      if config.chimera.git.gitReview.enable then { "gr!" = "git review"; } else { };
+
+    programs.bash.shellAliases =
+      if config.chimera.git.gitReview.enable then { "gr!" = "git review"; } else { };
+
+    programs.git = {
+      enable = true;
+
+      delta.enable = config.chimera.git.delta.enable;
+
+      extraConfig = {
+        init.defaultBranch = "main";
+        advice.skippedcherrypicks = false;
+        commit.gpgsign = true;
+        credential.helper = "cache";
+        core = {
+          repositoryformatversion = 0;
+          filemode = true;
+          bare = false;
+          logallrefupdates = true;
+          fsmonitor = true;
+          autocrlf = "input";
+          splitIndex = true;
+          untrackedCache = true;
+        };
+        pull = {
+          rebase = "merges"; # TODO: from git docs, should we provide an option for this?: NOTE: this is a possibly dangerous operation; do not use it unless you understand the implications (see git-rebase[1] for details).
+        };
+        push = {
+          autoSetupRemote = true;
+          gpgSign = "if-asked";
+        };
+        url = {
+          "ssh://git@github.com/".pushInsteadOf = "https://github.com/";
+          "ssh://minion@ssh.clicks.codes:29418/".pushInsteadOf = "https://git.clicks.codes/";
+        };
+        merge.conflictstyle = "diff3";
+        trailer.ifexists = "addIfDifferent";
+      };
+    };
+  };
+}
+
+/* [alias]
+   	recommit = "!git commit --verbose -eF $(git rev-parse --git-dir)/COMMIT_EDITMSG"
+   	stash-working = "!f() { \
+   		git commit --quiet --no-verify -m \"temp for stash-working\" && \
+           	git stash push \"$@\" && \
+           	git reset --quiet --soft HEAD~1; \
+   	}; f"
+   	checkout-soft = "!f() { \
+   	   hash=$(git hash); \
+   	   git checkout \"$@\"; \
+   	   git reset --soft $hash; \
+   	}; f" # basically the opposite of a soft reset: change all the files but do not change the HEAD reference
+   	graph = "log --graph --oneline --decorate"
+   	fmt = "clang-format"
+   	hash = "rev-parse HEAD"
+   	fmt-last = "!f() { \
+   		hash=$(git hash); \
+   		git reset --soft HEAD^ && \
+   		git fmt; \
+   		git reset --soft $hash; \
+   	}; f"
+   	personal = "config user.email skyler3665@gmail.com"
+   	clicks = "config user.email minion@clicks.codes"
+   	collabora = "config user.email skyler.grey@collabora.com"
+   	# review = "!git-review -T": cannot be set here, set in .zshrc instead
+
+   [credential]
+   	helper = "store"
+
+   /*
+   [user]
+   	name = "Skyler Grey"
+   	signingkey = "7C868112B5390C5C"
+     useConfigOnly = true # avoid auto-setting user.email by hostname
+
+   [alias]
+   	recommit = "!git commit --verbose -eF $(git rev-parse --git-dir)/COMMIT_EDITMSG"
+   	stash-working = "!f() { \
+   		git commit --quiet --no-verify -m \"temp for stash-working\" && \
+           	git stash push \"$@\" && \
+           	git reset --quiet --soft HEAD~1; \
+   	}; f"
+   	checkout-soft = "!f() { \
+   	   hash=$(git hash); \
+   	   git checkout \"$@\"; \
+   	   git reset --soft $hash; \
+   	}; f" # basically the opposite of a soft reset: change all the files but do not change the HEAD reference
+   	graph = "log --graph --oneline --decorate"
+   	fmt = "clang-format"
+   	hash = "rev-parse HEAD"
+   	fmt-last = "!f() { \
+   		hash=$(git hash); \
+   		git reset --soft HEAD^ && \
+   		git fmt; \
+   		git reset --soft $hash; \
+   	}; f"
+   	personal = "config user.email skyler3665@gmail.com"
+   	clicks = "config user.email minion@clicks.codes"
+   	collabora = "config user.email skyler.grey@collabora.com"
+   	# review = "!git-review -T": cannot be set here, set in .zshrc instead
+
+   [init]
+   	defaultBranch = "main"
+
+   [color]
+   	ui = "auto"
+
+   [core]
+   	autocrlf = "input"
+   	splitIndex = true
+   	untrackedCache = true
+   	fsmonitor = true
+   	pager = "delta"
+
+   [pull]
+   	rebase = merges
+
+   [push]
+   	autoSetupRemote = true
+   	useForceIfIncludes = true
+   	gpgSign = if-asked
+
+   [credential]
+   	helper = "store"
+
+   [commit]
+   	gpgsign = true
+
+   [url "ssh://git@github.com/"]
+   	pushInsteadOf = "https://github.com/"
+
+   [interactive]
+   	diffFilter = "delta --color-only"
+
+   [delta]
+   	navigate = true
+   	light = false
+   	line-numbers = true
+   	features = "my-dark-theme zebra-dark"
+
+   [merge]
+   	conflictstyle = "diff3"
+
+   [diff]
+   	colorMoved = "default"
+
+   [trailer]
+   	ifexists = "addIfDifferent"
+*/