from typing import Dict
from typing import Any


def add_settings(
    base_config: Dict[str, Any], settings: Dict[str, Any]
) -> Dict[str, Any]:
    """
    Recursively add entries from a nested dictionary `settings` to a nested dictionary
    `base_config`.
    """

    new_config = dict(base_config)
    for key in settings:
        if isinstance(settings[key], dict):
            new_config[key] = add_settings(new_config[key], settings[key])
        else:
            new_config[key] = settings[key]

    return new_config