nixpkgs/nixos/modules/hardware/uinput.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
406 B
Nix
Raw Permalink Normal View History

2024-08-10 21:32:11 +02:00
{ config, lib, ... }:
2019-12-22 21:10:48 +01:00
let
cfg = config.hardware.uinput;
2024-08-10 21:32:11 +02:00
in
{
2019-12-22 21:10:48 +01:00
options.hardware.uinput = {
2020-03-30 04:05:52 +03: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 = { };
2019-12-22 21:10:48 +01:00
services.udev.extraRules = ''
SUBSYSTEM=="misc", KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"
'';
};
}