  Let $G$ be a group definable in an NIP theory. We prove that, if $G$ admits a
global f-generic type, then $G$ is definably amenable, answering a question of
Chernikov and Simon. As an application, we show that every dp-minimal group is
definably amenable, answering a question of Kaplan, Levi, and Simon.
