<commit_before>{pkgs, config, ...}:

let
  inherit (pkgs.lib) mkOption mkIf types;
  kdePackages = config.environment.kdePackages;

  options = {

    kde = {

      extraPackages = mkOption {
        default = [];
        merge = builtins.trace "!!! kde.extraPackages is obsolete, you should use environment.kdePackages." pkgs.lib.mergeDefaultOption;
        description = ''
          ** Obsolete **
          Additional KDE packages to be used when you use KDE as a desktop
          manager.  By default, you only get the KDE base packages.
        '';
      };

    };

    environment = {

      kdePackages = mkOption {
        default = [];
        example = [ pkgs.kde42.kdegames ];
        type = types.list types.package;
        description = ''
          Additional KDE packages to be used when you use KDE as a desktop
          manager.  By default, you only get the KDE base packages.
        '';
        apply = pkgs: pkgs ++ config.kde.extraPackages;
      };

    };
  };
in

mkIf (kdePackages != [] && config.services.xserver.enable) {
  require = options;

  environment = {
    x11Packages = kdePackages;

    shellInit = ''<commit_msg>Changed reference from KDE 4.2 to KDE 4.3<commit_after>{pkgs, config, ...}:

let
  inherit (pkgs.lib) mkOption mkIf types;
  kdePackages = config.environment.kdePackages;

  options = {

    kde = {

      extraPackages = mkOption {
        default = [];
        merge = builtins.trace "!!! kde.extraPackages is obsolete, you should use environment.kdePackages." pkgs.lib.mergeDefaultOption;
        description = ''
          ** Obsolete **
          Additional KDE packages to be used when you use KDE as a desktop
          manager.  By default, you only get the KDE base packages.
        '';
      };

    };

    environment = {

      kdePackages = mkOption {
        default = [];
        example = [ pkgs.kde43.kdegames ];
        type = types.list types.package;
        description = ''
          Additional KDE packages to be used when you use KDE as a desktop
          manager.  By default, you only get the KDE base packages.
        '';
        apply = pkgs: pkgs ++ config.kde.extraPackages;
      };

    };
  };
in

mkIf (kdePackages != [] && config.services.xserver.enable) {
  require = options;

  environment = {
    x11Packages = kdePackages;

    shellInit = ''
{'fraction_non_alphanumeric': 0.10409556313993173, 'fraction_numerical': 0.005119453924914676, 'mean_word_length': 2.1183510638297873, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2272750', 'n_tokens_mistral': 720, 'n_tokens_neox': 671, 'n_words': 201}