The hydroelectric powerplants and transmission lines authorized by this chapter to be constructed, operated, and maintained by the Secretary shall be operated in conjunction with other Federal powerplants, present and potential, so as to produce the greatest practicable amount of power and energy that can be sold at firm power and energy rates, but in the exercise of the authority hereby granted he shall not affect or interfere with the operation of the provisions of the Colorado River Compact, the Upper Colorado River Basin Compact, the Boulder Canyon Project Act [43
et seq.], the Boulder Canyon Project Adjustment Act [43
et seq.], and any contract lawfully entered into under said Compacts and Acts. Subject to the provisions of the Colorado River Compact, neither the impounding nor the use of water for the generation of power and energy at the plants of the Colorado River storage project shall preclude or impair the appropriation of water for domestic or agricultural purposes pursuant to applicable State law.