anchor.diff:        environment.systemPackages =
           with libsForQt5;
           with plasma5; with kdeGear; with kdeFrameworks;
  -        [
  -          ksystemstats
  -          kinfocenter
  -          kmenuedit
  -          plasma-systemmonitor
  -          spectacle
  -          systemsettings
  -
  -          dolphin
  -          dolphin-plugins
  -          ffmpegthumbs
  -          kdegraphics-thumbnailers
  -          khelpcenter
  -          kio-extras
  -          print-manager
  -
  -          elisa
  -          gwenview
  -          okular
  -        ]
  -      ;
  +        let
  +          requiredPackages = [
  +            ksystemstats
  +            kinfocenter
  +            kmenuedit
  +            plasma-systemmonitor
  +            spectacle
  +            systemsettings
  +
  +            dolphin
  +            dolphin-plugins
  +            ffmpegthumbs
  +            kdegraphics-thumbnailers
  +            kio-extras
  +          ];
  +          optionalPackages = [
  +            elisa
  +            gwenview
  +            okular
  +            khelpcenter
  +            print-manager
  +          ];
  +      in requiredPackages ++ utils.removePackagesByName optionalPackages cfg.excludePackages;
   
         systemd.user.services = {
           plasma-run-with-systemd = {
  
positive.code:       environment.systemPackages =
          with libsForQt5;
          with plasma5; with kdeGear; with kdeFrameworks;
          [
            frameworkintegration
            kactivities
            kauth
            kcmutils
            kconfig
            kconfigwidgets
            kcoreaddons
            kdoctools
            kdbusaddons
            kdeclarative
            kded
            kdesu
            kdnssd
            kemoticons
            kfilemetadata
            kglobalaccel
            kguiaddons
            kiconthemes
            kidletime
            kimageformats
            kinit
            kirigami2 # In system profile for SDDM theme. TODO: wrapper.
            kio
            kjobwidgets
            knewstuff
            knotifications
            knotifyconfig
            kpackage
            kparts
            kpeople
            krunner
            kservice
            ktextwidgets
            kwallet
            kwallet-pam
            kwalletmanager
            kwayland
            kwayland-integration
            kwidgetsaddons
            kxmlgui
            kxmlrpcclient
            plasma-framework
            solid
            sonnet
            threadweaver
  
            breeze-qt5
            kactivitymanagerd
            kde-cli-tools
            kdecoration
            kdeplasma-addons
            kgamma5
            khotkeys
            kscreen
            kscreenlocker
            kwayland
            kwin
            kwrited
            libkscreen
            libksysguard
            milou
            plasma-browser-integration
            plasma-integration
            polkit-kde-agent
  
            plasma-desktop
            plasma-workspace
            plasma-workspace-wallpapers
  
            konsole
            oxygen
  
            breeze-icons
            pkgs.hicolor-icon-theme
  
            kde-gtk-config
            breeze-gtk
  
            qtvirtualkeyboard
  
            pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
          ]
  
          # Phonon audio backend
          ++ lib.optional (cfg.phononBackend == "gstreamer") libsForQt5.phonon-backend-gstreamer
  
negative.code:       default = false;
      };
  
      excludePackages = mkOption {
        description = "List of default packages to exclude from the configuration";
        type = types.listOf types.package;
        default = [];
        example = literalExpression "[ pkgs.plasma5Packages.oxygen ]";
      };
  
      # Internally allows configuring kdeglobals globally
      kdeglobals = mkOption {
        internal = true;
  