Keyboard Layout Customization: Difference between revisions

Klinger (talk | contribs)
mNo edit summary
Rhendric (talk | contribs)
Simple: Update xkb options
Line 9: Line 9:
The easiest way to customize your keyboard layout on NixOS is with these options:
The easiest way to customize your keyboard layout on NixOS is with these options:


* <code>services.xserver.layout</code>: Keyboard layout, or multiple keyboard layouts separated by commas.
* <code>services.xserver.xkb.layout</code>: Keyboard layout, or multiple keyboard layouts separated by commas.
* <code>services.xserver.xkbVariant</code>: X keyboard variant or multiple variants separated by commas (a variant can be empty).  
* <code>services.xserver.xkb.variant</code>: X keyboard variant or multiple variants separated by commas (a variant can be empty).  
* <code>services.xserver.xkbModel</code>: Keyboard model.
* <code>services.xserver.xkb.model</code>: Keyboard model.
* <code>services.xserver.xkbOptions</code>: X keyboard options; layout switching goes here.
* <code>services.xserver.xkb.options</code>: X keyboard options; layout switching goes here.


=====Example:=====
=====Example:=====
Line 18: Line 18:
For desktop:
For desktop:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
services.xserver = {
services.xserver.xkb = {
   layout = "us,ru";
   layout = "us,ru";
   xkbVariant = "workman,";
   variant = "workman,";
   xkbOptions = "grp:win_space_toggle";
   options = "grp:win_space_toggle";
};
};
</syntaxhighlight>
</syntaxhighlight>