KDE on NixOS, issues

I decided to try KDE (or Plasma) as a desktop environment on my NixOS machine. What I did was simply this:

  services.xserver.displayManager.sddm.enable = true;
  services.xserver.desktopManager.plasma5.enable = true;

With this, I can login and use Plasma. Great! But there are at least two issues: First of all, trying “kmail” using “nix-shell -p kmail --run kmail” I run into a problem:

org.kde.pim.akonadicore: Failed to request resource "" : "Cannot connect to the Akonadi service. (Unable to obtain agent type ''.)"

What’s this about?

Somewhat similarly, I get random popups from “Kwallet” (for example, directly after logging in). Is that something I need to enable and/or manage separately?

I have the feeling that my config needs some tweaking to “really” use KDE/Plasma. Did I forget something?

What’s this about?

You need to bring in akonadi and friends:

environment.systemPackages = with pkgs; [ akonadi akonadiconsole akonadi-search ];

You can add the various other components as well as kmail to that list as well.

Somewhat similarly, I get random popups from “Kwallet” (for example, directly after logging in). Is that something I need to enable and/or manage separately?

They’re not random - it when an application tries to access an item in kwallet and the specific wallet hasn’t been unlocked yet.

You can also add kwalletmanager to the list above to have that available to see what’s going on.

2 Likes

Ah, I see, thanks! It doesn’t find akonadiconsole and akonadi-search, not sure why…And just akonadi isn’t enough to satisfy kmail.

The whole thing might be something worthwhile to add to one of the manuals maybe, for people who want to use KDE with NixOS.

Ah, I see, thanks! It doesn’t find akonadiconsole and akonadi-search, not sure why…

Because I didn’t get enough context from the output of my grep command and thus provided you bad intel. Sorry.

Only akonadi is available at the top level - the others are nested:

environment.systemPackages = with pkgs.libsForQt5.kdeApplications; [ akonadi akonadiconsole akonadi-search ];

The whole thing might be something worthwhile to add to one of the manuals maybe, for people who want to use KDE with NixOS.

Completely agree. Despite quite a number of people having done lots of great work on developer documentation, when it comes to the end-user side of things, we’re sorely lacking.

Any chance you could be persuaded to document things as you go along?

I think so! From the Nix Wiki I can see how to contribute to the documentation, I’ll try adding a few sentences. :slight_smile:

1 Like

No worries! However, kmail still doesn’t work, although akonadictl status now gives me:

[nix-shell:~]$ akonadictl status
Akonadi Control: running
Akonadi Server: running
Akonadi Server Search Support: available (Remote Search, Akonadi Search Plugin)
Available Agent Types: akonadi_indexing_agent, akonadi_knut_resource

So I don’t actually use kmail but it looks like it’s missing some akonadi plugins. Have you tried adding everything you can find with akonadi in it like akonadi-calendar, akonadi-contacts, akonadi-mime and so on?