1 { pkgs, lib, config, ... }:
2 let cfg = config.services.input-remapper; in
5 services.input-remapper = {
6 enable = lib.mkEnableOption "input-remapper, an easy to use tool to change the mapping of your input device buttons";
7 package = lib.mkPackageOption pkgs "input-remapper" { };
8 enableUdevRules = lib.mkEnableOption "udev rules added by input-remapper to handle hotplugged devices. Currently disabled by default due to https://github.com/sezanzeb/input-remapper/issues/140";
9 serviceWantedBy = lib.mkOption {
10 default = [ "graphical.target" ];
11 example = [ "multi-user.target" ];
12 type = lib.types.listOf lib.types.str;
13 description = "Specifies the WantedBy setting for the input-remapper service.";
18 config = lib.mkIf cfg.enable {
19 services.udev.packages = lib.mkIf cfg.enableUdevRules [ cfg.package ];
20 services.dbus.packages = [ cfg.package ];
21 systemd.packages = [ cfg.package ];
22 environment.systemPackages = [ cfg.package ];
23 systemd.services.input-remapper.wantedBy = cfg.serviceWantedBy;
26 meta.maintainers = with lib.maintainers; [ LunNova ];