How can I set layout toggling on <win+caps>
in NixOS configuration.nix
only?
Asked
Active
Viewed 376 times
0
How can I set layout toggling on <win+caps>
in NixOS configuration.nix
only?
configuration.nix
to set up ALT+SHIFT to toggle the keyboard language between English and Thai. – Emmanuel Rosa Mar 09 '19 at 12:42services.xserver.xkbOptions
to"grp:win_caps_toggle"
, but first customwin_caps_toggle
option should be defined; here is the answer how to do it, but can it be done inconfiguration.nix
only? BTW saw your vids about NixOS installation. – Anonymous Mar 09 '19 at 21:18share/X11/xkb/symbols/group
andshare/X11/xkb/rules/evdev.lst
. To do this you need the nixpkgs function which recursively symlinks a tree of files. For the life of me, I cannot remember the name of this function.... – Emmanuel Rosa Mar 12 '19 at 14:45services.xserver.xkbDir
to the output of said derivation. When Xorg runs it will use thexkbDir
for keyboard settings. Since it would point to the same files it currently does (due to the symlink-ing) PLUS the custom files you provide, that should allow you to use <win+caps> in NixOS withconfiguration.nix
. The final step is settingservices.xserver.xkbOptions = "grp:win_caps_toggle";
Overall, this will require some troubleshooting, hence I recommend asking in the NixOS Discourse community or on IRC. – Emmanuel Rosa Mar 12 '19 at 14:50