{ node, dnsNix, pkgs, config, ... }: { dns.zones."ctu.cx".subdomains."ip" = (dnsNix.combinators.host node.ip4Address node.ip6Address); dns.zones."ctu.cx".subdomains."ip4".A = [ node.ip4Address ]; dns.zones."ctu.cx".subdomains."ip6".AAAA = [ node.ip6Address ]; services.nginx.virtualHosts."ip.${config.networking.domain}" = { useACMEHost = "${config.networking.fqdn}"; forceSSL = true; kTLS = true; locations."/" = { extraConfig = "types { } default_type 'text/html; charset=utf-8';"; return = ''200 ' ip.${config.networking.domain}

ip.${config.networking.domain}

Use bash and curl: curl ip{4,6}.${config.networking.domain}

Because any other "Whats my IP?"-tool sucks. Host yourself :3

' ''; }; }; services.nginx.virtualHosts."ip4.${config.networking.domain}" = { useACMEHost = "${config.networking.fqdn}"; forceSSL = true; kTLS = true; locations."/" = { return = "200 '$remote_addr\n'"; extraConfig = '' types { } default_type "text/plain; charset=utf-8"; add_header Access-Control-Allow-Origin *; ''; }; }; services.nginx.virtualHosts."ip6.${config.networking.domain}" = { useACMEHost = "${config.networking.fqdn}"; forceSSL = true; kTLS = true; locations."/" = { return = "200 '$remote_addr\n'"; extraConfig = '' types { } default_type "text/plain; charset=utf-8"; add_header Access-Control-Allow-Origin *; ''; }; }; }