anchor.diff:        if ! [ -f "$kdeglobals" ]
         then
             kcminputrc="''${XDG_CONFIG_HOME}/kcminputrc"
  -          if ! [ -f "$kcminputrc" ]
  -          then
  +          if ! [ -f "$kcminputrc" ]; then
                 cat ${kcminputrc} >"$kcminputrc"
             fi
   
             gtkrc2="$HOME/.gtkrc-2.0"
  -          if ! [ -f "$gtkrc2" ]
  -          then
  +          if ! [ -f "$gtkrc2" ]; then
                 cat ${gtkrc2} >"$gtkrc2"
             fi
   
             gtk3_settings="''${XDG_CONFIG_HOME}/gtk-3.0/settings.ini"
  -          if ! [ -f "$gtk3_settings" ]
  -          then
  +          if ! [ -f "$gtk3_settings" ]; then
                 mkdir -p "$(dirname "$gtk3_settings")"
                 cat ${gtk3_settings} >"$gtk3_settings"
             fi
  
positive.code:           kidletime
            kimageformats
            kinit
            kirigami2  # In system profile for SDDM theme. TODO: wrapper.
            kio
            kjobwidgets
            knewstuff
  
negative.code:       security.pam.services.lightdm.enableKwallet = true;
        security.pam.services.sddm.enableKwallet = true;
  
        systemd.user.services = {
          plasma-early-setup = mkIf cfg.runUsingSystemd {
            description = "Early Plasma setup";
            wantedBy = [ "graphical-session-pre.target" ];
            serviceConfig.Type = "oneshot";
            script = activationScript;
          };
  
          plasma-run-with-systemd = {
            description = "Run KDE Plasma via systemd";
            wantedBy = [ "basic.target" ];
            serviceConfig.Type = "oneshot";
            script = ''
              ${set_XDG_CONFIG_HOME}
  
              ${kdeFrameworks.kconfig}/bin/kwriteconfig5 \
                --file startkderc --group General --key systemdBoot ${lib.boolToString cfg.runUsingSystemd}
            '';
          };
        };
  
        xdg.portal.enable = true;
        xdg.portal.extraPortals = [ plasma5.xdg-desktop-portal-kde ];
  
  