{ machineConfig, config, lib, pkgs, ... }: { options.zpha.websites."ip.fc9f.de".enable = lib.mkEnableOption ""; config = lib.mkIf config.zpha.websites."ip.fc9f.de".enable { dns.zones."fc9f.de".subdomains = { "ip" = pkgs.dnsNix.combinators.host machineConfig.networking.ip4Address machineConfig.networking.ip6Address; "ip4".A = [ machineConfig.networking.ip4Address ]; "ip6".AAAA = [ machineConfig.networking.ip6Address ]; }; services.nginx.virtualHosts = { "ip.fc9f.de" = { useACMEHost = config.networking.fqdn; forceSSL = true; kTLS = true; locations."/" = { extraConfig = "types { } default_type 'text/html; charset=utf-8';"; return = '' 200 '
Use bash and curl: curl ip{4,6}.zaphyra.eu
Because any other "Whats my IP?"-tool sucks. Host yourself :3
' ''; }; }; "ip4.fc9f.de" = { 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 *; ''; }; }; "ip6.fc9f.de" = { 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 *; ''; }; }; }; }; }