Reduce input latency for gaming with Gnome in NixOS

In this post I want to share how to reduce input latency when gaming with Gnome in NixOS.