Fix up klipper

Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
magic_rb 2024-01-22 00:44:41 +01:00
parent d925c68f58
commit 1ea62e80e2
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E

View file

@ -1,4 +1,4 @@
{ inputs, lib, pkgs, secret, config, config', ...}:
{ inputs', lib, pkgs, secret, config, config', ...}:
let
inherit (lib)
concatStringsSep
@ -71,8 +71,8 @@ in
hostPath = "/var/lib/klipper/gcodes";
isReadOnly = false;
};
"/dev/serial/by-id/" = {
hostPath = "/dev/serial/by-id/";
"/dev/ttyEnder3" = {
hostPath = "/dev/serial/by-id/usb-Klipper_lpc1768_13E0FF0C469027AEBAA84A52871E00F5-if00";
isReadOnly = false;
};
};
@ -90,14 +90,19 @@ in
hashicorp-envoy
];
networking.firewall.interfaces.eth0.allowedTCPPorts = [19000];
services.hashicorp-envoy.mainsail = {
envoyPackage = inputs'.nixpkgs-stable.legacyPackages.${pkgs.stdenv.system}.envoy;
service = {
name = "mainsail";
id = "mainsail";
address = "10.64.99.6";
port = 80;
connect.sidecar_service = {};
connect.sidecar_service = {
port = 19000;
};
};
environment = {
@ -109,7 +114,6 @@ in
address = "10.64.99.6:19000";
adminBind = "127.0.0.1:19100";
hotRestart = false;
extraConsulArgs = [ "-ignore-envoy-compatibility" ];
};
users.users.klipper = {
@ -222,7 +226,7 @@ in
};
mcu = {
serial = "/dev/serial/by-id/usb-Klipper_lpc1768_13E0FF0C469027AEBAA84A52871E00F5-if00";
serial = "/dev/ttyEnder3";
};
printer = {
@ -415,10 +419,10 @@ in
''
G92 E0 # Reset Extruder
G1 Z2.0 F3000 # Move Z Axis up little to prevent scratching of Heat Bed
G1 X0.1 Y20 Z0.3 F5000.0 # Move to start position
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 # Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 # Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 # Draw the second line
G1 X1 Y20 Z0.3 F5000.0 # Move to start position
G1 X1 Y200.0 Z0.3 F1500.0 E15 # Draw the first line
G1 X1.3 Y200.0 Z0.3 F5000.0 # Move to side a little
G1 X1.3 Y20 Z0.3 F1500.0 E30 # Draw the second line
G92 E0 # Reset Extruder
G1 Z2.0 F3000 # Move Z Axis up little to prevent scratching of Heat Bed
G1 X5 Y20 Z0.3 F5000.0 # Move over to prevent blob squish