From e2c080693cbaa07d8ea06f5bddea116a5b98af7d Mon Sep 17 00:00:00 2001 From: Andreas Schaafsma Date: Sun, 10 Nov 2024 06:37:03 +0100 Subject: [PATCH] add steelseries stuff --- .../andreas@drivebystation-nix/default.nix | 3 ++ packages/udev-steelseries/default.nix | 47 +++++++++++++++++++ .../hardware-configuration.nix | 1 + 3 files changed, 51 insertions(+) create mode 100644 packages/udev-steelseries/default.nix diff --git a/homes/x86_64-linux/andreas@drivebystation-nix/default.nix b/homes/x86_64-linux/andreas@drivebystation-nix/default.nix index 0ab0ad2..2cf5900 100644 --- a/homes/x86_64-linux/andreas@drivebystation-nix/default.nix +++ b/homes/x86_64-linux/andreas@drivebystation-nix/default.nix @@ -22,6 +22,9 @@ in pkgs.nil pkgs.steam pkgs.beeper + pkgs.my-namespace.udev-steelseries + pkgs.wine + pkgs.bottles ]; }; } \ No newline at end of file diff --git a/packages/udev-steelseries/default.nix b/packages/udev-steelseries/default.nix new file mode 100644 index 0000000..274d31b --- /dev/null +++ b/packages/udev-steelseries/default.nix @@ -0,0 +1,47 @@ +{ + # Snowfall Lib provides a customized `lib` instance with access to your flake's library + # as well as the libraries available from your flake's inputs. + lib, + # You also have access to your flake's inputs. + inputs, + + # The namespace used for your flake, defaulting to "internal" if not set. + namespace, + + # All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers + # programmatically or you may add the named attributes as arguments here. + pkgs, + stdenv, + fetchFromGitHub, + ... +}: + +stdenv.mkDerivation { + pname = "steelseries-udev-rules"; + version = "unstable-2024-11-10"; + + src = fetchFromGitHub { + owner = "MiddleMan5"; + repo = "steelseries-linux"; + rev = "d93dfdb6daeec150578e85e25b2e9df79e9539b7"; + sha256 = "sha256-yPw8QFKhlqb6lxQyYjBz34pEEfTVk1Yp9jFWdX5yH2k="; + }; + + dontBuild = true; + dontConfigure = true; + + installPhase = '' + mkdir -p $out/lib/udev/rules.d + cp resources/98-steelseries.rules $out/lib/udev/rules.d/98-steelseries.rules + mkdir -p $out/etc/udev/rules.d + cp resources/98-steelseries-init.py $out/etc/udev/rules.d/98-steelseries-init.py + ''; + + meta = with lib; { + description = "udev rules for Steelseries devices"; + license = licenses.unfree; + maintainers = with maintainers; [ asymmetric ]; + platforms = platforms.linux; + homepage = "https://github.com/MiddleMan5/steelseries-linux"; + }; +} \ No newline at end of file diff --git a/systems/x86_64-linux/drivebystation-nix/hardware-configuration.nix b/systems/x86_64-linux/drivebystation-nix/hardware-configuration.nix index 2672dc7..3d70a0a 100644 --- a/systems/x86_64-linux/drivebystation-nix/hardware-configuration.nix +++ b/systems/x86_64-linux/drivebystation-nix/hardware-configuration.nix @@ -35,4 +35,5 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }