base: Add NVIDIA Tegra udev rules
This commit is contained in:
parent
e89d20735a
commit
2c145edb26
4 changed files with 71 additions and 7 deletions
|
@ -38,6 +38,9 @@
|
|||
base = {
|
||||
plymouth.enable = true;
|
||||
work = true;
|
||||
udev-rules = {
|
||||
nvidia = true;
|
||||
};
|
||||
};
|
||||
|
||||
desktop = {
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.eboskma.base;
|
||||
qmkUdevRules = pkgs.callPackage ./qmk { };
|
||||
probersRules = pkgs.callPackage ./probe-rs { };
|
||||
blink1Rules = pkgs.callPackage ./blink1-udev { };
|
||||
nvidiaRules = pkgs.callPackage ./nvidia { };
|
||||
picotoolRules = pkgs.callPackage ./picotool { };
|
||||
probersRules = pkgs.callPackage ./probe-rs { };
|
||||
qmkUdevRules = pkgs.callPackage ./qmk { };
|
||||
solo2Rules = pkgs.callPackage ./solo2 { };
|
||||
plymouth-nixos-blur = pkgs.callPackage ./plymouth-nixos-blur { };
|
||||
in
|
||||
|
@ -27,10 +28,11 @@ in
|
|||
};
|
||||
|
||||
udev-rules = {
|
||||
qmk = mkEnableOption "qmk udev rules";
|
||||
probe-rs = mkEnableOption "probe.rs udev rules";
|
||||
blink1 = mkEnableOption "blink(1) udev rules";
|
||||
nvidia = mkEnableOption "NVIDIA Tegra udev rules";
|
||||
picotool = mkEnableOption "picotool udev rules";
|
||||
probe-rs = mkEnableOption "probe.rs udev rules";
|
||||
qmk = mkEnableOption "qmk udev rules";
|
||||
solo2 = mkEnableOption "solo2 udev rules";
|
||||
};
|
||||
};
|
||||
|
@ -83,10 +85,11 @@ in
|
|||
|
||||
services.udev = {
|
||||
packages =
|
||||
(optional cfg.udev-rules.qmk qmkUdevRules)
|
||||
++ (optional cfg.udev-rules.probe-rs probersRules)
|
||||
++ (optional cfg.udev-rules.blink1 blink1Rules)
|
||||
(optional cfg.udev-rules.blink1 blink1Rules)
|
||||
++ (optional cfg.udev-rules.nvidia nvidiaRules)
|
||||
++ (optional cfg.udev-rules.picotool picotoolRules)
|
||||
++ (optional cfg.udev-rules.probe-rs probersRules)
|
||||
++ (optional cfg.udev-rules.qmk qmkUdevRules)
|
||||
++ (optional cfg.udev-rules.solo2 solo2Rules);
|
||||
};
|
||||
|
||||
|
|
30
modules/base/nvidia/default.nix
Normal file
30
modules/base/nvidia/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv }:
|
||||
let
|
||||
pname = "nvidia-tegra-udev-rules";
|
||||
version = "20241015";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = ./.;
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
install -D $src/nvidia.rules $out/lib/udev/rules.d/90-oe4t.rules
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "udev rules for NVIDIA Tegra boards";
|
||||
homepage = "https://github.com/OE4T/meta-tegra/wiki/Flashing-the-Jetson-Dev-Kit#avoiding-sudo";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [
|
||||
{
|
||||
email = "erwin@datarift.nl";
|
||||
github = "eboskma";
|
||||
name = "Erwin Boskma";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
28
modules/base/nvidia/nvidia.rules
Normal file
28
modules/base/nvidia/nvidia.rules
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Jetson TK1
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7140", GROUP="adm"
|
||||
# Jetson TX1
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7721", GROUP="adm"
|
||||
# Jetson TX2
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7c18", GROUP="adm"
|
||||
# Jetson TX2i
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7018", GROUP="adm"
|
||||
# Jetson TX2-4GB
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7418", GROUP="adm"
|
||||
# Jetson AGX Xavier
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7019", GROUP="adm"
|
||||
# Jetson Xavier NX
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7e19", GROUP="adm"
|
||||
# Jetson Nano
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7f21", GROUP="adm"
|
||||
# Jetson Orin AGX (P3701-0000 Developer Kit module), (P3701-0005 with 64GB), (P3701-0008 with 64GB)
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7023", GROUP="adm"
|
||||
# Jetson Orin AGX (P3701-0004 with 32GB)
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7223", GROUP="adm"
|
||||
# Jetson Orin NX (P3767-0000 with 16GB)
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7323", GROUP="adm"
|
||||
# Jetson Orin NX (P3767-0001 with 8GB)
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7423", GROUP="adm"
|
||||
# Jetson Orin Nano (P3767-0003 and P3767-0005 with 8GB)
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7523", GROUP="adm"
|
||||
# Jetson Orin Nano (P3767-0004 with 4GB)
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7623", GROUP="adm"
|
Loading…
Reference in a new issue