summaryrefslogtreecommitdiffstats
path: root/nixos/modules/hardware
diff options
context:
space:
mode:
authorPhilipp Middendorf <middendorf@plapadoo.de>2019-12-22 21:10:48 +0100
committerJan Solanti <jhs@psonet.com>2020-03-30 00:16:21 +0300
commit35035a543c9ed2e3383ecfdf6b9c610e20c3223c (patch)
treeb1d580c9f5eece946f7bab2ab32afccc2439e5f6 /nixos/modules/hardware
parent1992768157d7456748ec28e01c8952cf09b53fbf (diff)
xow: init at 0.2
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r--nixos/modules/hardware/uinput.nix19
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"
+ '';
+ };
+}