feat: ssh signing

Signed-off-by: jolheiser <john.olheiser@gmail.com>
homepage
jolheiser 2024-07-10 10:48:54 -05:00 committed by jolheiser
parent 2b9b540574
commit f66a3fe2f3
No known key found for this signature in database
2 changed files with 42 additions and 38 deletions

View File

@ -1,18 +1,26 @@
{config, ...}: let {
key = "0xB853ADA5DA7BBF7A"; pkgs,
config,
...
}: let
insteadOf = prefix: domain: { insteadOf = prefix: domain: {
"https://${domain}/".insteadOf = "${prefix}:"; "https://${domain}/".insteadOf = "${prefix}:";
"git@${domain}:".insteadOf = "ssh:${prefix}:"; "git@${domain}:".insteadOf = "ssh:${prefix}:";
}; };
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAUxLwkJOlalAHTdkbh+m49XTZGKDqWz1o/o8OLmtQdX";
sshSigning = {
commit.gpgsign = true;
user.signingkey = key;
gpg = {
format = "ssh";
ssh.allowedSignersFile = "${pkgs.writeText "allowedSigners" "git@jolheiser.com ${key}"}";
};
};
in { in {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "jolheiser"; userName = "jolheiser";
userEmail = "john.olheiser@gmail.com"; userEmail = "git@jolheiser.com";
signing = {
signByDefault = true;
key = key;
};
aliases = { aliases = {
wt = "worktree"; wt = "worktree";
ci = "commit -s -S -m"; ci = "commit -s -S -m";
@ -30,37 +38,33 @@ in {
}; };
lfs.enable = true; lfs.enable = true;
ignores = [".idea/" "result" "node_modules" "ve"]; ignores = [".idea/" "result" "node_modules" "ve"];
extraConfig = { extraConfig =
init.defaultBranch = "main"; {
merge.conflictstyle = "zdiff3"; commit.gpgsign = true;
diff.colorMoved = "default"; init.defaultBranch = "main";
core.editor = "hx"; merge.conflictstyle = "zdiff3";
push = { diff.colorMoved = "default";
sutoSetupRemote = true; core.editor = "hx";
default = "current"; push = {
gpgSign = "if-asked"; sutoSetupRemote = true;
}; default = "current";
rerere.enabled = true; gpgSign = "if-asked";
pull.rebase = true; };
diff.algorithm = "histogram"; rerere.enabled = true;
merge.tool = "hx"; pull.rebase = true;
url = diff.algorithm = "histogram";
insteadOf "jo" "git.jolheiser.com" merge.tool = "hx";
// insteadOf "gh" "github.com" url =
// insteadOf "jj" "git.jojodev.com" insteadOf "jo" "git.jolheiser.com"
// insteadOf "gt" "gitea.com" // insteadOf "gh" "github.com"
// insteadOf "gl" "gitlab.com" // insteadOf "jj" "git.jojodev.com"
// insteadOf "cb" "codeberg.org"; // insteadOf "gt" "gitea.com"
}; // insteadOf "gl" "gitlab.com"
delta = { // insteadOf "cb" "codeberg.org";
}
// sshSigning;
difftastic = {
enable = true; enable = true;
options = {
features = "ctp-mocha";
navigate = true;
light = false;
line-numbers = true;
side-by-side = true;
};
}; };
includes = [ includes = [
{ {

View File

@ -4,7 +4,7 @@
settings = { settings = {
user = { user = {
name = "jolheiser"; name = "jolheiser";
email = "john@jolheiser.com"; email = "git@jolheiser.com";
}; };
ui = { ui = {
diff.tool = ["${pkgs.difftastic}/bin/difft" "--color=always" "$left" "$right"]; diff.tool = ["${pkgs.difftastic}/bin/difft" "--color=always" "$left" "$right"];