472aeafc57
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
20 lines
429 B
Nix
20 lines
429 B
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
cfg = config.hardware.uinput;
|
|
in
|
|
{
|
|
options.hardware.uinput = {
|
|
enable = lib.mkEnableOption "uinput support";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
boot.kernelModules = [ "uinput" ];
|
|
|
|
users.groups.uinput.gid = config.ids.gids.uinput;
|
|
|
|
services.udev.extraRules = ''
|
|
SUBSYSTEM=="misc", KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"
|
|
'';
|
|
};
|
|
}
|