xow: init at 0.2

This commit is contained in:
Philipp Middendorf
2020-03-30 00:16:21 +03:00
committed by Jan Solanti
parent 1992768157
commit 35035a543c
5 changed files with 85 additions and 0 deletions
+30
View File
@@ -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";
};
};
};
}