If you have an HDHomeRun (or another supported tuner), you can attach an antenna and connect it to a Plex server. Jellyfin also has a live TV feature and is completely open source, but I'm not sure of the state of their apps.
Plex and Jellyfin support streaming from anywhere as part of their core offering, and live on your own hardware, and seem like an all around better option.