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: {
"https://${domain}/".insteadOf = "${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 {
programs.git = {
enable = true;
userName = "jolheiser";
userEmail = "john.olheiser@gmail.com";
signing = {
signByDefault = true;
key = key;
};
userEmail = "git@jolheiser.com";
aliases = {
wt = "worktree";
ci = "commit -s -S -m";
@ -30,7 +38,9 @@ in {
};
lfs.enable = true;
ignores = [".idea/" "result" "node_modules" "ve"];
extraConfig = {
extraConfig =
{
commit.gpgsign = true;
init.defaultBranch = "main";
merge.conflictstyle = "zdiff3";
diff.colorMoved = "default";
@ -51,16 +61,10 @@ in {
// insteadOf "gt" "gitea.com"
// insteadOf "gl" "gitlab.com"
// insteadOf "cb" "codeberg.org";
};
delta = {
}
// sshSigning;
difftastic = {
enable = true;
options = {
features = "ctp-mocha";
navigate = true;
light = false;
line-numbers = true;
side-by-side = true;
};
};
includes = [
{

View File

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