xow: 0.2 -> 0.4

This commit is contained in:
Jan Solanti
2020-03-31 17:24:37 +03:00
parent 35035a543c
commit 081ed8f012
3 changed files with 17 additions and 29 deletions
+3 -16
View File
@@ -4,27 +4,14 @@ let
cfg = config.services.hardware.xow;
in {
options.services.hardware.xow = {
enable = lib.mkEnableOption "Whether to enable xow or not.";
enable = lib.mkEnableOption "xow as a systemd service";
};
config = lib.mkIf cfg.enable {
hardware.uinput.enable = true;
users.users.xow = {
group = "uinput";
isSystemUser = true;
};
systemd.packages = [ pkgs.xow ];
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";
};
};
services.udev.packages = [ pkgs.xow ];
};
}