flake/homes/modules/git.nix

74 lines
1.3 KiB
Nix
Executable file

{
config,
pkgs,
...
}: {
programs.git = {
enable = true;
lfs.enable = true;
userName = "_cry64";
userEmail = "them@dobutterfliescry.net";
signing = {
key = "F68745A836CA0412";
format = "openpgp";
signByDefault = true;
};
aliases = {
s = "status";
d = "diff";
l = "log";
c = "commit";
p = "push";
};
extraConfig = {
color.ui = true;
core.editor = "hx";
github.user = "cry128";
init = {
defaultBranch = "main";
};
url = {
"git@github.com:" = {
insteadOf = [
"gh:"
"github:"
];
};
"https://gitlab.com/" = {
insteadOf = [
"gl:"
"gitlab:"
];
};
"git@codeberg.org:" = {
insteadOf = [
"cb:"
"codeberg:"
];
};
"forgejo@forge.dobutterfliescry.net:2222/" = {
insteadOf = [
"cry:"
"forge:"
];
};
};
};
includes = [
{
path = "/home/me/agribit/.gitconfig";
condition = "gitdir:/home/me/agribit/**";
}
# {
# path = "/home/me/luminary/.gitconfig";
# condition = "gitdir:/home/me/luminary/**";
# }
];
};
}