These are the contents to add in /etc/X11/xorg.conf.d/30-touchpad.conf (especially if you use Fedora1):

Section "InputClass"
        Identifier "system-touchpad"
        Driver "libinput"
        MatchIsTouchpad "on"
        Option "Tapping" "on"
        Option "ScrollMethod" "edge"
        Option "HorizontalScrolling" "on"
EndSection

Notes

  1. It is only a Linux distribution, I know. But I don’t know whether other distributions may have a different path for these files (in any case, under the /etc directory).