Final SOLUTION:
Someone messages me and told me I don’t need to specify the virtual keyboard with GDM. I’m not a Gnome user, which means I don’t typically use GDM, so that was news to me. It also saved me trouble because I was trying to debug how to keep the keyboard loaded using systemd.
This is the final working config. – I am making this as the solution. No error and it works!
# ----------------------------------------
# 🖼️ Graphical Desktop.
# ----------------------------------------
# 🖼️ Enable KDE Plasma (Graphical Desktop).
# This enables the KDE Plasma desktop — a modern, user-friendly graphical interface.
# It also enables GDM (the login screen), which is required for graphical logins.
# Without it, you won't see a login screen or access KDE.
services.desktopManager.plasma6.enable = true; # Enables the KDE Plasma desktop environment.
services.xserver.displayManager.gdm.wayland = true; # Enable Wayland (modern graphical system).
programs.xwayland.enable = true; # xWayland support for x11 apps
services.displayManager.sddm.enable = false; # Required Disable SDDM - Disabled because it does not work with a Virtual Keyboard.
services.xserver.displayManager.gdm.enable = true; # Required for graphical login. - GDM (Grnome Display Manager) works with VM Keyboard and can be used with KDE.
# 🧑💻 Keyboard Layout (X11 only).
# Sets the keyboard layout for X11. Wayland layouts are handled through KDE settings.
# Change the layout code below if you're using something other than US QWERTY.
services.xserver.xkb = {
layout = "us"; # ⬅️ Change this to your layout (e.g., "de", "fr", "uk").
variant = ""; # Optional: Variant for more specific layouts.
};
# ----------------------------------------
# 🖱️ Touchpad & Input Device Support.
# ----------------------------------------
# This enables the libinput driver for touchpads and other input devices.
# KDE handles most input automatically under Wayland, but enabling this ensures
# proper support across both X11 and Wayland — especially for touchpads and touchscreens.
services.libinput.enable = true; # Recommended for reliable input device support.