Add additional git config
This commit is contained in:
parent
05e3b8b222
commit
bcc3ba0aee
1 changed files with 17 additions and 8 deletions
|
|
@ -18,6 +18,22 @@
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Git email";
|
description = "Git email";
|
||||||
};
|
};
|
||||||
|
additionalConfig = lib.mkOption {
|
||||||
|
default = {
|
||||||
|
merge = {
|
||||||
|
tool = "nvimdiff";
|
||||||
|
};
|
||||||
|
diff = {
|
||||||
|
tool = "nvimdiff";
|
||||||
|
};
|
||||||
|
pull.rebase = true;
|
||||||
|
};
|
||||||
|
example = {
|
||||||
|
pull.rebase = false;
|
||||||
|
};
|
||||||
|
type = with lib.types; attrsOf anything;
|
||||||
|
description = "Additional git config";
|
||||||
|
};
|
||||||
sshConfig = lib.mkOption {
|
sshConfig = lib.mkOption {
|
||||||
default = ''
|
default = ''
|
||||||
Host github.com
|
Host github.com
|
||||||
|
|
@ -53,14 +69,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = config.mods.git.username;
|
userName = config.mods.git.username;
|
||||||
userEmail = config.mods.git.email;
|
userEmail = config.mods.git.email;
|
||||||
extraConfig = {
|
extraConfig = config.mods.git.additionalConfig;
|
||||||
merge = {
|
|
||||||
tool = "nvimdiff";
|
|
||||||
};
|
|
||||||
diff = {
|
|
||||||
tool = "nvimdiff";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
home.file.".ssh/config".text = config.mods.git.sshConfig;
|
home.file.".ssh/config".text = config.mods.git.sshConfig;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue