30 lines
750 B
Nix
30 lines
750 B
Nix
{ ... }:
|
|
|
|
{
|
|
services.nginx.virtualHosts = {
|
|
"ping.clerie.de" = {
|
|
enableACME = true;
|
|
addSSL = true;
|
|
locations."= /" = {
|
|
return = ''200 "This domain is used for connectivity checking and captive portal detection\n"'';
|
|
extraConfig = ''
|
|
types { } default_type "text/plain; charset=utf-8";
|
|
'';
|
|
};
|
|
locations."/nm-check.txt" = {
|
|
return = ''200 "NetworkManager is online\n"'';
|
|
extraConfig = ''
|
|
types { } default_type "text_plain; charset=utf-8";
|
|
add_header Cache-Control "max-age=0, must-revalidate";
|
|
'';
|
|
};
|
|
locations."/" = {
|
|
return = ''404'';
|
|
};
|
|
extraConfig = ''
|
|
access_log off;
|
|
'';
|
|
};
|
|
};
|
|
}
|