1
0
Fork 0

fix(git): update from extraConfig to settings

This commit is contained in:
Philipp 2025-12-04 18:04:52 +01:00
parent d6f5f140d3
commit d187b96054
Signed by: Philipp
GPG key ID: B27C3DE2FD94AFC3

View file

@ -13,24 +13,28 @@ let
user = config.${namespace}.user;
in
{
options.${namespace}.tools.git = {
enable = mkEnableOption "Git";
userName = mkOpt types.str "Philipp" "The name to configure git with.";
userEmail = mkOpt types.str "philipp@boehm.sh" "The email to configure git with.";
signingKey = mkOpt types.str "0F21E3C3" "The key ID to sign commits with.";
signByDefault = mkOpt types.bool true "Whether to sign commits by default.";
options.${namespace} = {
tools.git = {
enable = mkEnableOption "Git";
signingKey = mkOpt types.str "0F21E3C3" "The key ID to sign commits with.";
signByDefault = mkOpt types.bool true "Whether to sign commits by default.";
};
user = {
name = mkOpt types.str "Philipp" "The name to configure git with.";
email = mkOpt types.str "philipp@boehm.sh" "The email to configure git with.";
};
};
config = mkIf cfg.enable {
programs.git = {
enable = true;
inherit (cfg) userName userEmail;
lfs = enabled;
signing = {
key = cfg.signingKey;
inherit (cfg) signByDefault;
};
extraConfig = {
settings = {
inherit user;
init = {
defaultBranch = "main";
};