If your primary concern is that a ransomware attack might overwrite your backups as well as your main PC, there is another option.
Instead of sharing a file system where overwrites replace the contents of the existing files, share a filesystem which uses copy on write semantics. With frequent automated snapshots to preserve the contents of overwritten files you get have a copy of the original files even if they are 'deleted'.
In the event of a ransomware attack overwriting all of your backups, the main effect will be to run the server out of disk space. When you realise this has happened, you can restore the filesystem to the snapshot made immediately before the attack which simultaneously restores all of the original backups, and deletes all of their 'encrypted' replacements.
On my Linux NAS, I use ZFS drives which support this kind of functionality, though I haven't set it up myself and other options such as BTRFS are available.