A variational formulation for nonequilibrium thermodynamics was recently proposed in [7, 8] for both discrete and continuum systems. This formulation extends the Hamilton principle of classical mechanics to include irreversible processes. In this paper, we show that this variational formulation yields a constructive and systematic way to derive from a unified perspective several bracket formulations for nonequilibrium thermodynamics proposed earlier in the literature, such as the single generator bracket and the double generator bracket. In the case of a linear relation between the thermodynamic fluxes and the thermodynamic forces, the metriplectic or GENERIC brackets are recovered. A similar development has been presented for continuum systems in  and applied to multicomponent fluids.