Great question, I'm often curious how other FOSS authors earn an income.
I've been earning money writing open source software since about 2005. It's not always easy and sometimes I've questioned my sanity, but it's been incredibly rewarding.
Here's my (extremely shortened) history with FOSS:
Between 2005 and 2015 I worked at various small dev shops that built websites based on the open source Python-based Plone CMS (see https://plone.org). We would modify Plone via plugins that we would (usually) open source and as I got better I also started working on the core Plone code as well. I also started contributing to various other FOSS Python libraries. Most of this was paid work as part of my day job.
In 2013 I started a side-project writing a web-based FOSS XMPP chat client called Converse.js (see https://conversejs.org). This was purely for fun and I had no monetisation strategy. Over time people started contacting me with requests for paid work and I started to realise I could potentially work on Converse.js full-time. In 2015 I quit my job as Plone dev and started freelancing, trying to work only on Converse.js-related work.
Working on Converse.js has been extremely rewarding with diverse challenges. Here are some examples:
* Asynchronous frontend JS development that's not HTTP-based, but XMPP-based
* Designing and creating UI/UX for a product that many people use personally and professionally
* Developing a plugin system
* Developing an extensible API
* End-to-end encryption of messages via libsignal
* Standardized protocol development of XMPP via the XMPP Standards Foundation
* Managing an open source project with multiple technical contributors and many users
For a while I took on other jobs to pay the bills, but over time the Converse.js related work became the bulk, and in 2018 I worked the entire year only on projects related to my FOSS chat client.
In 2019 I accepted a full-time position at a company that is building out a chat solution based on Converse.js. I made it clear that I want to continue maintaining and running the project and that I want to upstream work into the open source project whenever possible. So far this has worked out very well and I continue writing a lot of FOSS code.
Concerning tips on how to start working on FOSS code:
* Look for a company that advertises the fact that they write open source code. Lots of smaller dev shops that use FOSS themselves also contribute back. Alternatively, ask the company where you're at whether you can open source some of the code you're working on.
* (Much, much harder, but very rewarding) Start a FOSS side-project and hopefully grow it into a size and scale where other people start to notice and use it. Once enough people use it, you'll start getting paid work from the people depending on it.