test-vm: Add whib-frontend module
This commit is contained in:
@@ -125,6 +125,7 @@
|
|||||||
modules = [
|
modules = [
|
||||||
./hosts/test-vm/configuration.nix
|
./hosts/test-vm/configuration.nix
|
||||||
inputs.whib-backend.nixosModules.${system}.default
|
inputs.whib-backend.nixosModules.${system}.default
|
||||||
|
inputs.whib-frontend.nixosModules.${system}.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./ppp.pm-site.nix
|
./ppp.pm-site.nix
|
||||||
./whib-backend.nix
|
./whib-backend.nix
|
||||||
|
./whib-frontend.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
mod = {
|
mod = {
|
||||||
pppdotpm-site.enable = false;
|
pppdotpm-site.enable = false;
|
||||||
whib-backend.enable = true;
|
whib-backend.enable = true;
|
||||||
|
whib-frontend.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.a = {
|
users.users.a = {
|
||||||
|
|||||||
34
hosts/test-vm/whib-frontend.nix
Normal file
34
hosts/test-vm/whib-frontend.nix
Normal 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;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user