33 lines
749 B
Nix
33 lines
749 B
Nix
{
|
|
config,
|
|
inputs,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
serviceName = "phishboard";
|
|
servicePort = config.m3ta.ports.get serviceName;
|
|
in {
|
|
services.phishboard = {
|
|
enable = true;
|
|
package = inputs.phishboard.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
|
host = "127.0.0.1";
|
|
port = servicePort;
|
|
environmentFile = config.age.secrets.phishboard-env.path;
|
|
};
|
|
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
services.${serviceName}.loadBalancer.servers = [
|
|
{url = "http://localhost:${toString servicePort}/";}
|
|
];
|
|
|
|
routers.${serviceName} = {
|
|
rule = "Host(`pb.l.az-gruppe.com`)";
|
|
tls = {
|
|
certResolver = "ionos";
|
|
};
|
|
service = serviceName;
|
|
entrypoints = "websecure";
|
|
};
|
|
};
|
|
}
|