mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat(logistics): klipper, moonraker, fluidd
This commit is contained in:
parent
87c3b7cf15
commit
90c9db7104
4 changed files with 50 additions and 0 deletions
14
nixos/fluidd.nix
Normal file
14
nixos/fluidd.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, ... }: let
|
||||||
|
inherit (config.services) motion;
|
||||||
|
inherit (gensokyo-zone.lib) domain;
|
||||||
|
in {
|
||||||
|
services = {
|
||||||
|
fluidd = {
|
||||||
|
enable = true;
|
||||||
|
nginx.locations."/webcam".proxyPass = let
|
||||||
|
inherit (motion.cameras) printercam;
|
||||||
|
inherit (printercam.settings) camera_id;
|
||||||
|
in "https://kitchen.local.${domain}/${toString camera_id}/stream";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
nixos/klipper.nix
Normal file
8
nixos/klipper.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
_: {
|
||||||
|
services = {
|
||||||
|
klipper = {
|
||||||
|
enable = true;
|
||||||
|
serial = "/dev/ttyUSB0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
25
nixos/moonraker.nix
Normal file
25
nixos/moonraker.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
_: {
|
||||||
|
services = {
|
||||||
|
moonraker = {
|
||||||
|
enable = true;
|
||||||
|
address = "0.0.0.0";
|
||||||
|
settings = {
|
||||||
|
octoprint_compat = { };
|
||||||
|
history = { };
|
||||||
|
authorization = {
|
||||||
|
force_logins = true;
|
||||||
|
cors_domains = [
|
||||||
|
"*.local"
|
||||||
|
"*.lan"
|
||||||
|
"*.gensokyo.zone"
|
||||||
|
];
|
||||||
|
trusted_clients = [
|
||||||
|
"10.0.0.0/8"
|
||||||
|
"127.0.0.0/8"
|
||||||
|
"::1/128"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -18,6 +18,9 @@ in {
|
||||||
nixos.cameras.printer
|
nixos.cameras.printer
|
||||||
nixos.cameras.logistics-webcam
|
nixos.cameras.logistics-webcam
|
||||||
nixos.octoprint
|
nixos.octoprint
|
||||||
|
nixos.klipper
|
||||||
|
nixos.moonraker
|
||||||
|
nixos.fluidd
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue