I have had a scenario where we had a multi tenant application. Each tenant had its own settings. Each environment also had its own settings.
We could build and deploy a package to a tenant/environment combination. The deploy made sure it combines the correct configuration into the package and was also aware of the environment (location, credentials, ...).
Configuration was more or less organized as:
All was in one single (svn at the time) repository.