all repos — nixfiles @ 3b794be687f4379c1873486477ff6cda3c14da7f

System and user configuration, managed by nix and home-manager

dynamic dns: add caddy hostname to provision TLS

Alin
commit

3b794be687f4379c1873486477ff6cda3c14da7f

parent

efbbea8f1a22198f32e70ca53b2eca16e1102740

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!" + ''; + }; }; }