Make git username&email custom options

This commit is contained in:
ItsDrike 2024-04-05 02:03:22 +02:00
parent e121bf2c40
commit b58cf4604c
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
3 changed files with 18 additions and 3 deletions

View file

@ -13,8 +13,8 @@ in
enable = true;
package = pkgs.gitAndTools.gitFull;
userName = "ItsDrike";
userEmail = "itsdrike@protonmail.com";
userName = myGitConf.userName;
userEmail = myGitConf.userEmail;
signing = {
signByDefault = myGitConf.signing.enabled;

View file

@ -30,7 +30,11 @@
home-manager = {
enabled = true;
stateVersion = "23.11";
git.signing.key = "FA2745890B7048C0";
git = {
userName = "ItsDrike";
userEmail = "itsdrike@protonmail.com";
signing.key = "FA2745890B7048C0";
};
};
};
}

View file

@ -2,6 +2,17 @@
in
{
options.myOptions.home-manager.git = {
userName = mkOption {
type = types.str;
default = "";
description = "The default git user name.";
};
userEmail = mkOption {
type = types.str;
default = "";
description = "The default git user email.";
};
signing = {
enabled = mkOption {
type = types.bool;