def build_default_config(options):
    """Build a default config from an iterable of options.
    """
    config = {}
    for option in options:
        subconfig = config
        for segment in option.path:
            subconfig = subconfig.setdefault(segment, {})
        subconfig[option.name] = option.default
    return config