diff --git a/config/http/captiveportal.nix b/config/http/captiveportal.nix new file mode 100644 index 0000000..ffa97d8 --- /dev/null +++ b/config/http/captiveportal.nix @@ -0,0 +1,9 @@ +{config, ...}: let + domain = config.customOps.domain; +in { + services.nginx.virtualHosts."cpcheck.${domain}" = { + locations."/".return = 204; + forceSSL = false; + enableACME = true; + }; +} diff --git a/config/http/default.nix b/config/http/default.nix index 112eff7..8d5a48a 100644 --- a/config/http/default.nix +++ b/config/http/default.nix @@ -1,6 +1,8 @@ {config, ...}: let customDomain = config.customOps.domain; in { + imports = [./captiveportal.nix]; + networking.firewall.allowedTCPPorts = [80 443]; services.nginx = {