Created
April 3, 2021 13:07
-
-
Save sheijk/f9781cde5641e5bccbecfcbd61b3ebf6 to your computer and use it in GitHub Desktop.
evdevremapper systemd service on nixos
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
devices: | |
- input_name: 'AT Translated Set 2 keyboard' | |
output_name: 'AT Translated Set 2 keyboard remapped' | |
remappings: | |
# Fix key right of left shift | |
KEY_102ND: | |
- KEY_GRAVE | |
# more omitted as it doesn't change the issue |
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
systemd.user.services."keyboard-remapping" = { | |
enable = true; | |
path = [pkgs.evdevremapkeys]; | |
wantedBy = [ "default.target" ]; | |
serviceConfig = { | |
WorkingDirectory = "/tmp"; | |
ExecStart = "${pkgs.evdevremapkeys}/bin/evdevremapkeys -f /etc/nixos/keyboard/config.yaml"; | |
Restart = "always"; | |
PrivateTmp = true; | |
NoNewPrivileges = true; | |
}; | |
}; |
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
Apr 03 02:37:40 nixos evdevremapkeys[1119]: File "/nix/store/z3m2k16zbhj18kh3rmzyh977j1i20da3-python3.8-evdevremapkeys-0.1.0/lib/python3.8/site-packages/evdevremapkeys/evdevremapkeys.py", line 262, in register_device | |
Apr 03 02:37:40 nixos evdevremapkeys[1119]: raise NameError("Can't find input device") | |
Apr 03 02:37:40 nixos evdevremapkeys[1119]: NameError: Can't find input device | |
Running the same in a shell (without systemd) works |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment