🚀 add git identity option

This commit is contained in:
Moritz Böhme 2022-08-31 11:43:30 +02:00
parent e427f3cd56
commit 63e3bee66c

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";