Add spacenav module.

This commit is contained in:
Gabriel Ebner 2021-05-22 15:14:01 +02:00
parent 81e29fea39
commit 197e008f04
2 changed files with 23 additions and 3 deletions

View File

@ -14,6 +14,7 @@
./v4l2loopback.nix ./v4l2loopback.nix
./huion.nix ./huion.nix
# ./unstable-nix.nix # ./unstable-nix.nix
./spacenav.nix
]; ];
environment.etc."lvm/lvm.conf".text = '' environment.etc."lvm/lvm.conf".text = ''
@ -55,7 +56,6 @@
piper piper
ddcutil ddcutil
ddcui ddcui
spnavcfg
]; ];
services.thermald.enable = true; services.thermald.enable = true;
@ -118,8 +118,6 @@
# enable = true; # enable = true;
# }; # };
hardware.spacenavd.enable = true;
services.udev.extraRules = '' services.udev.extraRules = ''
# allow admin use of i2c devices # allow admin use of i2c devices
ACTION=="add", KERNEL=="i2c-[0-9]*", GROUP="wheel", MODE="666" ACTION=="add", KERNEL=="i2c-[0-9]*", GROUP="wheel", MODE="666"

22
spacenav.nix Normal file
View File

@ -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";
})
];
});
};
}