the mainline kernel does not have all the required security patches (apparmor mainly) and will not have the correct config options set, you should start from an ubuntu kernel git tree instead …
along with that you will need to use a kernel plugin, not the nil plugin, to make sure the snap has everything as needed in the right places …