On the one hand, usual formulation is you only get one question, finding out which is the liar alone is easy but useless as then you're out of questions to actually get through the gate. On the other hand, unless you get the information about the behavior of the guards from a trusted source that isn't them you have no reason to believe them, and in fact they cannot relay the setup to you accurately without giving it away if you assume they're always like that as many do.
The full setup is that they can both tell you about the setup, but for the One Question, they follow the rules stipulated. Neither is actually bound to always lie and always tell the truth outside of the One Question.
The way guard 2's first line is worded could be interpreted as him saying "the other (guard says) nothing but lies", meaning he's saying guard 1 is the liar which is a lie.
Well you should assume that both guards follow the rules all time. Meaning that the initial setup of the rules cannot be trusted, because who knows if the talking Guard is lieing or not. If one does tell nothing but the truth this must be the one explaining the rules.
However if I remember correctly it was setup that one will answer the truth while the other one will deceive me. Meaning he might tell the truth if it confused me.