Where to configure default git branch name

I have configured the default branch name with:

programs.git.configExtra = ''
[init]
defaultBranch = main
'';

However, every time I recompile my home manager config it gives me this error:

trace: warning: Using programs.git.extraConfig as a string option is
deprecated and will be removed in the future. Please
change to using it as an attribute set instead.

My question is where should I config this?
I know the attributes can be found in the man page, but I do not know which specific attribute to configure.

It’s as simple as using

programs.git.configExtra = {
init.defaultBranch = main
}

instead

Thank you. This worked when I put main in double quotes.

programs.git.configExtra = {
  init.defaultBranch = "main";
};