  We present a scheme to demonstrate loophole-free Bell inequality violation
where the entanglement between photon pairs is transferred to solid state
(spin) qubits mediated by cavity QED interactions. As this transfer can be
achieved in a heralded way, our scheme is basically insensitive to losses on
the channel. This makes it appealing for the implementation of quantum
information protocols based on nonlocality, such as device-independent quantum
key distribution. We consider potential experimental realisations of our scheme
using single atom, colour centre and quantum dot cavity systems.
