From 5be1bbe84bdef6c8c153dcc39677fa5843d62127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Barnouin?= Date: Tue, 24 Sep 2024 16:26:53 +0200 Subject: [PATCH] Add netbox reverse proxy --- services/netbox/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/services/netbox/default.nix b/services/netbox/default.nix index e4ba9bb..39bf034 100644 --- a/services/netbox/default.nix +++ b/services/netbox/default.nix @@ -52,6 +52,22 @@ in }; secretKeyFile = "/run/secrets/netbox/keyFile"; }; + services.nginx = { + enable = true; + user = "netbox"; + clientMaxBodySize = "25m"; + + virtualHosts."192.168.1.45" = { + locations = { + "/" = { + proxyPass = "http://localhost:8001"; + }; + "/static/" = { alias = "${config.services.netbox.dataDir}/static/"; }; + }; + forceSSL = false; + enableACME = false; + }; + }; networking.firewall.allowedTCPPorts = [ 8001 ]; }; }