In one sense, since Israel decided to 'abandon' Gaza in 2005, they opened the door for Hamas to win against the Fatah/PA in the election that was held in 2006 (due to Israel vacating). They basically handed Gaza to Hamas. Most Israeli politicians to this day, especially the right wing (since Ariel Sharon spearheaded the exit), see that as a crucial error that has come to haunt Israel since. That this could happen, and that Hamas would fight Israel for "liberation" could have been easily predicted.
What do you mean Hamas can "cave to" the UN? You mean fulfill any UN resolutions concerning them? They are the elected government of Gaza. Israel has many unfulfilled UN resolutions, if they don't like them they thumb their nose at it. Israel has massive violations of international law, and refuses to engage about that at any level. Both sides could be held to account by the UN for war crimes committed during the 2014 conflict, but neither will allow a full investigation. Nothing will happen until both sides are willing to move forward with some sort of peace initiative.
I would say the people of Gaza still have their dignity, even if hardly anything else. Any solution would take this into account. And why would they want nukes? Is that a good thing? Especially in the Middle East, any nuke will affect surrounding countries. It's pretty crazy that Israel has nukes, as using them against any Arab enemy is like setting off a bomb on your own doorstep. And a radioactive one at that. The nuke thing is supposed to be a deterrent () but God help us if anybody ever decides to use one. When the U.S. decimated Japan with two atomic weapons, nobody else had them at the time. Once a nuclear exchange happens anywhere in the world, we can all bend over and kiss our ass goodbye.
As to surrendering, what do these people have to give? Or give up, or give in? They have practically nothing.
Cooperating with who? Israel? The UN? Israel actually doesn't want to change the status quo, it works for them. With the Palestinian Authority (PA) in the West Bank working against Hamas in Gaza (and vice versa) there is no unity to negotiate with Israel, and Israel can continue incursions into the West Bank to build more settlements. Only when there is some pain point for Israel from the world powers or people, or the UN, will they consider changing anything.
So lets imagine for a moment that all Palestinians agreed that from now on they would only peacefully protest the occupation. No more lone wolf attacks, no rockets, no tunnels. What would happen? According to Israel, all they want is to live in peace. But if that were given to them, then what? What enemy would they have to blame for their problems? Would they really be willing to come to the table and work on a Palestinian state or help those people? My wager is that they would do nothing. They would revel in their victory and take it for granted. It's sad, but I would love to be shown otherwise.
There's a reason that the two-state solution is for all practical purposes ... dead. Israel doesn't want that (at least the right wing). Creation of the state of Israel created all these problems in the first place, so in order to make something happen they have to be part of the solution.