This is a long shot but could it be Prophet Without Honour (Anarchy Online Book One)
(2001) by Ragnar Tørnquist or even the game it sets the world building up for Anarchy Online if you've somehow confused a book with a video game.
In the series there are nanomages, mages whose magic is enabled by nano technology. The book's story line mainly seems to follow the backstory of the developments of the nano tech (though I haven't read it to be sure).
“Even better,” Roland said. “We have already begun treatment on five test subjects. Our eminent and reliable Dr. Miller and his handpicked team have worked closely with New Jersey to facilitate for realtime alteration of chromosomes, using the new series of nanobots working on a molecular scale.” He paused. “And we seem to be making excellent progress. The combination of Miller’s miraculous little machines and my research into the aging process and the human genome has paid off. We can alter nature, my friends, and we can do so with confidence in the expected results.” He spread his hands and smiled. “In a short few years, you will all find yourself decidedly…reinvigorated.”
Prophet Without Honour, New York, March 30th 2017 AD
Later on in the story they discuss how the air contains what could be used as the basis for a natural nano bot and this seems to lead into the nanomages in the game.
“Fact is, Min, after looking over the readings I did, I’ve come to realise that this planet’s already got a microscopic substance resembling nanobots in the air. That’s simply amazing, and it means there’s a good reason why Omni-Tek has chosen to colonise Rubi-Ka. If this power, whatever it is, can be harvested…”
Prophet Without Honour, Rubi-Ka, 28702 AD
I found this through quite a wild chase so bear with me here, I initially Googled
Book world magic enabled by nano tech which led me to the Wikipedia article Nanotechnology in fiction. From there I searched the page for
magic which led me to the Wikiepdia page for Anarchy Online. Reading how the nano technology works in the game made me think it was plausible but as you mentioned it was a book I Googled
anarchy online book which led me to the book.