anchor.diff:        description = "Use systemd to manage the Plasma session";
         type = types.bool;
         default = false;
  +    };
  +
  +    # Internally allows configuring kdeglobals globally
  +    kdeglobals = mkOption {
  +      internal = true;
  +      default = {};
  +      type = kdeConfigurationType;
  +    };
  +
  +    # Internally allows configuring kwin globally
  +    kwinrc = mkOption {
  +      internal = true;
  +      default = {};
  +      type = kdeConfigurationType;
       };
     };
   
  
positive.code: let
    xcfg = config.services.xserver;
    cfg = xcfg.desktopManager.plasma5;
  
    libsForQt5 = pkgs.plasma5Packages;
    inherit (libsForQt5) kdeGear kdeFrameworks plasma5;
  
negative.code:       services.xserver.displayManager.setupCommands = startplasma;
  
        nixpkgs.config.firefox.enablePlasmaBrowserIntegration = true;
  
        environment.etc = {
          "xdg/kwinrc".text     = lib.generators.toINI {} cfg.kwinrc;
          "xdg/kdeglobals".text = lib.generators.toINI {} cfg.kdeglobals;
        };
      })
    ];
  }
  