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!
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.
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.
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âŚ
Can you explain how to use dreymarâs repo with your changes? Iâm pretty new to NixOS, but I looked at the merge of your fork and saw the additions of â-sâ for NoSudo and â-câ for the path of X11.
I cloned Dreymarâs repo to ~/projects and used: bash install-dreymar-xmod.sh -s -n -- 4cw us us
With the following output:
@@@ DreymaRâs Big Bag Of Tricks install script (by GadOE, 2016-06) @@@
¤ Found mod root dir â./xkb-data_xmodâ
¤ Subdirectories to mod: âxkbâ
¤ Backing up: None
¤ Not using sudo.
¤ Replacing files in â/usr/lib/X11/xkbâ with mod
@@@ install-dreymar-xmod.sh - ERROR: System files copy error! @@@
I am in the process of trying to understand Keyboard Layout Customization - NixOS Wiki
Hope Iâm on the right track, canât figure out how to use the â-câ to point to the path of X11. Help is appreciated!
The reason the patching doesnât work the way you did it, is that files in the nix store are read only and can only be written during a package install / system rebuild. Simply calling that command in a terminal wonât work since it canât find the xkb files and even if it somehow finds them, it canât write to them. Thatâs why the command only works when inside a derivation.
In one of my previous replies I linked a file from my config. Since then the patch broke, probably as a consequence of some nixpkgs change. I never really looked into it because imo itâs a waste of time.
I recommend writing a xserver.extraLayouts entry manually, as it is sure to work and not cause any problems in the future. If it helps, Iâll also link the file I used that added Mod DH on top of the us colemak layout. Itâs here.
It may need a few modifications as it is probably using the old DHk instead of the newer DH standard.