diff --git a/flammea.nix b/flammea.nix index 7c6657a..abe272c 100644 --- a/flammea.nix +++ b/flammea.nix @@ -14,6 +14,7 @@ ./v4l2loopback.nix ./huion.nix # ./unstable-nix.nix + ./spacenav.nix ]; environment.etc."lvm/lvm.conf".text = '' @@ -55,7 +56,6 @@ piper ddcutil ddcui - spnavcfg ]; services.thermald.enable = true; @@ -118,8 +118,6 @@ # enable = true; # }; - hardware.spacenavd.enable = true; - services.udev.extraRules = '' # allow admin use of i2c devices ACTION=="add", KERNEL=="i2c-[0-9]*", GROUP="wheel", MODE="666" diff --git a/spacenav.nix b/spacenav.nix new file mode 100644 index 0000000..5c3d878 --- /dev/null +++ b/spacenav.nix @@ -0,0 +1,22 @@ +{ config, pkgs, ... }: + +{ + + environment.systemPackages = with pkgs; [ + spnavcfg + ]; + + hardware.spacenavd.enable = true; + + nixpkgs.config.packageOverrides = pkgs: with pkgs; { + spacenavd = spacenavd.overrideDerivation (_: { + patches = spacenavd.patches ++ [ + (fetchpatch { + url = "https://github.com/FreeSpacenav/spacenavd/commit/fbf9019470f2511d24a368e2c9113361b58483d5.patch"; + sha256 = "1i98c3k4x8f35kpfp4b9xcwgq45mdjab2frp8c2jl6y62fs84d6j"; + }) + ]; + }); + }; + +}