Legally the departments you are interested in can not take bankruptcy into consideration when deciding to hire you. They can take your actions leading to the bankruptcy into consideration. So if you were out parting every night, buying new cars every other day and living the high life then it looks bad. If, however your spouse was diagnosed with some rare form of cancer that cost millions of dollars to cure, resulting in bankruptcy, it is looked at much differently. You can see the difference in circumstances and how one would look much worse than the other.
I declared bankruptcy several years ago and since then have obtained two respected jobs requiring a federal security clearance, one within law enforcement. Both jobs were obtained within two years of the discharge.
Only you know your situation and what is best for you. You can live the life of a hermit, or you can choose to file bankruptcy and have a healthy life. You can still cut your cable, cell phone and all of the other extras and still file bankruptcy. Personally I chose chapter 13, so I had to pay back at least a portion of what I owed. There is nothing barring you from paying extra, but it is not required and I would consult a lawyer before doing anything.
But when a long train of abuses and usurpations, pursuing invariably the same object, evinces a design to reduce them under absolute Despotism, it is their right, it is their duty, to throw off such Government, and to provide new guards for their future security.
Translation for the intellectually challenged: If the government screws the people too much, it is the right and duty of the people to revolt and form a new government.