Homogeneous cosmologies in generalized modified gravity.