Closed TimoVerbrugghe closed 7 months ago
The input-remapper remapper service that's part of the system doesn't know which config to use until a user logs in and sets a config folder to use. As far as I can tell this is an intentional design decision for input-remapper, it wants to be multi-user and when you log out and log in as a different user a different config can be loaded.
If you use home-manager something like this works to automate launching the user part of input-remapper on login, assuming your desktop environment supports xdg autostart. An autostart desktop file is the upstream supported way to set it up.
xdg.configFile."autostart/input-mapper-autoload.desktop" = lib.mkIf nixosConfig.services.input-remapper.enable {
source = "${nixosConfig.services.input-remapper.package}/share/applications/input-remapper-autoload.desktop";
};
Otherwise, launching the input remapper GUI or adding a systemd user service that loads the user config when you log in should also work.
Thanks @LunNova for the quick response! I've used home-manager in order to run the input-remapper-autoload.desktop file to solve my issue.
I also tried to create an user systemd service that would load the config but there I encountered the same issue as mentioned in my first post, maybe it had to do with autologin... But anyway: doing it through home manager worked.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/input-remapper-not-working-as-expected/44459/2
Describe the bug
I'm using input-remapper to remap a key combination on my xbox controller (L3 + R3) to ALT-F4 in order to more easily close applications on my HTPC.
Defined input-remapper in my nixos configuration:
And set up the rules through the input-remapper-gtk graphical UI. This was working.
However, when rebooting the machine, the rules do not load in and systemctl status input-remapper says that it cannot autoload the rules:
If I try to stop and start the input-remapper service, it still gives me the same error. HOWEVER, when I stop the input-remapper service (systemctl stop input-remapper.service) and then start the program manually (with
input-remapper-service
) then the rules do load in when I connect my controllerI am autologging into my gamer account (using services.autologin.user = "gamer"), don't know if that could be the cause of this? However, I find it strange that stopping and starting the service after I've logged in doesn't work, but manually starting the program does...
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the systemd service to autoload the rules just as it does when I manually start input-remapper-service from the command line
Screenshots
If applicable, add screenshots to help explain your problem.
Notify maintainers
@LunNova
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.