I know that this is more in theory than anything else, but I think that the standard answer is No. I could see it varying by state and dept though.
Judges and prosecutors normally I believe are 100% not a chance at it.
Public Defenders tend to have side operations be actually encouraged since their pay is too low to survive on by itself (even compared to fast food workers if we are talking in fly over state area with counties of under a thousand people in them)
As for other govt stuff......I dunno. Ask the boss man.
But if you are saying you wouldn't do govt work BUT FOR being able to be private. Don't do it at all. Most pay pretty good too $70K-$120K