Unless the terms of the NDA are provided upfront, that sounds sketch AF.
"I agree to follow unspecified terms in perpetuity, or return the pay I already earned" doesn't vibe with labor laws.
And if those NDA terms were already in the contract, there would be no need to sign them upon exit.