If not connecting directly to Nice and staying a couple of days in Paris, as others said, take the TGV. I've done this route and it is long but not too bad for a train ride. However, if you are going straight to Nice, I would say take the flight. If you are not traveling on the same ticket, just ensure to give yourself a lot of time between flights. CDG is not an easy airport to transit.