Only connection via Tor for the entire operating system

On mobile, formatting will be kinda shitty.
But I was searching for a solution like this not long ago without having to use a different machine or OS. This thing is sort of hit and miss, but with a bit of creative finagling, it works.

I can personally confirm it works on Ubuntu 22.04 KDE, FreeBSD 13.0, and macOS12.5 and macOS10.14