I heard that it is an act of Jihad to fight to defend your homes
that is my understanding also, but some people have used this justification to fight their fellow muslims in afghanistan but this is not correct as this is against their brothers and it is kufr to ally with a kaffir against a muslim.
if a true islamic nation invaded the uk i wouldnt raise a finger to help the kuffar and i would make constant dua that the mujahideen were successful.