For my apartment, I run rtsp-simple-server[1] on my home server and use Raspberry Pis with generic USB webcams running ffmpeg to stream the audio/video to the RTSP server. Then I run camera.ui[2] separately for a nicer interface on top of all the cameras, HomeKit integration, etc. The only downside hardware-wise is I don't get any indoor IR night vision with these, which some of the nicer "smart home" account-locked…
I also have a few IR cameras that work ok. The biggest issue is finding decent ir LEDs.
The ones that come with the IR cameras aren't great. I purchased standalone IR LEDs, which are better for reliability and ir illumination.