Here's a personal anecdote that might provide a perspective on making a living and just living.
I have a PhD in early modern European history. While still in college (eleven years of it), I had plenty of people ask me what I thought I'd do with such a degree. It took me a while to get beyond the stock "teach at a university" answer and get to something that felt closer to the truth.
The truth was, I didn't care. Yes, I did try to teach and eventually fell sideways into a rather shallow pool, but it was never the point. At least, not from about my first year in grad school. The point was the degree. The point was the learning I would do. The point was I was hungry to learn more about late medieval Europe and thought I could make a contribution (however obscure) to the scholarly dialog. I would be happy to get a job in the field, but the accomplishment--the point--was to become a scholar in the field.
I did that. Everything else was gravy and happenstance.
I bring the same attitude to writing. I write because the book is the point. I do my best to sell those books because it cheers me to have readers. It's tough to perform to an empty house. But the money isn't the point. Even the readers aren't the point. The point is the story. Everything else is gravy (not quite happenstance, with books, but that gets us into marketing).
This approach feels right to me because it means every completed book is a success in its own right. Whether it sells or not has more to do with marketing than with writing. Marketing is like a whole other career. There came a point when I had to decide whether I wanted to take that career on as well. My answer was no (I treat it more like a hobby or a supplement). If you really do want to make a living at writing, you really are taking on two careers, two full-time jobs.
None of that is meant to discourage (or encourage!) anyone. I offer it only as a perspective.