Add additional git config

This commit is contained in:
DashieTM 2024-11-17 13:49:28 +01:00
parent 05e3b8b222
commit bcc3ba0aee

View file

@ -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;
} }