General Configuration & Persistence

Before diving into specific visual settings, it is important to understand how Plasma Manager handles configuration files and state.

The overrideConfig Option

By default, Plasma Manager only adds or updates the settings you explicitly define. It leaves other settings in your KDE config files (~/.config/kwinrc, etc.) alone. This allows you to mix declarative configuration (Nix) with imperative configuration (GUI).

However, if you want a strictly declarative system where Nix is the single source of truth, you can enable overrideConfig.

programs.plasma.overrideConfig = true;

::: warning Warning: Enabling overrideConfig will delete specific KDE configuration files (like kwinrc, plasmarc, kglobalshortcutsrc, etc.) on every activation and regenerate them containing only what is defined in your Nix configuration. Any changes made via the GUI will be lost on the next deploy. :::

File Management

files, configFile, and dataFile

Plasma Manager provides low-level access to write arbitrary keys to KDE configuration files. This is useful for settings that don't yet have high-level options in Plasma Manager modules.

  • configFile: Writes to $XDG_CONFIG_HOME (usually ~/.config).
  • dataFile: Writes to $XDG_DATA_HOME (usually ~/.local/share).
  • file: Writes relative to $HOME.

Example: Setting a specific KWin option not exposed by a module

programs.plasma.configFile = {
  "kwinrc"."Desktops"."Number" = {
    value = 8;
    immutable = true; # Prevents KDE from changing this at runtime
  };

  "baloofilerc"."Basic Settings"."Indexing-Enabled" = false;
};

Persistence Logic

If you use overrideConfig = true but want to keep certain settings mutable (modifiable via GUI and preserved across generations), you can mark specific keys as persistent.

programs.plasma.configFile."kdeglobals"."General"."ColorScheme".persistent = true;

This tells Plasma Manager to ignore this specific key during the file generation process if it already exists, effectively allowing the GUI to control it even when overrideConfig is on.