diff options
author | Philipp Middendorf <middendorf@plapadoo.de> | 2019-12-22 21:10:48 +0100 |
---|---|---|
committer | Jan Solanti <jhs@psonet.com> | 2020-03-30 00:16:21 +0300 |
commit | 35035a543c9ed2e3383ecfdf6b9c610e20c3223c (patch) | |
tree | b1d580c9f5eece946f7bab2ab32afccc2439e5f6 /nixos/modules/hardware | |
parent | 1992768157d7456748ec28e01c8952cf09b53fbf (diff) |
xow: init at 0.2
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r-- | nixos/modules/hardware/uinput.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/modules/hardware/uinput.nix b/nixos/modules/hardware/uinput.nix new file mode 100644 index 000000000000..101c12fe257e --- /dev/null +++ b/nixos/modules/hardware/uinput.nix @@ -0,0 +1,19 @@ +{ 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" + ''; + }; +} |