score:4
The passport validity rule is not six months, per se, but three months beyond the expected date of departure from the Schengen area.
But it doesn't apply if you are traveling on an EU common format residnce permit (a red and blue card with a bull and stars). In that case your passport only needs to be valid during your journey. As a resident, you are not required to depart from the Schengen area while your residence is valid.
Looking up an intra-Schengen itinerary in Timatic, with Nigerian citizenship and German residence, results in the following:
Passport required.
- Passports and other documents accepted for entry issued to residents of Germany must be valid on arrival.
Without EU residence, the rule shown is:
Passport required.
- Passports and other documents accepted for entry must be valid for a minimum of 3 months beyond the period of intended stay.
So you can see that as long as you travel with your passport and EU residence permit, that this rule does not apply to you.