Kaddressbook/ Kontact/ Akonadi cannot add address book

In Kaddressbook as well as in Kontact, I cannot add an address book. I can go through the process but at the end, the address book does not appear. I don’t see much information in the akonadi log. Apart maybe org.kde.pim.akonadiserver: Handler exception when handling command FetchCollections on connection akonadi_davgroupware_resource_12 (0x7cea90) : Hierarchical RID does not specify an existing collection. I found this issue 258342 – No hierarchical RID does not specify a unique collection but it seems bugs.kde.org is down.
I attach the full akonadi log here: org.kde.pim.akonadictl: Starting Akonadi Server...org.kde.pim.akonadictl: d - Pastebin.com

Anyone is able to use Kaddressbook or Kontact successfully on NixOS?

I think you messed somehow up your configuration of KDE (happened to me a few times, specially when I tried to add some new stuff via an editor and not the GUI).
KDE/kontact spreads information about a used resource (e.g. akonadi_davgroupware_resource_12) in various files. But maybe just removing ~/.config/akonadi/agentsrc and trying to readd is enough. Or you have a problem to connect to your nextcloud/dav account.
More redical solution is to you throw away your ~/.config folder (or use a freshly generated user home) and try from scratch.
I have no problem running KDE, kontact, etc on my NixOS 22.11 system.
Wish you good luck.

Yes. Using vdirsyncer to pull down contacts from O365 and kaddressbook happily shows them (there’s also the little person icon in the system tray).

Did nothing special to get it working.

Thank you both for answering.
It was indeed a user error, I was selecting CalDAV instead of CardDAV :man_facepalming:
I like kaddressbook as a standalone rather than kontact so in my config I keep:


EDIT: wouldn’t it be better to have plasma5Packages.akonadi and plasma5Packages.kdepim-runtime as dependencies of kaddressbook?

EDIT2: there are at least 3 related issues