nixos/input-remapper: Fix missing [] for package, add enableUdevRules and serviceWantedBy options, add meta.maintainers
This commit is contained in:
parent
652aa6df2c
commit
d8cb494765
1 changed files with 13 additions and 12 deletions
|
@ -7,23 +7,24 @@ let cfg = config.services.input-remapper; in
|
|||
options = {
|
||||
services.input-remapper = {
|
||||
enable = mkEnableOption "input-remapper, an easy to use tool to change the mapping of your input device buttons.";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.input-remapper;
|
||||
defaultText = literalExpression "pkgs.input-remapper";
|
||||
description = ''
|
||||
The input-remapper package to use.
|
||||
'';
|
||||
package = options.mkPackageOption pkgs "input-remapper" { };
|
||||
enableUdevRules = 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";
|
||||
serviceWantedBy = mkOption {
|
||||
default = [ "graphical.target" ];
|
||||
example = [ "multi-user.target" ];
|
||||
type = types.listOf types.str;
|
||||
description = "Specifies the WantedBy setting for the input-remapper service.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# FIXME: udev rule hangs sometimes when lots of devices connected, so let's not use it
|
||||
# config.services.udev.packages = mapper-pkg;
|
||||
services.dbus.packages = cfg.package;
|
||||
systemd.packages = cfg.package;
|
||||
environment.systemPackages = cfg.package;
|
||||
services.udev.packages = mkIf cfg.enableUdevRules [ cfg.package ];
|
||||
services.dbus.packages = [ cfg.package ];
|
||||
systemd.packages = [ cfg.package ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
systemd.services.input-remapper.wantedBy = [ "graphical.target" ];
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ LunNova ];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue