The Ministry of Defense is in charge of the military. The Minister of Defense will be a professional career military person with decades of experience. The military will carry a defense first doctrine. It will not enter another country unless attacked first. This is why there is no standing army, or navy. There will be no need to send an invasion force to another country, and the rights of another country to exist is built into that doctrine. With that in mind, there will be a National Guard. The National Guard will be the branch that will have tanks, missiles, drones, and so many other things that you would expect from a military. However as the name implies, it is the National Guard, and not the National Army.
For retaliatory attacks on the invading nation, there will be a cyber force which will cripple military infrastructure with ransomware attacks, and viruses. This will be designed to cripple the military, and the next target will be infrastructural grids such as the electrical grid, or the telecommunications networks. The idea will be to have these digital payloads written before being attacked. And with that said, this should cripple the invading force from continuing their campaign, and force the populace to end the war to save what will be left on their infrastructure.
In addition, there is the Special Operations branch. As the name implies, this is special operations. They will go into the invading country, and target key people. If they can be taken into custody, or assassinated, then that will also make it harder for the invading country to continue their operation. The goal is to make the invading country (and any other) to think twice before invading.