30 lines
787 B
Nix
30 lines
787 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.ptw.services.input-remapper;
|
|
in {
|
|
options.ptw.services.input-remapper = {
|
|
enable = lib.mkEnableOption "Enable the input-remapper service and install it";
|
|
postStartCommand = lib.mkOption {
|
|
default = "";
|
|
description = "Command to be executed after the input-remapper service has been started";
|
|
# type = ;
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
# TODO: Assert that uinput is in kernelModules
|
|
#services.udev = {
|
|
# packages = with pkgs; [ input-remapper ];
|
|
# extraRules = ''
|
|
# KERNEL=="uinput", GROUP="input", MODE="0660"
|
|
# '';
|
|
#};
|
|
services.input-remapper = {
|
|
enable = true;
|
|
enableUdevRules = true;
|
|
serviceWantedBy = [ "default.target" ];
|
|
};
|
|
};
|
|
}
|