Multi-agent models often describe populations segregated either in the physical space, i.e. subdivided in metapopulations, or in the ecology of opinions, i.e. partitioned in echo chambers. Here we show how both kinds of segregation can emerge from the interplay between homophily and social influence in a simple model of mobile agents endowed with a continuous opinion variable. In the model, physical proximity determines a progressive convergence of opinions but differing opinions result in agents moving away from each others. This feedback between mobility and social dynamics determines the onset of a stable dynamical metapopulation scenario where physically separated groups of like-minded individuals interact with each other through the ex...