feat(logistics): klipper, moonraker, fluidd

This commit is contained in:
Kat Inskip 2024-08-06 11:13:23 -07:00
parent 87c3b7cf15
commit 90c9db7104
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
4 changed files with 50 additions and 0 deletions

14
nixos/fluidd.nix Normal file
View 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
View file

@ -0,0 +1,8 @@
_: {
services = {
klipper = {
enable = true;
serial = "/dev/ttyUSB0";
};
};
}

25
nixos/moonraker.nix Normal file
View 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"
];
};
};
};
};
}

View file

@ -18,6 +18,9 @@ in {
nixos.cameras.printer
nixos.cameras.logistics-webcam
nixos.octoprint
nixos.klipper
nixos.moonraker
nixos.fluidd
./hardware-configuration.nix
];