home/git: set some more configuration

This commit is contained in:
Oystein Kristoffer Tveit 2024-07-03 23:10:51 +02:00
parent 01a3ce9b83
commit aed71f1d7b
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
2 changed files with 54 additions and 4 deletions

View File

@ -88,8 +88,14 @@ let
machines: pipe machines pipeline; machines: pipe machines pipeline;
in in
{ {
programs.ssh.matchBlocks = extendedLib.attrsets.concatAttrs [ programs.ssh.matchBlocks = (extendedLib.attrsets.concatAttrs [
(convertMachinesWith convertNormalMachine normalMachines) (convertMachinesWith convertNormalMachine normalMachines)
(convertMachinesWith convertAdminMachine rootMachines) (convertMachinesWith convertAdminMachine rootMachines)
]; ]) // {
"pvv-git git.pvv.ntnu.no" = {
hostname = "git.pvv.ntnu.no";
user = "gitea";
port = 2222;
};
};
} }

View File

@ -42,6 +42,8 @@
editor = "nvim"; editor = "nvim";
}; };
safe.directory = "*";
rerere.enabled = true; rerere.enabled = true;
branch.sort = "-committerdate"; branch.sort = "-committerdate";
@ -50,9 +52,25 @@
color.ui = "auto"; color.ui = "auto";
init.defaultBranch = "main"; init.defaultBranch = "main";
fetch.prune = true;
fetch = {
prune = true;
fsckObjects = true;
};
transfer.fsckObjects = true;
receive.fsckObjects = true;
pull.rebase = true; pull.rebase = true;
rebase = {
autoStash = true;
autoSquash = true;
abbreviateCommands = true;
updateRefs = true;
};
push = { push = {
default = "current"; default = "current";
autoSetupRemote = true; autoSetupRemote = true;
@ -72,8 +90,19 @@
mnemonicPrefix = true; mnemonicPrefix = true;
renames = true; renames = true;
tool = "nvimdiff"; tool = "nvimdiff";
submodule = "log";
}; };
status = {
showUntrackedFiles = "all";
relativePaths = true;
submoduleSummary = true;
};
log.date = "iso";
submodule.recurse = true;
grep = { grep = {
break = true; break = true;
heading= true; heading= true;
@ -81,10 +110,25 @@
extendedRegexp = true; extendedRegexp = true;
}; };
# Run autocorrected command after 3 seconds
help.autocorrect = "30";
github.user = "h7x4"; github.user = "h7x4";
"url \"github:\"".insteadOf = "https://github.com/"; "url \"github:\"".insteadOf = [
"https://github.com/"
"ssh://git@github.com:"
"git@github.com:"
"github.com:"
];
"url \"pvv-git:\"".insteadOf = [
"https://git.pvv.org/"
"ssh://gitea@git.pvv.ntnu.no:2222/"
"gitea@git.pvv.ntnu.no:2222/"
"gitea@git.pvv.ntnu.no:"
"git.pvv.ntnu.no:"
];
web.browser = "google-chrome-stable"; web.browser = "google-chrome-stable";