'But' is a conjunction, meaning that it will connect two similar grammatical structures.
"They do nothing but complain." This is actually a compound sentence that could be written out completely as, "They do nothing but they complain." This is to say that all they do is complain.
"They are doing nothing but bumming around." This is a similar situation. It is a shortened way of saying, "They are doing nothing but they are bumming around."
So 'but' is not a preposition.
Student or Learner