NXP-19175 introduced directory configuration templates. We should use them for the default directories and vocabularies defined in Nuxeo.
Nuxeo now uses template-based directories for its vocabularies and directories (apart from users and groups). They can be redefined to use another datasource, cache configuration or directory backend by overriding just the single template-directory template. See https://doc.nuxeo.com/nxdoc/data-lists-and-directories/#generic-directory-and-directory-templates for more.