Dedupe octoprint port

This commit is contained in:
Sandro - 2022-08-21 22:09:39 +02:00
parent b5a33da044
commit 72c8847075
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 2 additions and 5 deletions

View File

@ -1,8 +1,5 @@
{ config, lib, pkgs, ... }:
let
octoprintPort = 8080;
in
{
imports = [
./hardware-configuration.nix
@ -120,7 +117,7 @@ in
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString octoprintPort}";
proxyPass = "http://127.0.0.1:${toString config.services.octoprint.port}";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header X-Scheme $scheme;
@ -142,7 +139,7 @@ in
octoprint = rec {
enable = true;
port = octoprintPort;
port = 8080;
extraConfig.webcam = {
snapshot = "http://localhost:3020?action=snapshot";
stream = "https://drkkr.hq.c3d2.de/cam/stream";