This is what I use. Openwrt with a USB HDD attached to it. Radicale2 deals with caldav stuff. Samba4 shares the HDD over the network. Zerotier gets me connected to the home network when out and about. Syncthing on my router and phone. When I charge my phone it automatically backs up my pictures and documents folder into the HDD. Separate offline copy of the HDD every few months for backup. Not as fast or dedicated as NAS but cost effective solution. Openwrt solves most of my networking needs.
All of this stuff uses up a lot of space, around 200MB, which is greater than the standard root partition size in Openwrt. I run it on an x86 box (PC Engines APU2) and the internal SSD is 16GB. Every update I needed to expand the root partition size to be able to fit all the packages previously installed. I now build my own images with expanded root partition to avoid the hassle.