After setting up a new Nixos installation, upon logging into the lightdm greeter I got an error of Failed to start session.

I've installed a custom xmonad executable, and I'm NOT using the default one.

I could get it to work by adding the following to my config:

displayManager.defaultSession = "none+xmonad";
windowManager.xmonad = {   
  enable = true;

What is this "session" configuration exactly? And how do I configure my own rather than hackily using the default xmonad one?

I tried setting the default session on it's own with just the following:

displayManager.defaultSession = "none+xmonad";

But got an error of:

trace: Default graphical session, 'none+xmonad', not found.
Valid names for 'services.xserver.displayManager.defaultSession' are:

error: The option value `services.xserver.displayManager.defaultSession' in `/etc/nixos/services-pineapple.nix' is not of type `session name'.
(use '--show-trace' to show detailed location information)

1 Answer 1


I managed to solve it with the following:

    displayManager.defaultSession = "myxmonad";
    displayManager.session = [
        manage = "desktop";
        name = "myxmonad";
        start = ''exec $HOME/.xsession'';

Found the answer here: https://discourse.nixos.org/t/opening-i3-from-home-manager-automatically/4849/2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .