diff --git a/machines/hephaestus/configuration.nix b/machines/hephaestus/configuration.nix index 2233c50..dc7e1b5 100644 --- a/machines/hephaestus/configuration.nix +++ b/machines/hephaestus/configuration.nix @@ -118,7 +118,9 @@ in }; }; - systemd.services.NetworkManager-wait-online.enable = false; + systemd.services = { + NetworkManager-wait-online.enable = false; + }; system = { autoUpgrade.enable = true; @@ -195,6 +197,9 @@ in resolved.enable = true; sshd.enable = true; tailscale.enable = true; + udev.extraRules = '' + ACTION=="add", ATTR{idVendor}=="041e", ATTR{idProduct}=="3255", RUN+="${pkgs.sbx-h6-rgb}/bin/sbx-h6-ctl -c c010ff 041e:3255" + ''; xserver.videoDrivers = [ "amdgpu" ]; xserver = { enable = true; @@ -238,6 +243,7 @@ in podman psst qemu + sbx-h6-rgb strace tailscale traceroute diff --git a/overlays/default.nix b/overlays/default.nix index cc90161..d67cd76 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,4 +1,5 @@ final: prev: { + sbx-h6-rgb = prev.callPackage ./sbx-h6-rgb { }; tmux-sessionizer = prev.callPackage ./tmux-sessionizer { }; vpngate = prev.callPackage ./vpngate { }; } diff --git a/overlays/sbx-h6-rgb/default.nix b/overlays/sbx-h6-rgb/default.nix new file mode 100644 index 0000000..c2588f9 --- /dev/null +++ b/overlays/sbx-h6-rgb/default.nix @@ -0,0 +1,38 @@ +{ lib +, fetchFromGitHub +, pkgs +, stdenv +, +}: +stdenv.mkDerivation rec { + pname = "sbx-h6-rgb"; + version = "95b4ef9788ef94e557a4d1e815079d5ea8a70943"; + + src = fetchFromGitHub { + owner = "Oscillope"; + repo = "sbx-h6-rgb"; + rev = version; + sha256 = "sha256-tKKNdzijloBiGBHf5C604824B/BbxBxvCL/ms4orT9M="; + }; + + buildInputs = with pkgs; [ + hidapi + ]; + + buildPhase = '' + make + ''; + + installPhase = '' + install -D sbx-h6-ctl $out/bin/sbx-h6-ctl + ''; + + meta = with lib; { + description = "Creative SoundBlasterX RGB LED setter."; + license = licenses.gpl3; + maintainers = with maintainers; [ davegallant ]; + platforms = platforms.linux; + }; + +} +