WS-KCNHUB/machines/kcnhub/servers/caddy.nix

22 lines
395 B
Nix
Raw Normal View History

2023-10-26 13:12:34 -04:00
{ config, pkgs, lib, ... }:
{
services.caddy = {
enable = true;
};
# Need 80 & 443 Enabled so Caddy is externally accessible
networking.firewall = let
ports = [ 80 443 ];
in {
allowedTCPPorts = ports;
allowedUDPPorts = ports;
};
services.caddy.virtualHosts = lib.mkAfter {
"*.ws.kcnhub.com" = {
extraConfig = ''
error 404
'';
};
};
}