-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep the udev key remapper on NixOS even after being rebooted (#829)
Attempt to use services.udev.extraHwdb again with mkBefore and mkAfter Fixes GH-801
- Loading branch information
Showing
3 changed files
with
19 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,19 @@ | ||
{ ... }: | ||
{ lib, ... }: | ||
{ | ||
# services.udev = { | ||
# enable = true; | ||
# # Settings keyremap in raw layer than X. See GH-784 | ||
services.udev = { | ||
enable = true; | ||
# Settings keyremap in raw layer than X. See GH-784 | ||
# | ||
# - Specify hardware names even if `evdev:input:*` working for mostcase. I should care both US and JIS layout | ||
# - How to get the KEYBOARD_KEY_700??: `evtest /dev/input/event??` | ||
# - How to get the hardware name:: `udevadm info --attribute-walk /dev/input/event?? | grep -F 'ATTRS{name}'` | ||
# - How to apply?: Rebuild and reboot. Don't use `sudo systemd-hwdb update && sudo udevadm trigger` except debugging purpose. | ||
extraHwdb = lib.mkBefore '' | ||
evdev:name:Topre REALFORCE 87 US:* | ||
KEYBOARD_KEY_70039=leftctrl # original: capslock | ||
# # Specify hardware names even if `evdev:input:*` working for mostcase | ||
# extraHwdb = '' | ||
# evdev:name:Topre REALFORCE 87 US:* | ||
# # original: capslock | ||
# KEYBOARD_KEY_70039=leftctrl | ||
# ''; | ||
# }; | ||
|
||
# Settings keyremap in raw layer than X. See GH-784 | ||
# Use another filename of "99-local.hwdb"", it is preserved for each host | ||
# | ||
# - Specify hardware names even if `evdev:input:*` working for mostcase. I should care both US and JIS layout | ||
# - How to get the KEYBOARD_KEY_700??: `evtest /dev/input/event??` | ||
# - How to get the hardware name:: `udevadm info --attribute-walk /dev/input/event?? | grep -F 'ATTRS{name}'` | ||
# - How to apply?: After nixos-rebuild switch `sudo systemd-hwdb update && sudo udevadm trigger` | ||
environment.etc."udev/hwdb.d/98-keyboards.hwdb".text = '' | ||
evdev:name:Topre REALFORCE 87 US:* | ||
KEYBOARD_KEY_70039=leftctrl # original: capslock | ||
evdev:name:Lenovo ThinkPad Compact USB Keyboard with TrackPoint:* # Both US and JIS have same name | ||
KEYBOARD_KEY_70039=leftctrl # original: capslock, Both US and JIS have same keycode for capslock | ||
''; | ||
evdev:name:Lenovo ThinkPad Compact USB Keyboard with TrackPoint:* # Both US and JIS have same name | ||
KEYBOARD_KEY_70039=leftctrl # original: capslock, Both US and JIS have same keycode for capslock | ||
''; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters