A nonhomogeneous nonlocal elasticity model