Add config.patch and update templates