I believe Purple Mentat has a video about doing that. The tricky bit is making sure that they don't end up getting suffocated by the placed blocks.
Use a pair of Golems with use cores. They wont place the blocks if the kobold is in the way, preventing any cases of accidental suffocation.
I made a setup with 2 kobolds with diamond picks, and two use core golems in a wooden room.
Both golems are configured to take iron ore from a chest embedded in one wall. One golem is configured to place blocks from left to right and the other from right to left, preventing both golems from getting "locked up" because a kobold was standing in the way.
The chest has a hopperhock under it picking up both the iron ore that the kobolds mine as well as any koboldite dust that is generated.
Because mining iron ore produces iron ore, only a single stack of ore needs to be placed in the chest and will be placed and mined over and over forever. I used iron ore because there have been reports you may be more likely to get dust from ores, and my personal experience seems to back this up. I seemed to get significantly less using cobble.
Just make sure the walls are high enough. Leashes will let the kobolds go further than you would think, and they will dig up almost anything. (This is why the hopperhock is under the chest. The kobolds will mine it otherwise.)