2024-08-10 20:32:11 +01:00
|
|
|
{ config, lib, ... }:
|
2019-12-22 20:10:48 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.hardware.uinput;
|
2024-08-10 20:32:11 +01:00
|
|
|
in
|
|
|
|
{
|
2019-12-22 20:10:48 +00:00
|
|
|
options.hardware.uinput = {
|
2020-03-30 02:05:52 +01:00
|
|
|
enable = lib.mkEnableOption "uinput support";
|
2019-12-22 20:10:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
boot.kernelModules = [ "uinput" ];
|
|
|
|
|
2024-08-10 20:32:37 +01:00
|
|
|
users.groups.uinput.gid = config.ids.gids.uinput;
|
2019-12-22 20:10:48 +00:00
|
|
|
|
|
|
|
services.udev.extraRules = ''
|
|
|
|
SUBSYSTEM=="misc", KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|