test-vm: Add whib-frontend module

This commit is contained in:
Alexander Heldt
2025-10-26 15:24:21 +01:00
parent 21adf4a3dc
commit 0e1b8581af
3 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
{ 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;
domain = "whib-frontend.local";
port = "8081";
backendHost = "https://api.whib.ppp.pm/"; # "whib-backend.local";
};
virtualisation.vmVariant = {
virtualisation = {
forwardPorts = [
{
# Service API
from = "host";
host.port = 8081;
guest.port = 8081;
}
];
};
};
};
}