Skip to content

evremap: input validation excludes valid options #392906

@hexedsilicon

Description

@hexedsilicon

Nixpkgs version

  • Stable (24.11)

Describe the bug

evremap can remap other things besides just KEYS. However the input validation only searches for KEY when there are other devices that can be remapped.

Steps to reproduce

evremap list-keys|grep BTN

or if you want to see what your input device is
sudo evremap list-devices (find your mouse)
sudo evremap debug-events --device-name "Logitech G###"
click your buttons in the term and see that they start with BTN

services.evremap = {
    enable = true;
    settings = { 
      device_name = "Logitech G###";
      remap = [
        {
          input = [
            "BTN_SIDE"
          ];
          output = [
            "BTN_LEFT"
          ];
        }   
      ];  
    };  
  };  

Expected behaviour

evremap should be able to remap BTN as well

Screenshots

No response

Relevant log output

` error: A definition for option `services.evremap.settings.remap."[definition 1-entry 1]".input."[definition 1-entry 1]"' is not of type `key ID prefixed with KEY_'. Definition values:
       - In `/nix/store/89khlgjbq9jjmlpiypwgf5h56dd3dzl9-source/hosts/myhost/configuration.nix': "BTN_SIDE"`

Additional context

No response

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.12.15-xanmod1, NixOS, 24.11 (Vicuna), 24.11.20250226.f44bd8c
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.24.12
  • channels(root): "nixos-24.05"
  • channels(myuser): "home-manager-23.11.tar.gz"
  • nixpkgs: /nix/store/fy7zcm8ya6p215wvrlqrl8022da6asn0-source

Notify maintainers

@pluiedev

Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions