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