There's no such thing as a 100% safe anything, particularly nuclear bombs. However, not allowing anyone but large governments access seems unfair and dangerous. So I think keeping them from either no one or everyone is unreasonable, and a moderate solution is needed.
One good idea I saw before was to simply require full liability insurance for weapons. If your nuke goes off for whatever reason and kills innocents, you are required to pay restitution to their next of kin. That way we can buy mining nukes, but crazy idiots can't just collect them willy nilly. This policy would nicely scale down too, providing arms more cheaply to people who have taken a gun safety course. Regulations might reduce the risk of accident, but WHEN one happens without restitution it's still unjust.
This libility insurance requirement would have to go all the way down the supply chain as well. I'd imagine this could work in the context of either a state or anarchy. Thoughts?