A multi-scale model for electrokinetic transport in networks of pores, Part I: model derivation