anchor.diff:    ];
   
     config = mkMerge [
  -    (mkIf cfg.enable {
  -
  -      # Seed our configuration into nixos-generate-config
  -      system.nixos-generate-config.desktopConfiguration = [
  -        ''
  -          # Enable the Plasma 5 Desktop Environment.
  -          services.xserver.displayManager.sddm.enable = true;
  -          services.xserver.desktopManager.plasma5.enable = true;
  -        ''
  -      ];
  -
  -      services.xserver.displayManager.sessionPackages = [ pkgs.libsForQt5.plasma5.plasma-workspace ];
  -      # Default to be `plasma` (X11) instead of `plasmawayland`, since plasma wayland currently has
  -      # many tiny bugs.
  -      # See: https://github.com/NixOS/nixpkgs/issues/143272
  -      services.xserver.displayManager.defaultSession = mkDefault "plasma";
  +    # Common Plasma dependencies
  +    (mkIf (cfg.enable || cfg.mobile.enable) {
   
         security.wrappers = {
           kcheckpass = {
  
positive.code:           serviceConfig.Type = "oneshot";
            script = activationScript;
          };
  
          plasma-run-with-systemd = {
            description = "Run KDE Plasma via systemd";
            wantedBy = [ "basic.target" ];
  
negative.code:           '';
          };
        };
      })
  
      # Plasma Mobile
      (mkIf cfg.mobile.enable {
        assertions = [
          {
  