A not-so-wise man once wrote: "You have to be trusted by the people that you lie to. So that, when they turn their backs on you, you'll get the chance to put the knife in." I've always thought that described Garak perfectly.
He never gave the Federation (Julian) more than was required and was always sure to give it with a smile. And, as we know, he buried the truth in as many lies as that smile could hold.
In turn, he never the Federation as far as he could throw it. He may have warmed to specific individuals, but they do not represent the whole. And, had the Fed turned on him at any time, he would have immediately found a nice spot to jam the dagger.
OTOH, he was doggedly loyal to the Cardassia, probably to a fault.
But non of that makes him a "bad" guy. He's certainly not a shining beacon of altruism, but he's not inherently evil either.
, I love your avatar. So much so, I'm going to steal it.