Comment 4 for bug 1560942

Oliver Grawert (ogra) wrote :

i guess it will either become a kernel cmdline option (that you set in the gadget indeed) to trigger a creation script in the initrd (if you need swap you perhaps want it really early because your system is low on ram ... i.e. before you clutter memory with userspace processes)

...or actually via a core snap configuration option that would be handled from a config hook ...

in the latter case snapd would need swapon and fallocate support in the core-support interface.
but i think userspace is to late for this and in the first case above, snapd wouldnt be involved at all.