Chris Brown My Daughter Gets My Last Name And I Get Her ... Sometimes

9/28/2015 1:27 PM PDT BY TMZ STAFF

0928-chris-brown-nia-guzman-TMZ-INSTAGRAM-01Chris Brown and his baby mama Nia Guzman have settled their custody war, right down to the official name of their child.

Sources connected with the case tell us, Chris and Nia have agreed to joint physical and legal custody. He'll get their 1-year-old 12 days out of the month, and there will be no supervised visitation. 

As for the baby's name ... they've agreed she's Royalty Brown -- no middle name.

And we're told Chris will pay Nia $2,500 a month. He's also paying her $15k in back support.

Chris also has to pay for Royalty's schooling, health insurance, medical bills and nannies.

And we're told the drug test Chris submitted to during the custody hearing has come back positive for both weed and codeine, but we're told he had a prescription for both.

The settlement is subject to a judge's approval.