🚀 add git identity option
This commit is contained in:
parent
e427f3cd56
commit
63e3bee66c
1 changed files with 12 additions and 2 deletions
|
@ -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";
|
||||||
|
|
Loading…
Reference in a new issue