First off, is the government moral in the first place? No. It is an institution that initiates force upon peaceful people, whether it's in the form of taxation (theft), enforcement of the law (battery/assault), or sending people to jail (kidnapping).
Now, most people's natural reaction to the question of whether or not it would be moral to work for an institution that initiates force upon peaceful people would be a curt "NO". That was also my reaction at first, but after analyzing the topic a bit more, I found the answer to be more complex...
Government jobs can be organized into three main categories, which I'll be calling "A jobs", "B jobs", and "C jobs":
A Jobs - These are your police officers, on-field military personnel, and any other position that initiates force against individuals directly. The salaries for these jobs consist of stolen money, as the money first had to be taxed.
B Jobs - Politicians, lawmakers, and any other individuals who give orders to initiate force, but don't actually initiate the force themselves. Once again, people who hold these jobs are receiving stolen money.
C Jobs - Librarians, astronauts, and various other individuals who do not initiate force, nor give the order to initiate force upon individuals. These jobs, as well, are paid using stolen money.
Now, here's the moral analysis for each individual job category:
A Jobs - These jobs are ABSOLUTELY immoral. Having a shiny badge or fancy costume does not grant anyone the moral authority to initiate force upon other people. Making the claim the officers/soldiers "were just following orders" is ALSO not a valid excuse for violent behavior! Officers and soldiers possess the free will to choose whether or not they wish to carry out their orders, and are under no obligation to anything immoral. Of course, using the logic applied to the Nuremberg Trails, the initiation of force on behalf of the government is only justifiable if the government would harm the officer/soldier for not enforcing it. (Choosing to comply with the threats of government, while not being immoral, could be still be considered cowardly, depending on the situation.)
B Jobs - Being a bit harder to analyze, these jobs turn out to be immoral, as well. Making the claim that, "The military leader wasn't responsible for the war deaths, because he merely said words" is like saying, "The gunman wasn't responsible for killing the man, because he merely applied pressure to a piece of metal!" Troops act as tools for a military leader, just as a gun acts as a tool for the gunman. It is morally reprehensible to use a tool, knowing full well that the effect of using that tool will result in violence being initiated.
**At this point, it's also worth mentioning that public school teachers fall under the category of "B Jobs". It would seem natural to put them as a C job, but after considering truancy laws, and how teachers are required to report students who don't show up to school, the job of a public school teacher definitely falls under the B job category.
C Jobs - Because this job doesn't directly initiate, nor give orders to initiate force, there is much online controversy about the ethics of C jobs. Some people say that receiving money from the state helps dilute its resources, resulting in LESS violence. Others say that taking money from the state only results in an increase in the demand for taxation, resulting MORE violence. At the end of the day, however, people who hold C jobs ARE receiving stolen money, no matter how it's looked at. Consider this analogy: If a random person came up to you, gave you $1000, and told you they stole it, would you give it back to the thief in order to remain morally upright? Most of us wouldn't, as doing that certainly wouldn't help the victim who was stolen from, and you, a morally upright individual, would certainly use the $1000 for a more virtuous purpose than what a thief would use it for. After choosing to keep the money, if you told your friends that a random person stole $1000 and gave it to you, would they be impressed with where the money came from? Most likely not. If you told your friends, on the other hand, that you received $1000 for winning a singing competition, would they be impressed now? Most likely, they would! After considering that analogy, it leads us to the conclusion that C jobs aren't immoral, but are just less honorable than one found in the free market.
Hopefully, this article helped clear up a few scattered thoughts on the topic of government-job morality. Please comment and questions or thoughts!
-- Galen Ross