The short answer is: you can't.
Remote code loading operates on the module (as opposed to application) level.
Riak is comprised of several Erlang modules and requires some dependencies.
nl(riak)
essentially loads a single module on all attached nodes.
The long answer is: you can, but don't do it.
Actually, you could gather the list of modules associated with Riak, then remote-load these and configure Riak over the wire. The application
module might help with that.
The problem with this approach is that if the remote node fails or reboots, you will need to transfer all of the modules again and repeat the configuration.
If some kind of "remote loading" must be involved, you should install Riak somewhere in $ERL_LIBS
on the remote machine, so the load process can be initiated through rpc:call/4
.