🚀 add git identity option

dev-docs
Moritz Böhme 2022-08-31 11:43:30 +02:00
parent e427f3cd56
commit 63e3bee66c
1 changed files with 12 additions and 2 deletions

View File

@ -20,6 +20,16 @@ in
type = types.bool; type = types.bool;
example = true; example = true;
}; };
identity = {
name = mkOption {
default = "Moritz Böhme";
type = types.str;
};
email = mkOption {
default = "mail@moritzboeh.me";
type = types.str;
};
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -38,8 +48,8 @@ in
home-manager.users.moritz = { home-manager.users.moritz = {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Moritz Böhme"; userName = cfg.identity.name;
userEmail = "mail@moritzboeh.me"; userEmail = cfg.identity.email;
extraConfig = { extraConfig = {
init.defaultBranch = "main"; init.defaultBranch = "main";
merge.conflictstyle = "diff3"; merge.conflictstyle = "diff3";