In this paper we study the supply function competition between power-generation firms with different levels of flexibility. Inflexible firms produce power at a constant rate over an operating horizon, while flexible firms can adjust their output to meet the fluctuations in electricity demand. Both types of firms compete in an electricity market by submitting supply functions to a system operator, who solves an optimal dispatch problem to determine the production level for each firm and the corresponding market price. We study how firms' (in)flexibility affects their equilibrium behavior and the market price. We also analyze the impact of variable generation (such as wind and solar power) on the equilibrium, with the focus on the effects of the amount of variable generation, its priority in dispatch, and the productionbased subsidies. We find that the classic supply function equilibrium model overestimates the intensity of the market competition, and even more so as more variable generation is introduced into the system. The policy of economically curtailing variable generation intensifies the market competition, reduces price volatility, and improves the system's overall efficiency. Moreover, we show that these benefits are most significant in the absence of the production-based subsidies.