From ac62a8e4d3b56553d5e2afb36da19d38977d0d28 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Wed, 30 Sep 2026 17:46:06 +0000 Subject: [PATCH] test-vm: Serve `whib-frontend` with nginx The WHIB frontend module no longer runs a container or has a `port` option. Forward host port 8081 to nginx in the VM instead. Co-Authored-By: Claude Opus 5.5 --- hosts/test-vm/whib-frontend.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hosts/test-vm/whib-frontend.nix b/hosts/test-vm/whib-frontend.nix index 83aebf4..f1a58ae 100644 --- a/hosts/test-vm/whib-frontend.nix +++ b/hosts/test-vm/whib-frontend.nix @@ -13,20 +13,22 @@ in services.whib-frontend = { enable = true; - domain = "whib-frontend.local"; - port = "8081"; + # nginx serves the frontend; matches the Host header of http://localhost:8081 + domain = "localhost"; # backendHost = "https://api.whib.ppp.pm/"; backendHost = "http://localhost:8080"; }; + networking.firewall.allowedTCPPorts = [ 80 ]; + virtualisation.vmVariant = { virtualisation = { forwardPorts = [ { - # Service API + # Frontend served by nginx from = "host"; host.port = 8081; - guest.port = 8081; + guest.port = 80; } ]; };