summary refs log tree commit diff
path: root/nixos/modules/services/hardware/xow.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/hardware/xow.nix')
-rw-r--r--nixos/modules/services/hardware/xow.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/nixos/modules/services/hardware/xow.nix b/nixos/modules/services/hardware/xow.nix
new file mode 100644
index 00000000000..311181176bd
--- /dev/null
+++ b/nixos/modules/services/hardware/xow.nix
@@ -0,0 +1,20 @@
+{ config, pkgs, lib, ... }:
+
+let
+  cfg = config.services.hardware.xow;
+in {
+  options.services.hardware.xow = {
+    enable = lib.mkEnableOption "xow as a systemd service";
+  };
+
+  config = lib.mkIf cfg.enable {
+    hardware.uinput.enable = true;
+
+    boot.extraModprobeConfig = lib.readFile "${pkgs.xow}/lib/modprobe.d/xow-blacklist.conf";
+
+    systemd.packages = [ pkgs.xow ];
+    systemd.services.xow.wantedBy = [ "multi-user.target" ];
+
+    services.udev.packages = [ pkgs.xow ];
+  };
+}