2023-09-12 08:44:05 -06:00
|
|
|
{ config, ... }:
|
|
|
|
let
|
2023-07-11 09:12:50 -06:00
|
|
|
rewriteGitHub =
|
2024-02-18 12:23:08 -07:00
|
|
|
if config.networking.hostName != "stan" then
|
|
|
|
{
|
|
|
|
url = {
|
|
|
|
"ssh://git@github.com/" = {
|
|
|
|
insteadOf = "https://github.com/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ url = { }; };
|
2023-09-12 08:44:05 -06:00
|
|
|
in
|
|
|
|
{
|
2022-08-25 12:21:35 -06:00
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
lfs.enable = true;
|
2023-06-13 14:32:00 -06:00
|
|
|
config = [
|
2024-02-18 12:23:08 -07:00
|
|
|
{
|
|
|
|
init = {
|
|
|
|
defaultBranch = "main";
|
|
|
|
};
|
|
|
|
}
|
2023-09-12 08:44:05 -06:00
|
|
|
{ advice.detachedHead = false; }
|
2022-12-20 19:35:36 -07:00
|
|
|
{
|
|
|
|
user = {
|
|
|
|
name = "Aaron Bieber";
|
|
|
|
email = "aaron@bolddaemon.com";
|
2023-11-15 17:19:01 -07:00
|
|
|
signingKey = "key::ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOA5iEi4IxSIHXBMdrRlBWHbGtmMNnmBl4qiBPc+eJu9 signer";
|
2022-12-20 19:35:36 -07:00
|
|
|
};
|
|
|
|
}
|
2022-08-25 12:21:35 -06:00
|
|
|
|
2024-02-18 12:23:08 -07:00
|
|
|
{
|
|
|
|
branch = {
|
|
|
|
sort = "-committerdate";
|
|
|
|
};
|
|
|
|
}
|
2022-12-20 19:35:36 -07:00
|
|
|
{
|
|
|
|
alias = {
|
|
|
|
log = "log --color=never";
|
|
|
|
diff = "diff --color=always";
|
|
|
|
pr = ''"!f() { git fetch-pr upstream $1; git checkout pr/$1; }; f"'';
|
2024-02-18 12:23:08 -07:00
|
|
|
fetch-pr = ''"!f() { git fetch $1 refs/pull/$2/head:refs/remotes/pr/$2; }; f"'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
push = {
|
|
|
|
default = "current";
|
2022-12-20 19:35:36 -07:00
|
|
|
};
|
|
|
|
}
|
2022-08-25 12:21:35 -06:00
|
|
|
|
2024-02-18 12:23:08 -07:00
|
|
|
{
|
|
|
|
gpg = {
|
|
|
|
format = "ssh";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
commit = {
|
|
|
|
gpgsign = true;
|
|
|
|
};
|
|
|
|
}
|
2022-08-25 12:21:35 -06:00
|
|
|
|
2022-12-20 19:35:36 -07:00
|
|
|
{
|
|
|
|
color = {
|
|
|
|
branch = false;
|
|
|
|
interactive = false;
|
|
|
|
log = false;
|
|
|
|
status = false;
|
|
|
|
ui = false;
|
|
|
|
};
|
|
|
|
}
|
2022-08-25 12:21:35 -06:00
|
|
|
|
2024-02-18 12:23:08 -07:00
|
|
|
{
|
|
|
|
safe = {
|
|
|
|
directory = "/home/qbit/src/nix-conf";
|
|
|
|
};
|
|
|
|
}
|
2022-08-25 12:21:35 -06:00
|
|
|
|
2024-02-18 12:23:08 -07:00
|
|
|
{
|
|
|
|
transfer = {
|
|
|
|
fsckobjects = true;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
fetch = {
|
|
|
|
fsckobjects = true;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
github = {
|
|
|
|
user = "qbit";
|
|
|
|
};
|
|
|
|
}
|
2022-08-25 12:21:35 -06:00
|
|
|
|
2023-09-12 08:44:05 -06:00
|
|
|
{ inherit (rewriteGitHub) url; }
|
2022-08-25 12:21:35 -06:00
|
|
|
|
2022-12-20 19:35:36 -07:00
|
|
|
{
|
2023-11-03 08:47:39 -06:00
|
|
|
sendemail = {
|
2022-12-20 19:35:36 -07:00
|
|
|
smtpserver = "mail.messagingengine.com";
|
|
|
|
smtpuser = "qbit@fastmail.com";
|
|
|
|
smtpauth = "PLAIN";
|
|
|
|
smtpencryption = "tls";
|
|
|
|
smtpserverport = 587;
|
2023-11-03 08:47:39 -06:00
|
|
|
cc = "git@bolddaemon.com";
|
2022-12-20 19:35:36 -07:00
|
|
|
confirm = "auto";
|
|
|
|
};
|
|
|
|
}
|
2022-08-25 12:21:35 -06:00
|
|
|
|
2024-02-18 12:23:08 -07:00
|
|
|
{
|
|
|
|
pull = {
|
|
|
|
rebase = false;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
include = {
|
|
|
|
path = "~/work/git/gitconfig";
|
|
|
|
};
|
|
|
|
}
|
2023-06-13 14:32:00 -06:00
|
|
|
];
|
2022-08-25 12:21:35 -06:00
|
|
|
};
|
|
|
|
}
|