Space battles would actually have to be fought at pretty close ranges, no more than a few hundred kilometers otherwise the other ships can easily avoid weapons. Even a laser at hundreds of thousands of kilometers gives just enough reaction time to avoid being hit completed.
Also a nuclear detonation in space isn't going to be terrible effective. There's no atmosphere to super heat and cause a fireball with. You'd be better of with solid slugs traveling a 0.01% the speed of light. You might find success with AP rockets or missiles.