Multible xkb Keyboard Layouts

Hi, I’m new to nixos and have problems setting up the keyboard layout on the login screen of gdm. There is the option xserver.layouts where I can set up multiple layouts (like de, us…) , but I can only set up one xkbVariant? for explanation, i am using the neo keyboard layout (it is a special layout like dvorak) and it is located under the de layouts, but i want to get the option to switch between neo and qwerty on the login screen, so guests can use the guest account with a normal keyboard layout. how can i do that?

In case someone else finds this thread and have the same question - this is how I’ve solved this on my machine:

services.xserver.layout = "se,se";
services.xserver.xkbVariant = "us,";
services.xserver.xkbOptions = "eurosign:e,terminate:ctrl_alt_bksp,caps:ctrl_modifier,grp:shifts_toggle,grp:shifts_toggle";

The options are identical to those you give setkbmap:

setxkbmap -layout se,se -variant us, -option eurosign:e,terminate:ctrl_alt_bksp,caps:ctrl_modifier,grp:shifts_toggle,grp:shifts_toggle
1 Like