-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace octoprint with moonraker and mainsail
- Loading branch information
1 parent
6a55a6e
commit b66a810
Showing
10 changed files
with
104 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ ... }: | ||
let | ||
ports = import ./misc/service-ports.nix; | ||
addresses = import ../../misc/wireguard-addresses.nix; | ||
in { | ||
|
||
services.mainsail = { | ||
enable = true; | ||
nginx.listen = [ | ||
{ | ||
addr = "127.0.0.1"; | ||
port = ports.mainsail; | ||
} | ||
{ | ||
addr = addresses.gradientnet.briah; | ||
port = ports.mainsail; | ||
} | ||
]; | ||
}; | ||
|
||
# Increase max upload size for uploading gcode files from PrusaSlicer | ||
services.nginx.clientMaxBodySize = "1000m"; | ||
|
||
networking.firewall.interfaces.gradientnet.allowedTCPPorts = [ ports.mainsail ]; | ||
networking.firewall.interfaces.gradientnet.allowedUDPPorts = [ ports.mainsail ]; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ config, ... }: | ||
let | ||
ports = import ./misc/service-ports.nix; | ||
addresses = import ../../misc/wireguard-addresses.nix; | ||
ustreamer-address = "http://${addresses.gradientnet.briah}:${toString ports.ustreamer}"; | ||
in { | ||
|
||
services.moonraker = { | ||
enable = true; | ||
allowSystemControl = true; | ||
address = "0.0.0.0"; | ||
port = ports.moonraker; | ||
settings = { | ||
|
||
octoprint_compat = { }; | ||
|
||
history = { }; | ||
|
||
authorization = { | ||
cors_domains = [ | ||
"*://${config.networking.hostName}:*" | ||
]; | ||
trusted_clients = [ | ||
"127.0.0.1" | ||
"${addresses.gradientnet.gradientnet}/24" | ||
]; | ||
}; | ||
|
||
# Enable ustreamer camera support. | ||
"webcam c920" = { | ||
enabled = "True"; | ||
service = "uv4l-mjpeg"; | ||
stream_url = "${ustreamer-address}/stream"; | ||
snapshot_url = "${ustreamer-address}/snapshot"; | ||
aspect_ratio = "16:9"; | ||
target_fps = 30; | ||
}; | ||
|
||
# Enable Telegram notification support. | ||
"notifier telegram" = { | ||
url = "tgram://{secrets.telegram.token}/{secrets.telegram.chat}"; | ||
events = "*"; | ||
body = "Your printer status has changed to {event_name}"; | ||
attach = "${ustreamer-address}/snapshot"; | ||
}; | ||
|
||
}; | ||
}; | ||
|
||
networking.firewall.interfaces.gradientnet.allowedTCPPorts = [ ports.moonraker ]; | ||
networking.firewall.interfaces.gradientnet.allowedUDPPorts = [ ports.moonraker ]; | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters