From 35035a543c9ed2e3383ecfdf6b9c610e20c3223c Mon Sep 17 00:00:00 2001 From: Philipp Middendorf Date: Sun, 22 Dec 2019 21:10:48 +0100 Subject: xow: init at 0.2 --- nixos/modules/services/hardware/xow.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 nixos/modules/services/hardware/xow.nix (limited to 'nixos/modules/services/hardware') diff --git a/nixos/modules/services/hardware/xow.nix b/nixos/modules/services/hardware/xow.nix new file mode 100644 index 000000000000..a97dd5c870d7 --- /dev/null +++ b/nixos/modules/services/hardware/xow.nix @@ -0,0 +1,30 @@ +{ config, pkgs, lib, ... }: + +let + cfg = config.services.hardware.xow; +in { + options.services.hardware.xow = { + enable = lib.mkEnableOption "Whether to enable xow or not."; + }; + + config = lib.mkIf cfg.enable { + hardware.uinput.enable = true; + + users.users.xow = { + group = "uinput"; + isSystemUser = true; + }; + + systemd.services.xow = { + wantedBy = [ "multi-user.target" ]; + description = "Xbox One Wireless Dongle Driver"; + after = [ "systemd-udev-settle.service" ]; + serviceConfig = { + ExecStart = '' + ${pkgs.xow}/bin/xow + ''; + User = "xow"; + }; + }; + }; +} -- cgit 1.4.1