Keyboard Layout Customization: Difference between revisions
mNo edit summary |
→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. | * <code>services.xserver.xkb.variant</code>: X keyboard variant or multiple variants separated by commas (a variant can be empty). | ||
* <code>services.xserver. | * <code>services.xserver.xkb.model</code>: Keyboard model. | ||
* <code>services.xserver. | * <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"; | ||
variant = "workman,"; | |||
options = "grp:win_space_toggle"; | |||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> |