I've had a number of problems with ants taking up residence in
equipment. After trying a number of approaches, I found that leaving
the equipment out in the sun on a hot day works best. Usually, the nest
itself is in a small part of it, like a floppy drive. If you take it
apart as best you can and leave the pieces out, the heat will irritate
the ants, and they will leave, taking as much of the nest along as they
can. It is probably the least cruel, and you won't have to clean out
the dead ants and their eggs, which is a huge pain in the thorax :)
Kirill