2023-07-09 16:40:37 +00:00
|
|
|
{config, ...}: let
|
2023-07-06 19:32:19 +00:00
|
|
|
key = "0xB853ADA5DA7BBF7A";
|
2023-07-13 20:35:19 +00:00
|
|
|
insteadOf = prefix: domain: {
|
|
|
|
"https://${domain}/".insteadOf = "${prefix}:";
|
|
|
|
"git@${domain}:".insteadOf = "ssh:${prefix}:";
|
|
|
|
};
|
2023-06-28 20:48:01 +00:00
|
|
|
in {
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
userName = "jolheiser";
|
|
|
|
userEmail = "john.olheiser@gmail.com";
|
|
|
|
signing = {
|
|
|
|
signByDefault = true;
|
|
|
|
key = key;
|
|
|
|
};
|
|
|
|
aliases = {
|
|
|
|
wt = "worktree";
|
|
|
|
ci = "commit -s -S -m";
|
|
|
|
br = "branch";
|
|
|
|
aa = "add .";
|
|
|
|
adog = "log --all --decorate --oneline --graph";
|
|
|
|
poh = "push origin HEAD";
|
|
|
|
cb = "checkout -b";
|
|
|
|
fu = "fetch upstream";
|
|
|
|
fo = "fetch origin";
|
2023-07-13 20:35:19 +00:00
|
|
|
dh = "diff HEAD";
|
2023-08-23 20:26:56 +00:00
|
|
|
unstage = "restore --staged";
|
2024-01-11 15:04:50 +00:00
|
|
|
last = "log --show-signature --format=fuller --max-count=1 HEAD";
|
2023-08-07 17:33:41 +00:00
|
|
|
tui = "!lazygit";
|
2023-06-28 20:48:01 +00:00
|
|
|
};
|
2023-07-09 18:05:01 +00:00
|
|
|
lfs.enable = true;
|
2024-02-17 22:29:14 +00:00
|
|
|
ignores = [".idea/" "result" "node_modules" "ve"];
|
2023-06-28 20:48:01 +00:00
|
|
|
extraConfig = {
|
|
|
|
init.defaultBranch = "main";
|
2024-02-17 22:29:14 +00:00
|
|
|
merge.conflictstyle = "zdiff3";
|
2023-06-28 20:48:01 +00:00
|
|
|
diff.colorMoved = "default";
|
2023-07-03 01:55:05 +00:00
|
|
|
core.editor = "hx";
|
2023-07-13 20:35:19 +00:00
|
|
|
push = {
|
2023-11-26 20:33:57 +00:00
|
|
|
sutoSetupRemote = true;
|
2023-07-13 20:35:19 +00:00
|
|
|
default = "current";
|
|
|
|
gpgSign = "if-asked";
|
|
|
|
};
|
2024-02-17 22:29:14 +00:00
|
|
|
rerere.enabled = true;
|
2023-08-03 00:56:50 +00:00
|
|
|
pull.rebase = true;
|
2024-02-17 22:29:14 +00:00
|
|
|
diff.algorithm = "histogram";
|
|
|
|
merge.tool = "hx";
|
2023-07-13 20:35:19 +00:00
|
|
|
url =
|
2024-03-08 02:37:46 +00:00
|
|
|
insteadOf "jo" "git.jolheiser.com"
|
2024-01-15 23:58:05 +00:00
|
|
|
// insteadOf "gh" "github.com"
|
2023-07-23 16:55:16 +00:00
|
|
|
// insteadOf "jj" "git.jojodev.com"
|
|
|
|
// insteadOf "gt" "gitea.com"
|
|
|
|
// insteadOf "gl" "gitlab.com"
|
|
|
|
// insteadOf "cb" "codeberg.org";
|
2023-06-28 20:48:01 +00:00
|
|
|
};
|
|
|
|
delta = {
|
|
|
|
enable = true;
|
|
|
|
options = {
|
|
|
|
features = "ctp-mocha";
|
|
|
|
navigate = true;
|
|
|
|
light = false;
|
|
|
|
line-numbers = true;
|
|
|
|
side-by-side = true;
|
|
|
|
};
|
|
|
|
};
|
2023-07-07 16:20:01 +00:00
|
|
|
includes = [
|
2023-12-06 03:26:23 +00:00
|
|
|
{
|
2024-04-04 21:45:49 +00:00
|
|
|
path = config.age.secrets.git-send-email.path;
|
2023-12-06 03:26:23 +00:00
|
|
|
}
|
2023-07-07 16:20:01 +00:00
|
|
|
];
|
2023-06-28 20:48:01 +00:00
|
|
|
};
|
|
|
|
}
|