#6 trying to sign commits

This commit is contained in:
Christoph Hollizeck 2024-04-07 16:12:04 +02:00
parent 579a4a985e
commit c913825739
No known key found for this signature in database
GPG key ID: A8185688CDE3921F
7 changed files with 117 additions and 11 deletions

View file

@ -16,6 +16,8 @@ in
enable = mkBoolOpt true "Enable Git (Default true)";
userName = mkOpt types.str user.fullName "The name to configure git with.";
userEmail = mkOpt types.str user.email "The email to configure git with.";
signingKey = mkOpt types.str "A8185688CDE3921F" "The key ID to sign commits with.";
signByDefault = mkOpt types.bool true "Whether to sign commits by default.";
};
config = mkIf cfg.enable {
@ -23,6 +25,10 @@ in
enable = true;
inherit (cfg) userName userEmail;
lfs = enabled;
signing = {
key = cfg.signingKey;
inherit (cfg) signByDefault;
};
extraConfig = {
init = {
defaultBranch = "main";
@ -33,6 +39,9 @@ in
push = {
autoSetupRemote = true;
};
safe = {
directory = "${user.home}/projects/config";
};
};
};
};