We suggest a model that describes the strengthening of nanocrystalline metallic alloys due to inhomogeneous grain boundary (GB) segregations. Within the model, inhomogeneous GB segregations are modeled by spherical dilatational inclusions whose elastic fields interact with lattice or GB dislocations. We consider two modes of plastic deformation of nanocrystalline alloys: GB sliding realized via the motion of GB dislocations over GBs and slip of lattice dislocations across grains. The calculations demonstrate that in the case of GB sliding, which occurs in nanocrystalline alloys with the finest grains, inhomogeneous segregations induce only moderate strengthening. In contrast, high strengthening due to GB segregations is achieved in nanocrystalline alloys with larger grain sizes, deformed through lattice dislocation slip. This implies that the preferred kind of segregations for maximum strengthening of nanocrystalline alloys can depend on their grain size.