dynamic dns: add caddy hostname to provision TLS
1 file changed, 19 insertions(+), 0 deletions(-)
changed files
M system/roles/dynamic-dns.nix → system/roles/dynamic-dns.nix
@@ -1,5 +1,6 @@ { config, + lib, ... }: let@@ -21,5 +22,23 @@ inherit zone server domains; protocol = "nsupdate"; passwordFile = config.age.secrets.dyndns.path; + }; + + networking.firewall = { + allowedTCPPorts = [ + 80 + 443 + ]; + allowedUDPPorts = [ + 443 + ]; + }; + + services.caddy.virtualHosts = { + ${builtins.head domains} = { + extraConfig = lib.mkDefault '' + respond "Hello, world!" + ''; + }; }; }