Has anybody tried to install Wireguard?

DKMS can be used to rebuilt kernel modules when a new kernel version is installed, but doesn’t fit well with OSMC.

Unfortunately, DKMS will probably fail since (a) AFAICT there is no headers metapackage on OSMC that will automatically install the headers for a new kernel; and (b) we still need to create a symbolic link build under /lib/modules/$(uname -r)/ that points to /usr/src/rbp2-headers-$(uname -r). So, unless you can crack these issues, you’ll probably need to recompile manually – though it’s easy to repeat after the initial set up.