A Notion module usually consists of a 'mod_mymodule' directory with a 'mymodule.c' and a 'mod_mymodule.lua'. It is common for configuration to go into a 'cfg_modulename.lua' file in the configuration directory.
The lua part of the module is defined in the Makefile of the module as the MODULE_STUB. When no MODULE_STUB is defined, an automatically generated stub is created:
ioncore.load_module('mod_mymodule') -- Mark ourselves loaded. package.loaded['mod_mymodule']=true