nixpkgs/nixos/modules/hardware/uinput.nix
Philipp Middendorf 35035a543c xow: init at 0.2
2020-03-30 00:16:21 +03:00

19 lines
429 B
Nix

{ config, pkgs, lib, ... }:
let
cfg = config.hardware.uinput;
in {
options.hardware.uinput = {
enable = lib.mkEnableOption "Whether to enable 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"
'';
};
}