2019-12-22 21:10:48 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.hardware.uinput;
|
|
|
|
in {
|
|
|
|
options.hardware.uinput = {
|
2024-04-13 14:54:15 +02:00
|
|
|
enable = lib.mkEnableOption "uinput support";
|
2019-12-22 21:10:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
boot.kernelModules = [ "uinput" ];
|
|
|
|
|
|
|
|
users.groups.uinput = {};
|
|
|
|
|
|
|
|
services.udev.extraRules = ''
|
|
|
|
SUBSYSTEM=="misc", KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|