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>
38 lines
801 B
Nix
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;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|