Well the nuclear-powered submarines and aircraft carriers have power plants, and a few military bases used to be powered with nuclear (Camp Century, Ft. Greenly, McMurdo Station). But your point is reasonable. We'd be able to counterattack militarily, but it still would not be a happy day, nor a lasting integrity.
FYI, Eielson AFB in Alaska has a coal plant and is working on an experimental nuclear microreactor installation, the first of its kind that the military plans to expand to other bases.
That's where Article 90 of the UCMJ comes into play,
Any person subject to this chapter who willfully disobeys a lawful command of that person’s superior commissioned officer shall be punished—
(1) if the offense is committed in time of war, by death or such other punishment as a court-martial may direct; and
(2) if the offense is committed at any other time, by such punishment, other than death, as a court-martial may direct.The UCMJ works great when you can shame a soldier, have a Justice system to rely on, can seize assets or pay, have superiors in other states, and so forth. When it’s pandemonium everywhere… not much to keep it enforced especially when it gets really bad. The system works when a solider has something to lose… but when soldiers feel they have nothing to lose, heck, risk starving and actually losing more by staying…
I mean, it's possible to win, but it requires 10-20 years and having quite a bit of your country destroyed (and possibly a couple countries near yours). Or at least, that's what's required when you can broadcast what's going on to the populace to turn them against the war. What it takes to defeat the US military when the populace can't communicate electronically is actually much more poorly defined.
This is really only a good strategy for countries with low-levels of infrastructure and a ruling faction with a strong ideological commitment against the US. So, places like Vietnam and Afghanistan.
Also, there's a decent stockpile of food for feeding the soldiers (and probably their families, although someone else might be able to speak to that better).
As far as I know, military bases don’t have their own nuclear reactors or coal plants.
EDIT: Apparently the DoD requires diesel backup with enough fuel to last… “one to two weeks.” Meh… if I’m an EMP-empowered nation who hates the US, the grid looks tempting… sure, they can counterattack, but if you make investigating difficult and spread enough pandemonium… all you need to do is keep the government haphazardly distracted and confused for two weeks and you win…