Install gpg-agent and activate git commit signing

This commit is contained in:
fleaz 2022-03-03 17:10:43 +01:00
parent d8f7b8bbc2
commit 3d056c581b
No known key found for this signature in database
GPG key ID: AED15F8FDD04D083
3 changed files with 32 additions and 1 deletions

View file

@ -15,6 +15,7 @@ in
modules/vscode.nix modules/vscode.nix
modules/sway.nix modules/sway.nix
modules/git.nix modules/git.nix
modules/gpg.nix
] ++ lib.optionals (config.networking.hostName == "jimbo") [ ] ++ lib.optionals (config.networking.hostName == "jimbo") [
modules/kanshi.nix modules/kanshi.nix
]; ];

View file

@ -1,12 +1,29 @@
{ {
programs.git = { programs.git = {
enable = true; enable = true;
ignores = [ ".vscode" ]; ignores = [
".vscode"
"*.sql"
"*.sql.gz"
"*.sql.zst"
];
userName = "fleaz"; userName = "fleaz";
userEmail = "mail@felixbreidenstein.de"; userEmail = "mail@felixbreidenstein.de";
signing = {
key = "9166FF9DFC1F4637";
signByDefault = true;
};
extraConfig = {
"init" = {
defaultBranch = "main";
};
};
aliases = { aliases = {
cpr = "!f() { git fetch origin refs/pull/$1/head && git checkout FETCH_HEAD; }; f"; cpr = "!f() { git fetch origin refs/pull/$1/head && git checkout FETCH_HEAD; }; f";
}; };
includes = [{ includes = [{
condition = "gitdir:~/codemonauts/"; condition = "gitdir:~/codemonauts/";
contents = { contents = {
@ -14,6 +31,9 @@
email = "felix@codemonauts.com"; email = "felix@codemonauts.com";
name = "Felix Breidenstein"; name = "Felix Breidenstein";
}; };
commit = {
gpgSign = false;
};
}; };
} }
{ {
@ -23,6 +43,9 @@
email = "felix@codemonauts.com"; email = "felix@codemonauts.com";
name = "Felix Breidenstein"; name = "Felix Breidenstein";
}; };
commit = {
gpgSign = false;
};
}; };
}]; }];
}; };

View file

@ -0,0 +1,7 @@
{
services.gpg-agent = {
enable = true;
pinentryFlavor = "gtk2";
};
}