[By one year after publishing my first book](https://jeremykun.com/2019/12/01/a-good-year-for-a-programme...), I had sold 11k copies, and with self publishing you get a much bigger royalty from each copy, drastically lowering the bar for financial success. I expect my second book to do even better, because my audience has only grown since then and the book is more general purpose.
I might be an outlier in that I have already built up a large audience from blogging about math. But the benefit of self-publishing, aiming your work at folks with disposable income, and having a niche all seem to make a full-time writing job quite straightforward.