Files
nixos-configs/hosts/test-vm/whib-frontend.nix
T
Alexander HeldtandClaude Opus 5.5 ac62a8e4d3 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 <noreply@anthropic.com>
2026-09-30 17:46:06 +00:00

38 lines
801 B
Nix

{ lib, config, ... }:
let
enabled = config.mod.whib-frontend.enable;
in
{
options = {
mod.whib-frontend = {
enable = lib.mkEnableOption "enable WHIB backend";
};
};
config = lib.mkIf enabled {
services.whib-frontend = {
enable = true;
# 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 = [
{
# Frontend served by nginx
from = "host";
host.port = 8081;
guest.port = 80;
}
];
};
};
};
}