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; enable = true;
package = pkgs.gitAndTools.gitFull; package = pkgs.gitAndTools.gitFull;
userName = "ItsDrike"; userName = myGitConf.userName;
userEmail = "itsdrike@protonmail.com"; userEmail = myGitConf.userEmail;
signing = { signing = {
signByDefault = myGitConf.signing.enabled; signByDefault = myGitConf.signing.enabled;

View file

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

View file

@ -2,6 +2,17 @@
in in
{ {
options.myOptions.home-manager.git = { 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 = { signing = {
enabled = mkOption { enabled = mkOption {
type = types.bool; type = types.bool;