20 lines
395 B
Nix
20 lines
395 B
Nix
{ config, ... }:
|
|
let
|
|
service = config.facts.services.actual;
|
|
in
|
|
{
|
|
flake.modules.nixos.actual = {
|
|
services.actual = {
|
|
enable = true;
|
|
openFirewall = false;
|
|
settings = {
|
|
inherit (service) port;
|
|
hostname = service.host;
|
|
};
|
|
};
|
|
|
|
services.caddy.virtualHosts.${service.domain}.extraConfig =
|
|
"reverse_proxy :${toString service.port}";
|
|
};
|
|
}
|