So lets say i make a military space station and i put a recreational module and a maintenance module, cargo shuttles, etc, would that be able to work indefinitely?
To clarify, what you want to do is create one or more
commercial stations with the desired recreational module, maintenance module, etc. (I suggest keeping each type of station separate so it is easy to build up a deep space base to the desired specifications). You can then deploy
military stations, or ships for that matter, which would be maintained by the facilities you have constructed. Keep in mind that maintenance modules require a source of MSP to function so you will need to periodically ship supplies to the base to keep it stocked up.