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;
in
{
programs.ssh.matchBlocks = extendedLib.attrsets.concatAttrs [
programs.ssh.matchBlocks = (extendedLib.attrsets.concatAttrs [
(convertMachinesWith convertNormalMachine normalMachines)
(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";
};
safe.directory = "*";
rerere.enabled = true;
branch.sort = "-committerdate";
@ -50,9 +52,25 @@
color.ui = "auto";
init.defaultBranch = "main";
fetch.prune = true;
fetch = {
prune = true;
fsckObjects = true;
};
transfer.fsckObjects = true;
receive.fsckObjects = true;
pull.rebase = true;
rebase = {
autoStash = true;
autoSquash = true;
abbreviateCommands = true;
updateRefs = true;
};
push = {
default = "current";
autoSetupRemote = true;
@ -72,8 +90,19 @@
mnemonicPrefix = true;
renames = true;
tool = "nvimdiff";
submodule = "log";
};
status = {
showUntrackedFiles = "all";
relativePaths = true;
submoduleSummary = true;
};
log.date = "iso";
submodule.recurse = true;
grep = {
break = true;
heading= true;
@ -81,10 +110,25 @@
extendedRegexp = true;
};
# Run autocorrected command after 3 seconds
help.autocorrect = "30";
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";