Skip to content

Commit

Permalink
sdgyrodsu: unstable-2022-08-22 -> 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
K900 committed Nov 8, 2023
1 parent b2aabc1 commit 626d4bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
12 changes: 2 additions & 10 deletions modules/steamdeck/sdgyrodsu.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,15 @@ in
};
};
config = mkIf cfg.enableGyroDsuService {
systemd.services.sdgyrodsu = {
systemd.user.services.sdgyrodsu = {
description = "Cemuhook DSU server for the Steam Deck Gyroscope";
wantedBy = [ "multi-user.target" ];
path = [ pkgs.usbutils ];
wantedBy = [ "default.target" ];
serviceConfig = {
DynamicUser = true;
SupplementaryGroups = [ "input" ];
ExecStart = "${pkgs.sdgyrodsu}/bin/sdgyrodsu";
PrivateTmp = true;
ProtectSystem = "strict";
ProtectHome = true;
};
};

services.udev.extraRules = ''
# This rule is needed to expose the hiddev devices to sdgyrodsu
SUBSYSTEM=="usbmisc", ATTRS{idVendor}=="28de", MODE="0660", GROUP="input"
'';
};
}
16 changes: 8 additions & 8 deletions pkgs/sdgyrodsu/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{ lib, stdenv, fetchFromGitHub, ncurses }:
{ lib, stdenv, fetchFromGitHub, ncurses, hidapi, systemd }:

stdenv.mkDerivation {
stdenv.mkDerivation(finalAttrs: {
pname = "sdgyrodsu";
version = "unstable-2022-08-22";
version = "2.0";

src = fetchFromGitHub {
owner = "kmicki";
repo = "SteamDeckGyroDSU";
rev = "6244cbc3ec55687efa9b6ade32d6c04637065003";
sha256 = "sha256-3hMSgFqNV9GyShwU0aB3tEpx82SUBHGl9jpYDYDua8k=";
rev = "v${finalAttrs.version}";
sha256 = "sha256-bYaqT2fznIQ8UPKUBQZFLB02XuVx3zDeX7XtsBAZfWk=";
};

buildInputs = [ ncurses ];
buildInputs = [ ncurses hidapi systemd ];

makeFlags = [ "NOPREPARE=1" "release" ];
makeFlags = [ "NOPREPARE=1" "CHECKDEPS=" "release" ];

installPhase = ''
runHook preInstall
Expand All @@ -29,4 +29,4 @@ stdenv.mkDerivation {
homepage = "https://github.com/kmicki/SteamDeckGyroDSU";
license = licenses.mit;
};
}
})

0 comments on commit 626d4bd

Please sign in to comment.