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