For files I use the open source Material Files, which supports SFTP servers. So I just have a little file server. For calendar, because Google doesn't reliably support background services, it's best to use a calendar app with builtin caldav sync. For carddav, I use a background sync app though (davx). Super lame that this is not built into android, not even into lineage. You'd think someone would implement native caldav/carddav sync? Maybe this is my calling haha.
I'm telling that someone who comes up with a decent file sync setup between iPhone, Android and Linux/Windows without charging a monthly fee will make some good money on one-time buy fees alone. Dropbox etc can do things like these but I'm not interested in paying monthly fees for using my own storage across devices.