mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
nixos/input-remapper: init
This commit is contained in:
parent
639ff4f23c
commit
93d8783ad6
2 changed files with 30 additions and 0 deletions
|
@ -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
|
||||
|
|
29
nixos/modules/services/misc/input-remapper.nix
Normal file
29
nixos/modules/services/misc/input-remapper.nix
Normal 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" ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue