nixpkgs/nixos/modules/services/misc/input-remapper.nix
stuebinm 6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00

31 lines
1.1 KiB
Nix

{ pkgs, lib, config, ... }:
with lib;
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 = 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 {
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 = cfg.serviceWantedBy;
};
meta.maintainers = with lib.maintainers; [ LunNova ];
}