We consider topology optimization of fluids in Stokes flow. The design objective is to minimize a power function, which for the absence of body fluid forces is the dissipated power in the fluid, subject to a fluid volume constraint. A generalized Stokes problem is derived that is used as a base for introducing the design parameterization. Mathematical proofs of existence of optimal solutions and convergence of discretized solutions are given and it is concluded that no regularization of the optimization problem is needed. The discretized state problem is a mixed finite element problem that is solved by a preconditioned conjugate gradient method and the design optimization problem is solved using sequential separable and convex programming. Several numerical examples are presented that illustrate this new methodology and the results are compared to results obtained in the context of shape optimization of fluids.