The correct option is D He teaches nothing but music all day.
We use but as an alternative to except (for), apart from and bar to introduce the only thing or person that the main part of the sentence does not include. It is often used after words such as everyone, nobody, anything, anywhere, all, no, none, any, every.
But is used as a preposition when we put a noun or pronoun after it.
Here, Option C is correct. It means that he doesn't teach anything except for music. The noun phrase 'music all day', which also acts as an object of the preposition 'but', follows it.
Option A is incorrect because the sentence doesn't make complete sense.
Option B is incorrect because the meaning of the sentence has been changed.
Option D is incorrect because the construction of the sentence is wrong.