Skip to content

Commit

Permalink
chore(voron): new stealthmax pcb
Browse files Browse the repository at this point in the history
  • Loading branch information
truelecter committed Sep 17, 2024
1 parent af7a051 commit a030b49
Show file tree
Hide file tree
Showing 21 changed files with 498 additions and 155 deletions.
32 changes: 32 additions & 0 deletions cells/klipper/klipper-plugins/nevermore-max.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
lib,
stdenvNoCC,
sources,
...
}:
stdenvNoCC.mkDerivation rec {
pname = "nevermore-max";

inherit (sources.klipper-nevermore-max) version src;

dontPatch = true;
dontConfigure = true;
dontBuild = true;

installPhase = ''
mkdir -p $out/lib/extras
cp -r ./Software/Klipper/*.py $out/lib/extras/
'';

passthru.klipper = {
config = false;
extras = true;
};

meta = with lib; {
description = "Nevermore MAX filter Klipper integration for SGP40";
platforms = platforms.linux;
homepage = "https://github.com/nevermore3d/Nevermore_Max/tree/master/Software/Klipper";
license = licenses.gpl3Only;
};
}
10 changes: 10 additions & 0 deletions cells/klipper/packages/mainsail.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
sources,
cypress,
zip,
gnused,
gnugrep,
findutils,
# TODO: extract it to common lib
prefetch-npm-deps,
writeShellScriptBin,
Expand All @@ -24,6 +27,9 @@ in
nativeBuildInputs = [
cypress
zip
gnused
gnugrep
findutils
];

dontNpmBuild = true;
Expand All @@ -41,6 +47,10 @@ in
export CYPRESS_RUN_BINARY=${cypress}/bin/Cypress
'';

postPatch = ''
grep -l additionalSensors * -R | xargs sed -i 's+additionalSensors = \[+additionalSensors = \["sgp40",+g'
'';

installPhase = ''
runHook preInstall
Expand Down
53 changes: 37 additions & 16 deletions cells/klipper/sources/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
},
"klipper": {
"cargoLocks": null,
"date": "2024-09-13",
"date": "2024-09-16",
"extract": null,
"name": "klipper",
"passthru": null,
Expand All @@ -97,12 +97,12 @@
"name": null,
"owner": "Klipper3d",
"repo": "klipper",
"rev": "900bf2be55f912d5e9804fe31d9e65da175c4e0c",
"sha256": "sha256-+n9GfvUFM4PWULfivLHjcnHayNgiCcgdF8tzoIcGCZ8=",
"rev": "0532a41c752df66f149cf55d779072f420ee1b6a",
"sha256": "sha256-8EGfBaaQnqqAVAwiwF4C2oUrXPLXo41+Vx4cRgcm4hE=",
"sparseCheckout": [],
"type": "github"
},
"version": "900bf2be55f912d5e9804fe31d9e65da175c4e0c"
"version": "0532a41c752df66f149cf55d779072f420ee1b6a"
},
"klipper-cartographer": {
"cargoLocks": null,
Expand Down Expand Up @@ -190,7 +190,7 @@
},
"klipper-happy-hare": {
"cargoLocks": null,
"date": "2024-09-05",
"date": "2024-09-14",
"extract": null,
"name": "klipper-happy-hare",
"passthru": null,
Expand All @@ -202,12 +202,12 @@
"name": null,
"owner": "moggieuk",
"repo": "Happy-Hare",
"rev": "151d85a1d34fe8a6b4566b1729bb935049fa5005",
"sha256": "sha256-2eORJLgyzdqKPWMIBSwhonKRp+jh17EtZ4DGl5kvd1A=",
"rev": "4950aa70dd7e673e3603cc9a4a5f1c0d2c8e5df9",
"sha256": "sha256-Wyn8z4KQAA9kriLqp82XjcakQPe6/hFYPMK/slRbvBI=",
"sparseCheckout": [],
"type": "github"
},
"version": "151d85a1d34fe8a6b4566b1729bb935049fa5005"
"version": "4950aa70dd7e673e3603cc9a4a5f1c0d2c8e5df9"
},
"klipper-kamp": {
"cargoLocks": null,
Expand Down Expand Up @@ -314,9 +314,30 @@
},
"version": "14e308ff315029c2be0de498676fd23bae25ed98"
},
"klipper-nevermore-max": {
"cargoLocks": null,
"date": "2023-11-18",
"extract": null,
"name": "klipper-nevermore-max",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "nevermore3d",
"repo": "Nevermore_Max",
"rev": "159df10e4f6015680107d1cbd10a3aab23dd5f18",
"sha256": "sha256-uPTUlI2F697pDPw5HxU48dEUpBkgovb61ksXW1HRfLY=",
"sparseCheckout": [],
"type": "github"
},
"version": "159df10e4f6015680107d1cbd10a3aab23dd5f18"
},
"klipper-screen": {
"cargoLocks": null,
"date": "2024-09-13",
"date": "2024-09-16",
"extract": null,
"name": "klipper-screen",
"passthru": null,
Expand All @@ -328,12 +349,12 @@
"name": null,
"owner": "jordanruthe",
"repo": "KlipperScreen",
"rev": "24d7851091ebe9c6b589817451032b1461a73677",
"sha256": "sha256-trSagnKWyDhcnYYzJAyqXGT8a5/pysTRiQssDwrZZ3c=",
"rev": "bdf03e8d6f69307d965e70a639318b244971dbac",
"sha256": "sha256-MxuUmkuEnfFC0iPwNUc0Wh8bIEl1J1FMgGEYMjHePZ8=",
"sparseCheckout": [],
"type": "github"
},
"version": "24d7851091ebe9c6b589817451032b1461a73677"
"version": "bdf03e8d6f69307d965e70a639318b244971dbac"
},
"klipper-z-calibration": {
"cargoLocks": null,
Expand Down Expand Up @@ -435,7 +456,7 @@
},
"mainsail": {
"cargoLocks": null,
"date": "2024-09-11",
"date": "2024-09-16",
"extract": null,
"name": "mainsail",
"passthru": null,
Expand All @@ -447,12 +468,12 @@
"name": null,
"owner": "mainsail-crew",
"repo": "mainsail",
"rev": "f1085452233f5d59e312aa9d379cb1c6ea58404b",
"sha256": "sha256-DVsGR04PTuHNWHWPBCUYgeQ82Xe6mZaJOUxO7mkiJGA=",
"rev": "de697da87b0c77262c242034988114d01d4bd743",
"sha256": "sha256-pllffDPf3t0C5q0kGIaaRLLyOl6YpvL2CRBw+EXXbhk=",
"sparseCheckout": [],
"type": "github"
},
"version": "f1085452233f5d59e312aa9d379cb1c6ea58404b"
"version": "de697da87b0c77262c242034988114d01d4bd743"
},
"mobileraker-companion": {
"cargoLocks": null,
Expand Down
44 changes: 28 additions & 16 deletions cells/klipper/sources/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@
};
klipper = {
pname = "klipper";
version = "900bf2be55f912d5e9804fe31d9e65da175c4e0c";
version = "0532a41c752df66f149cf55d779072f420ee1b6a";
src = fetchFromGitHub {
owner = "Klipper3d";
repo = "klipper";
rev = "900bf2be55f912d5e9804fe31d9e65da175c4e0c";
rev = "0532a41c752df66f149cf55d779072f420ee1b6a";
fetchSubmodules = false;
sha256 = "sha256-+n9GfvUFM4PWULfivLHjcnHayNgiCcgdF8tzoIcGCZ8=";
sha256 = "sha256-8EGfBaaQnqqAVAwiwF4C2oUrXPLXo41+Vx4cRgcm4hE=";
};
date = "2024-09-13";
date = "2024-09-16";
};
klipper-cartographer = {
pname = "klipper-cartographer";
Expand Down Expand Up @@ -110,15 +110,15 @@
};
klipper-happy-hare = {
pname = "klipper-happy-hare";
version = "151d85a1d34fe8a6b4566b1729bb935049fa5005";
version = "4950aa70dd7e673e3603cc9a4a5f1c0d2c8e5df9";
src = fetchFromGitHub {
owner = "moggieuk";
repo = "Happy-Hare";
rev = "151d85a1d34fe8a6b4566b1729bb935049fa5005";
rev = "4950aa70dd7e673e3603cc9a4a5f1c0d2c8e5df9";
fetchSubmodules = false;
sha256 = "sha256-2eORJLgyzdqKPWMIBSwhonKRp+jh17EtZ4DGl5kvd1A=";
sha256 = "sha256-Wyn8z4KQAA9kriLqp82XjcakQPe6/hFYPMK/slRbvBI=";
};
date = "2024-09-05";
date = "2024-09-14";
};
klipper-kamp = {
pname = "klipper-kamp";
Expand Down Expand Up @@ -179,17 +179,29 @@
};
date = "2024-05-27";
};
klipper-nevermore-max = {
pname = "klipper-nevermore-max";
version = "159df10e4f6015680107d1cbd10a3aab23dd5f18";
src = fetchFromGitHub {
owner = "nevermore3d";
repo = "Nevermore_Max";
rev = "159df10e4f6015680107d1cbd10a3aab23dd5f18";
fetchSubmodules = false;
sha256 = "sha256-uPTUlI2F697pDPw5HxU48dEUpBkgovb61ksXW1HRfLY=";
};
date = "2023-11-18";
};
klipper-screen = {
pname = "klipper-screen";
version = "24d7851091ebe9c6b589817451032b1461a73677";
version = "bdf03e8d6f69307d965e70a639318b244971dbac";
src = fetchFromGitHub {
owner = "jordanruthe";
repo = "KlipperScreen";
rev = "24d7851091ebe9c6b589817451032b1461a73677";
rev = "bdf03e8d6f69307d965e70a639318b244971dbac";
fetchSubmodules = false;
sha256 = "sha256-trSagnKWyDhcnYYzJAyqXGT8a5/pysTRiQssDwrZZ3c=";
sha256 = "sha256-MxuUmkuEnfFC0iPwNUc0Wh8bIEl1J1FMgGEYMjHePZ8=";
};
date = "2024-09-13";
date = "2024-09-16";
};
klipper-z-calibration = {
pname = "klipper-z-calibration";
Expand Down Expand Up @@ -246,15 +258,15 @@
};
mainsail = {
pname = "mainsail";
version = "f1085452233f5d59e312aa9d379cb1c6ea58404b";
version = "de697da87b0c77262c242034988114d01d4bd743";
src = fetchFromGitHub {
owner = "mainsail-crew";
repo = "mainsail";
rev = "f1085452233f5d59e312aa9d379cb1c6ea58404b";
rev = "de697da87b0c77262c242034988114d01d4bd743";
fetchSubmodules = false;
sha256 = "sha256-DVsGR04PTuHNWHWPBCUYgeQ82Xe6mZaJOUxO7mkiJGA=";
sha256 = "sha256-pllffDPf3t0C5q0kGIaaRLLyOl6YpvL2CRBw+EXXbhk=";
};
date = "2024-09-11";
date = "2024-09-16";
};
mobileraker-companion = {
pname = "mobileraker-companion";
Expand Down
4 changes: 4 additions & 0 deletions cells/klipper/sources/nvfetcher.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ fetch.github = "andrewmcgr/klipper_tmc_autotune"
src.git = "https://github.com/SanaaHamel/nevermore-controller"
fetch.github = "SanaaHamel/nevermore-controller"

[klipper-nevermore-max]
src.git = "https://github.com/nevermore3d/Nevermore_Max"
fetch.github = "nevermore3d/Nevermore_Max"

[klipper-chopper-resonance-tuner]
src.git = "https://github.com/MRX8024/chopper-resonance-tuner"
fetch.github = "MRX8024/chopper-resonance-tuner"
Expand Down
50 changes: 25 additions & 25 deletions cells/nixos/hosts/voron/camera.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,34 @@
'';

tl.services.camera-streamer.instances = {
nozzle = {
settings = {
camera = {
path = "/dev/v4l/by-id/usb-XCG-221208-J_3DO_NOZZLE_CAMERA_4K_01.00.00-video-index0";
width = 640;
height = 480;
fps = 30;
format = "MJPG";
nbufs = 2;
force_active = true;
options = {
whitebalanceautomatic = 0;
whitebalancetemperature = 4200;
};
};
# nozzle = {
# settings = {
# camera = {
# path = "/dev/v4l/by-id/usb-XCG-221208-J_3DO_NOZZLE_CAMERA_4K_01.00.00-video-index0";
# width = 640;
# height = 480;
# fps = 30;
# format = "MJPG";
# nbufs = 2;
# force_active = true;
# options = {
# whitebalanceautomatic = 0;
# whitebalancetemperature = 4200;
# };
# };

http = {
port = 8080;
listen = "0.0.0.0";
};
# http = {
# port = 8080;
# listen = "0.0.0.0";
# };

rtsp = {
port = 8554;
};
};
# rtsp = {
# port = 8554;
# };
# };

nginx.enable = true;
};
# nginx.enable = true;
# };

printer = {
settings = {
Expand Down
22 changes: 12 additions & 10 deletions cells/nixos/hosts/voron/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
kernelParams = [
"console=ttyS0,115200"
"console=tty1"
"video=DSI-1:800x480@60"
"video=DSI-0:800x480@60"
];
};

Expand All @@ -58,16 +58,18 @@
};
};

powerManagement.cpuFreqGovernor = "powersave";
powerManagement.cpuFreqGovernor = "performance";

hardware = {
deviceTree.filter = "bcm2711-rpi-cm4.dtb";
# hardware = {
# deviceTree.filter = "bcm2711-rpi-cm4.dtb";

raspberry-pi."4".xhci.enable = true;
};
# raspberry-pi."4".xhci.enable = true;
# };

hardware.deviceTree.filter = "bcm2711-rpi-4-b.dtb";

environment.systemPackages = with pkgs; [
bluez
bluez-tools
];
# environment.systemPackages = with pkgs; [
# bluez
# bluez-tools
# ];
}
3 changes: 3 additions & 0 deletions cells/nixos/hosts/voron/klipper/canbus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

services.resolved.enable = false;

networking.interfaces.can0.useDHCP = false;
networking.dhcpcd.denyInterfaces = ["can*"];

systemd.network = {
enable = true;
wait-online.timeout = 0;
Expand Down
Loading

0 comments on commit a030b49

Please sign in to comment.