How to changing TTY keyboard layout?

I’m trying to customize the keyboard RU layout in the console. But it does not work in the terminal (for example tty2,3,4). Works only for X terminal.

xserver = {
  enable = true;
  layout = "us,ru";
  xkbOptions = "caps:swapescape,grp:rctrl_rshift_toggle";

Could you specify settings for TTY layout

I think that is what the consoleKeyMap option is for:

1 Like

I use i18n.consoleUseXkbConfig (for TTY to use the same settings).


  services.xserver.layout = "us,ua";
  services.xserver.xkbVariant = "workman,";

  # Use same config for linux console
  i18n.consoleUseXkbConfig = true;
1 Like

Works for me, Thanks!