Legality of contract voiding child support

In NC, if a single woman wants to have a baby and enters into an agreement/contract with a partner that states:

Upon conceiving or getting pregnant the mother voids all rights to ever seek child support against father. Both parties consent!

Would this type of contract be valid in Family Court? Would the contract hold up in court?

No, this contract would not be valid and would not hold up or be enforced in court. A separation agreement cannot prevent the state from protecting the welfare of its minor children.