Dundalk took the bragging rights in the Louth Derby in an entertaining 1-0 win at Head in The Game Park.