Configuring NixOS to boot to VT's instead of GDM/SDDM

When I was onboarded to Linux 20 years ago, my first distro was Slackware. I remember Pat V rolled the default Slackware configuration without a display manager. There was no GDM/LDM/KDE3 -based equivalent. Slackware booted to a VT shell (CLI) login prompt to enter your username. Once logged in, there was a text-based utility to choose your wm and then to launch your choice the user would subsequently just need to run: startx.

I haven’t used Slackware in a long time. I doubt they have the same arrangements. But how would I achieve that same result with NixOS?

  1. How do I configure NixOS to boot to a VT (without GDM/SDDM)?
  2. Now that X11 is dying, what alternatives are there to choose from installed Wayland wm/Desktop Environments?
  3. And what would be the command to start a Wayland session from CLI?
    • I know that to start Hyprland, from a shell users can just type: Hyprland and it will load. What would be the equivalent to load gnome-shell?

Btw, I am running the NixOS demo appliance in VirtualBo as I experiment as a user new to this community.


Always check NixOS Search for options related to what you’re configuring.

What do you mean by that?

I don’t think gnome-shell is intended to be launched stand-alone without login manager and desktop manager integration.

Hi @Atemu. Thank you for replying to my questions.

You asked a follow up question:

To better explain what I was getting at, X11 is in the process of begin deprecated. This year 2024 looks like many major desktop environments including Gnome and Plasma are venturing to focus their efforts on Wayland and stop releasing updates to their X11 counterparts. That’s what I meant by X11 is dying.

Most modern Linux distros including NixOS demo appliance (Plasma) use SDDM or GDM or LDM to enable users to first select their window manager and then enter their credentials. That’s how they would choose either Plasma or xfce for example. But in Slackware, since there is no GUI login manager, it just loads to a bare VT terminal. Once logged in, the user then uses: $ xwmconfig which looks like this:

After making your selection, you then run: $ startx. Here is the location in the official Slackware docs which explains how to use that feature.

However now that X11 is almost dead, what alternatives are there to choose and launch a Wayland wm via CLI? What is the equivalent to $ xwmconfig and $ startx but for Wayland instead of X11?

That’s a more clear approach to what I was trying to get at with that question above.

The ones not intended to be a DE can simply be started from the CLI. Just sway will start sway for instance.

GNOME and I think Plasma can’t be started like this as they have dependencies on external services.

1 Like