mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
19 lines
411 B
Nix
19 lines
411 B
Nix
{ config, pkgs, 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 = {};
|
|
|
|
services.udev.extraRules = ''
|
|
SUBSYSTEM=="misc", KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"
|
|
'';
|
|
};
|
|
}
|