How can I move a node type's configuration into a custom module? I still a bit new to D8 and loving the new configuration management system that has replaced Features.

I am looking for the best technique for containing particular configurations in my custom modules.

I have a node type called quiz and a module called quiz_module. By default, when I execute drush cex -y the output yaml files are deposited into ../config/sync.

Is it the correct thing to do to move all the yaml files relating to the quiz node type in to my quiz_module? When do that, the same files are recreated whenever I execute drush cex -y.

To counter that duplication, I created a softlink of the files from quiz_module to '../config/sync' but that didn't seem to update the yaml files as I expected.

Any help, please?
Configuration Management did not replace Features completely, Features still has its place.

My understanding is that:


Configuration Management should be used to manage your configuration for a specific site/project.
Features should be used to export configuration to custom modules as you develop them if they're going to be re-used on another site. 


The configuration in your custom module goes into 2 directories (install or optional).


Configuration in the install directory is considered required and only gets imported when your module is installed. 
Configuration in the optional directory is optional and will import during your module install if all the dependencies are present. (I think it also gets imported if all dependencies are later installed.) E.g. If you define a View in your module's optional directory, that configuration would be installed only in two instances: 1. when you install your module, if Views is installed, or 2. when Views is installed later, sometime after your module is installed.


The Features module page lists several additional resources to help understand the differences between Configuration Management and Features.