Add option to enable/disable git commit signing

This commit is contained in:
Jakob Lechner 2022-01-05 19:30:43 +00:00
parent 97472bd2bb
commit f2cd5e64ee
No known key found for this signature in database
GPG key ID: 996082EFB5906C10
4 changed files with 19 additions and 12 deletions

View file

@ -12,7 +12,7 @@
userEmail = nixosConfig.myConfig.git.user.email;
signing = {
key = nixosConfig.myConfig.gpg.defaultKey;
signByDefault = true;
signByDefault = nixosConfig.myConfig.git.signByDefault;
};
extraConfig = {
init.defaultBranch = "main";

View file

@ -2,15 +2,18 @@
{
options.myConfig = {
git.user = {
name = lib.mkOption {
type = lib.types.str;
description = "name to use for git commits";
};
email = lib.mkOption {
type = lib.types.str;
description = "email to use for git commits";
git = {
user = {
name = lib.mkOption {
type = lib.types.str;
description = "name to use for git commits";
};
email = lib.mkOption {
type = lib.types.str;
description = "email to use for git commits";
};
};
signByDefault = lib.mkEnableOption "GPG sign commits per default";
};
gpg.defaultKey = lib.mkOption {
type = lib.types.str;

View file

@ -11,6 +11,7 @@
name = "Jakob Lechner";
email = "jal@tradebyte.biz";
};
signByDefault = false;
};
gpg.defaultKey = "FE170812543DF81393EA56BA5042B8317A10617E";
};

View file

@ -6,9 +6,12 @@
];
myConfig = {
git.user = {
name = "Jakob Lechner";
email = "mail@jalr.de";
git = {
user = {
name = "Jakob Lechner";
email = "mail@jalr.de";
};
signByDefault = true;
};
gpg.defaultKey = "66FB54F6081375106EEBF651A222365EB448F934";
};