I use a mix of borax, icing sugar or honey and water in around my inverter, chargers etc to kill ants that want to live where the power is. I have had one inverter seriously damaged by ants nesting inside it (over $1000 to have repaired). I just put drops of it around the area on flat surfaces and they eat it.

When we did some remote camping an aboriginal guide told us they urinate on ant nests where they want to keep ants away from. , it even works on the larger soldier ant nests.Might want to be careful urinating on your inverters though

What a list of things that help. I usually just use the cheapest talcum powder - ants don't like to cross it. After a few days the ants usually have disappeared completely, at which time the powder can simply be cleaned up.