at 23.11-pre 423 B view raw
1{ config, pkgs, lib, ... }: 2 3let 4 cfg = config.hardware.uinput; 5in { 6 options.hardware.uinput = { 7 enable = lib.mkEnableOption (lib.mdDoc "uinput support"); 8 }; 9 10 config = lib.mkIf cfg.enable { 11 boot.kernelModules = [ "uinput" ]; 12 13 users.groups.uinput = {}; 14 15 services.udev.extraRules = '' 16 SUBSYSTEM=="misc", KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput" 17 ''; 18 }; 19}