nixos/input-remapper: init

This commit is contained in:
Luna Nova 2022-02-10 08:55:03 -08:00
parent 639ff4f23c
commit 93d8783ad6
No known key found for this signature in database
2 changed files with 30 additions and 0 deletions

View file

@ -547,6 +547,7 @@
./services/misc/greenclip.nix
./services/misc/home-assistant.nix
./services/misc/ihaskell.nix
./services/misc/input-remapper.nix
./services/misc/irkerd.nix
./services/misc/jackett.nix
./services/misc/jellyfin.nix

View file

@ -0,0 +1,29 @@
{ 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 = mkOption {
type = types.package;
default = pkgs.input-remapper;
defaultText = literalExpression "pkgs.input-remapper";
description = ''
The input-remapper package to use.
'';
};
};
};
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;
systemd.services.input-remapper.wantedBy = [ "graphical.target" ];
};
}