Nix-Maid: systemd native dotfile management

Just waking up this thread to announce that I added support for KDE/KConfig for nix-maid:

{ config, pkgs, ...}: {

  users.users.nixos = {
    isNormalUser = true;

    maid = {
      kconfig.settings = {
        kwinrc = {
          Desktops.Number = 4;
        };
        baloofilerc = {
          "Basic Settings".Indexing-Enabled = false;
        };
      };
    };
  };

}

This is a re-implementation of plasma-manager, that instead of parsing kconfig files, directly calls the C++ KDE API. This is also documented in the nix-maid docs: API Documentation | nix-maid.

10 Likes

Killer feature ! Thanks

sorry, i just updated for the first time after 2 months (this is the amount of time it took for me to untangle the many nests of my config…), and the first thing i see is:

error: The option `users.users.USER.maid.kconfig' was accessed but has no value defined. Try setting the option.

do i have to set it for nix-maid to work now? even though i dont use KDE at all?

EDIT: oh, it compiles if i just put a dummy option:

users.users.USER.maid.kconfig.settings = { };

interestingly, without .settings it still doesnt work…?

1 Like

@viperML

What a good idea!

It’s not obvious to me how to know what options KDE makes available - I’ve tried a web search and the best documentation I can find is src/kwin.kcfg Ā· master Ā· Plasma / KWin Ā· GitLab , which (I think?) is not complete.

1 Like

I agree. This was just the minimum piece of integration get the ball rolling. My idea to improve the situation of discoverability is twofold:

  • Add some high-level modules, probably keeping the same API as plasma-manager.
  • Write a new kconfig-declarative watch command, that on a similar way to dconf watch / would print the changes you make to KDE.

(For now I’ve just been querying my LLM of choice about which file/option does what, which is surprisingly accurate…)

2 Likes