I think that's wrong however. The nationalist states such as Libya, Iraq, Syria were not actually the source of much jihadist activity: the governments there were basically secular state socialists. Sure, they paid lip service to Allah the same way American right pay lip service to Jesus, but they had very few religious connections.
Also, Hezbollah and Hamas exist not because of Iran, but because of Israeli occupation of southern lebanon and Gaza/West Bank. Those sorts of organizations don't exist because nationalists came to power, but because their homelands were occupied, giving them a rallying point to fight. That's why the palestinian PLO and catholic IRA were aligned: they saw each other's struggles as similar. If you occupy peoples homeland, you make terrorists. If you look at the history of military occupation it can make terrorists out of anyone. Muslims, The Irish, or Vietnamese for example. And if you know any Vietnamese people they're really laid back types. Occupying someones country can turn Buddhists into enraged killers.
It's the same with ISIS. Basically there was none of that while there were state socialist governments strongly in control of Syria / Iraq. Now, the floodgates have opened because of military adventurism and attempts to install puppet governments.
As for Afghanistan: the big problem there was intervention from Pakistan, who basically armed up orphans from the USSR/USA war, who were living on the border area, and turned them into Taliban. So again, that was caused by external interventions, not local nationalism. If you want to talk about actual Afghan nationalists, Mahmoud was the guy who should have been in charge, but we basically stabbed him in the back once Russia left. We had someone to support in Afghanistan who was a badass but also known for being tolerant and believing in individual freedoms, but we backstabbed him hard when he needed us.
Also Al Qaeda. Which states did they come from. Almost all of them came from Saudi Arabia and Egypt, and their stated goal for a long time was the overthrow of those governments specifically. Which are basically America's two biggest recipients of arms spending in the region. Basically imperialists propping up the Saudi royal family and Mubarak was the reason Al Qaeda existed in the first place. And remember "rendition" where the CIA sent prisoners to torture centers in Egypt? Basically Mubarak was bad enough that a terrorist organization arose to overthrow him while there was no real similar anti-Saddam or anti-Ghaddafi organization.
And of course, the reason the Iranian theocracy exists in the first place is well known. They were a fairly prosperous and educated developing nation with parliamentary democracy. Then the elected president wanted a better deal over the oil. So America engineered a coup and put a dictator in charge. The oppression then lead to a rebellion, and since all of civil society was undermined by that point, the only organized people were connected to religion, so the religion takes over. That's what you get when you gut civil society to stop self-determination. The only authority left is the church, thus the rebellion becomes a religious not a political one.