Colemak Mods Implementation

I am trying to port over all the important Colemak mods, these include Curl, Angle, Wide, Symbols and others, and help would be much appreciated.

The repository contains shell scripts and XKB Configuration Files.

Should the mods be included in one big meta-package? Or should the mods be available as individual packages? Should we patch the XKeyboardConfig derivation?

If you can help in any way possible, feel free to reply!

1 Like

For now, on nixos-unstable, services.xserver.extraLayputs seems to be broken, as is patching xkeyboard-config in xorg itself. First we need to fix that, and then we could implement a way to specify the desired keyboard configuration, in the same way DreymaR’s scripts do it, but in Nix as an override.

I managed to get a modified version of DreymaR’s script to work. If anyone is interested, check out my repository.

This is only tested on nixos-20.09. If it works for anyone on nixos-unstable, please tell me.

1 Like

Can you tell me what’s wrong with xserver.extraLayouts? As far as I now, it’s working perfectly fine as of NixOS 20.09.

You should be able to load any xkb symbols, geometry, keycodes, etc. files, as described in the manual, and the layout will be able to load it via setxkbmap or the xserver.xkb* options.

To be honest, I didn’t think it would work, so I didn’t test it. I’m doing that now.

My reason was, if I ever wanted to change the layout, I would have to rerun the script and replace the xkbSymbols file. It’s not a valid reason though, as all mods are implemented in the colemak symbols file.

I replaced all the overrides with this code in services.xserver:

extraLayouts = {
  colemak = {
    description = "DreymaR's Colemak mods";
    languages = [ "eng" ];
    symbolsFile = /etc/nixos/xkb/colemak;
  };
  ro = {
    description = "Romanian modded with Colemak";
    languages = [ "rum" ];
    symbolsFile = /etc/nixos/xkb/ro;
  };
};

The files get where they should, and all seems okay.
However, besides

xkbModel = "pc105aw-sl";
xkbOptions = "misc:cmk_curl_dh";
xkbVariant = "cmk_ed_ks";

not working, I can’t set those with setxkbmap either, like I could when overriding.

EDIT: It seems the script also modifies keymaps, rules, geometry and types, apart from symbols. And not just one file. Even after including (most of) everything, it still doesn’t work. Maybe I’m not digging deep enough…

DreymaR merged my fork, so now everyone can use the main repo.