xow: init at 0.2
This commit is contained in:
parent
1992768157
commit
35035a543c
5 changed files with 85 additions and 0 deletions
19
nixos/modules/hardware/uinput.nix
Normal file
19
nixos/modules/hardware/uinput.nix
Normal file
|
@ -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"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -65,6 +65,7 @@
|
||||||
./hardware/usb-wwan.nix
|
./hardware/usb-wwan.nix
|
||||||
./hardware/onlykey.nix
|
./hardware/onlykey.nix
|
||||||
./hardware/wooting.nix
|
./hardware/wooting.nix
|
||||||
|
./hardware/uinput.nix
|
||||||
./hardware/video/amdgpu.nix
|
./hardware/video/amdgpu.nix
|
||||||
./hardware/video/amdgpu-pro.nix
|
./hardware/video/amdgpu-pro.nix
|
||||||
./hardware/video/ati.nix
|
./hardware/video/ati.nix
|
||||||
|
@ -368,6 +369,7 @@
|
||||||
./services/hardware/thermald.nix
|
./services/hardware/thermald.nix
|
||||||
./services/hardware/undervolt.nix
|
./services/hardware/undervolt.nix
|
||||||
./services/hardware/vdr.nix
|
./services/hardware/vdr.nix
|
||||||
|
./services/hardware/xow.nix
|
||||||
./services/logging/SystemdJournal2Gelf.nix
|
./services/logging/SystemdJournal2Gelf.nix
|
||||||
./services/logging/awstats.nix
|
./services/logging/awstats.nix
|
||||||
./services/logging/fluentd.nix
|
./services/logging/fluentd.nix
|
||||||
|
|
30
nixos/modules/services/hardware/xow.nix
Normal file
30
nixos/modules/services/hardware/xow.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
32
pkgs/misc/drivers/xow/default.nix
Normal file
32
pkgs/misc/drivers/xow/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{ stdenv, fetchFromGitHub, libusb, gitMinimal }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "xow";
|
||||||
|
version = "0.2";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "medusalix";
|
||||||
|
repo = "xow";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "03ajal91xi52svzy621aa4jcdf0vj4pqd52kljam0wryrlmcpbr3";
|
||||||
|
};
|
||||||
|
|
||||||
|
makeFlags = [ "BUILD=RELEASE" "VERSION=${version}" ];
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
buildInputs = [ libusb ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp xow $out/bin
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = "https://github.com/medusalix/xow";
|
||||||
|
description = "Linux driver for the Xbox One wireless dongle";
|
||||||
|
license = licenses.gpl2Plus;
|
||||||
|
maintainers = [ maintainers.pmiddend ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
|
@ -26011,6 +26011,8 @@ in
|
||||||
|
|
||||||
xboxdrv = callPackage ../misc/drivers/xboxdrv { };
|
xboxdrv = callPackage ../misc/drivers/xboxdrv { };
|
||||||
|
|
||||||
|
xow = callPackage ../misc/drivers/xow { };
|
||||||
|
|
||||||
xbps = callPackage ../tools/package-management/xbps { };
|
xbps = callPackage ../tools/package-management/xbps { };
|
||||||
|
|
||||||
xcftools = callPackage ../tools/graphics/xcftools { };
|
xcftools = callPackage ../tools/graphics/xcftools { };
|
||||||
|
|
Loading…
Reference in a new issue