How to set up desktop environment per user

I want to add a guest user to my desktop, but want to set up my guest account to use plasma ( I use i3 and my guest is used to a full desktop environment ).

Is there a way I can set this up to be the default on their user account, but keep my default to be just i3?

Relevant X11 section:

  # X11             
  services.xserver = {                               
    enable = true;                    
    layout = "us";    
                                             
    displayManager.sddm.enable = true;            
    desktopManager.default = "none";    
                                                                      
    windowManager.default = "i3";                                     
    windowManager.i3.enable = true;                                   
  };                                                                  
  • Ideally Iā€™d like this to be agnostic of the displayManager, since I want to move away from sddm?
1 Like

Hi @epigramengineer

I had somehow the same problem :slight_smile: (gnome vs i3)

This is what works for me:

  1. Use home-manager
  2. Inside home-manager user-specific config, define xsession entry where you can pass windowManager.commad:

This will create .xsession in your home dir with appropriate xsession startup command (either i3 or whatever else).

Important: do not enable your desktopManager globally via services.xserver.desktopManager.gnome.enable = true.

In my case it works.