Custom CardDav server

What I would like is a way to add an external contact server to mailspring. Currently I have a nextcloud instance up and running with my contacts on there. It would be nice if I could read/write the contacts from the CardDav server