configs/git: update config to use list of attrs to preserve order

This commit is contained in:
Aaron Bieber 2022-12-20 19:35:36 -07:00
parent 3f92b0f7ce
commit 4ae2e7e936
No known key found for this signature in database
3 changed files with 66 additions and 59 deletions

View File

@ -4,66 +4,72 @@
programs.git = {
enable = true;
lfs.enable = true;
config = {
init = { defaultBranch = "main"; };
config = [
{ init = { defaultBranch = "main"; }; }
user = {
name = "Aaron Bieber";
email = "aaron@bolddaemon.com";
signingKey = if isUnstable then
"key::sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIHrYWbbgBkGcOntDqdMaWVZ9xn+dHM+Ap6s1HSAalL28AAAACHNzaDptYWlu"
else
"35863350BFEAC101DB1A4AF01F81112D62A9ADCE";
};
{
user = {
name = "Aaron Bieber";
email = "aaron@bolddaemon.com";
signingKey = if isUnstable then
"key::sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIHrYWbbgBkGcOntDqdMaWVZ9xn+dHM+Ap6s1HSAalL28AAAACHNzaDptYWlu"
else
"35863350BFEAC101DB1A4AF01F81112D62A9ADCE";
};
}
branch = { sort = "-committerdate"; };
alias = {
log = "log --color=never";
diff = "diff --color=always";
pr = ''"!f() { git fetch-pr upstream $1; git checkout pr/$1; }; f"'';
fetch-pr =
''"!f() { git fetch $1 refs/pull/$2/head:refs/remotes/pr/$2; }; f"'';
};
push = { default = "current"; };
{ branch = { sort = "-committerdate"; }; }
{
alias = {
log = "log --color=never";
diff = "diff --color=always";
pr = ''"!f() { git fetch-pr upstream $1; git checkout pr/$1; }; f"'';
fetch-pr = ''
"!f() { git fetch $1 refs/pull/$2/head:refs/remotes/pr/$2; }; f"'';
};
}
{ push = { default = "current"; }; }
gpg = if isUnstable then { format = "ssh"; } else { };
commit = if isUnstable then { gpgsign = true; } else { };
{ gpg = if isUnstable then { format = "ssh"; } else { }; }
{ commit = if isUnstable then { gpgsign = true; } else { }; }
color = {
branch = false;
interactive = false;
log = false;
status = false;
ui = false;
};
{
color = {
branch = false;
interactive = false;
log = false;
status = false;
ui = false;
};
}
safe = { directory = "/home/qbit/src/nix-conf"; };
{ safe = { directory = "/home/qbit/src/nix-conf"; }; }
transfer = { fsckobjects = true; };
fetch = { fsckobjects = true; };
github = { user = "qbit"; };
{ transfer = { fsckobjects = true; }; }
{ fetch = { fsckobjects = true; }; }
{ github = { user = "qbit"; }; }
url = {
"ssh://git@github.com/" = { insteadOf = "https://github.com/"; };
};
{
url = {
"ssh://git@github.com/" = { insteadOf = "https://github.com/"; };
};
}
sendmail = {
smtpserver = "mail.messagingengine.com";
smtpuser = "qbit@fastmail.com";
smtpauth = "PLAIN";
smtpencryption = "tls";
smtpserverport = 587;
cc = "aaron@bolddaemon.com";
confirm = "auto";
};
{
sendmail = {
smtpserver = "mail.messagingengine.com";
smtpuser = "qbit@fastmail.com";
smtpauth = "PLAIN";
smtpencryption = "tls";
smtpserverport = 587;
cc = "aaron@bolddaemon.com";
confirm = "auto";
};
}
pull = { rebase = false; };
};
extraConfig = ''
[include]
path = ~/work/git/gitconfig
'';
{ pull = { rebase = false; }; }
{ include = { path = "~/work/git/gitconfig"; }; }
];
};
}

8
flake.lock generated
View File

@ -487,17 +487,17 @@
},
"xinDev": {
"locked": {
"lastModified": 1671573752,
"narHash": "sha256-ZKWE45bhj/6DSaDL7+/kHNIycYDn2g5qLY1VeK+89cc=",
"lastModified": 1671589301,
"narHash": "sha256-A9kIPTeI5gM2NsOrT3V2egYLJQT7Zzx+/j6sgcXCNo0=",
"owner": "qbit",
"repo": "nixpkgs",
"rev": "13ff4b1299d5d76c83854f571463deb89f5c0954",
"rev": "f9f4444cdf01270c5e463e84e02cc225d8208476",
"type": "github"
},
"original": {
"owner": "qbit",
"repo": "nixpkgs",
"rev": "13ff4b1299d5d76c83854f571463deb89f5c0954",
"rev": "f9f4444cdf01270c5e463e84e02cc225d8208476",
"type": "github"
}
},

View File

@ -6,7 +6,7 @@
url = "git+ssh://xin-secrets-ro/qbit/xin-secrets.git?ref=main";
};
xinDev.url = "github:qbit/nixpkgs/13ff4b1299d5d76c83854f571463deb89f5c0954";
xinDev.url = "github:qbit/nixpkgs/f9f4444cdf01270c5e463e84e02cc225d8208476";
unstable.url = "github:NixOS/nixpkgs";
unstableSmall.url = "github:NixOS/nixpkgs/nixos-unstable-small";
@ -74,9 +74,10 @@
};
};
outputs = { self, xinDev, unstable, unstableSmall, stable, oldStable, nixos-hardware
, reform, sshKnownHosts, microca, gostart, xintray, tsvnstat, taskobs
, mcchunkie, gqrss, darwin, xin-secrets, talon, peerix, ... }@inputs:
outputs = { self, xinDev, unstable, unstableSmall, stable, oldStable
, nixos-hardware, reform, sshKnownHosts, microca, gostart, xintray, tsvnstat
, taskobs, mcchunkie, gqrss, darwin, xin-secrets, talon, peerix, ...
}@inputs:
let
supportedSystems =
[ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];