I hope this deal works out, but considering North Korea is one of Iran’s best friends they would be well versed how to maintain a secret nuclear program and then back out of deal by blaming the other side:

Secretary of State John Kerry, in Lausanne, Switzerland, watched President Obama speak Thursday at the White House about the general agreement reached with Iran on its nuclear program. Credit Pool photo by Brendan Smialowski

Even two of the most skeptical experts on the negotiations — Gary Samore and Olli Heinonen of the Kennedy School of Government at Harvard and members of a group call United Against Nuclear Iran — said they were impressed with the depth of detail.

Mr. Samore, who was Mr. Obama’s top adviser on weapons of mass destruction in his first term as president, said in an email that there is “much detail to be negotiated but I think it’s enough to be called a political framework.” Just a day ago, that appeared in doubt.

Mr. Heinonen, the former chief inspector of the International Atomic Energy Agency, said “it appears to be a fairly comprehensive deal with most important parameters.” But he cautioned that “Iran maintains enrichment capacity, which will be beyond its near-term needs.”

According to European officials, roughly 5,000 centrifuges will remain spinning enriched uranium at the main nuclear site at Natanz, about half the number currently running. The giant underground enrichment site at Fordo — which Israeli and some American officials fear is impervious to bombing — will be partly converted to advanced nuclear research and the production of medical isotopes. Foreign scientists will be present. There will be no fissile material present that could be used to make a bomb.

A major reactor at Arak, which officials feared could produce plutonium, would operate on a limited basis that would not provide enough fuel for a bomb.

In return, the European Union and the United States would begin to lift sanctions, as Iran complied. At a news conference after the announcement, Mr. Zarif said that essentially all sanctions would be lifted after the final agreement is signed.  [New York Times]

You can read the rest at the link, but North Korea first started negotiating in regards to their nuclear program back in 1994.  Now 21 years later they have nuclear weapons.  The Iranians if they choose to follow the same path will probably have nuclear weapons even sooner than that.  I think a lot of the decision on whether to covertly build nukes will depend on the geopolitical situation in the Middle East in the coming years.  Despite the media reports I think Iran wants nuclear weapons more for regime survival than to attack Israel with.  In the coming years if Iran feels like they are getting surrounded by hostile ISIS affiliates and Sunni governments they may then feel compelled to move forward with a covert nuclear weapons program.  This deal will allow them to keep that possibility open in the long term while still complying with the agreement to get sanctions dropped in the near term.