Welcome to the Wefugees Community and thank you for reaching out to us.
I am afraid that your question might be too general in order to provide the information you are looking for. The fact that somebody work(ed) as a soldier in Nigeria will not lead to any type of residence right, as far as I know. However, if the person qualifies for a residence permit (i.e. humanitarian, education/work), the fact that he/she worked as a soldier shouldn't be a ground for rejection of this residence permit either (except someone is under suspicion of having comitted war crimes, for instance).
Are you already in Germany or still outside of the country?
In any case, please don't hesitate to get back to us if you want to discuss your question further.
All the best,