diff options
Diffstat (limited to 'os/kay/modules/www.nix')
-rw-r--r-- | os/kay/modules/www.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/os/kay/modules/www.nix b/os/kay/modules/www.nix index e8def58..5246d65 100644 --- a/os/kay/modules/www.nix +++ b/os/kay/modules/www.nix @@ -114,6 +114,38 @@ in ] }"''; }; + + "nixbin.${domain}" = defaultOpts // { + extraConfig = "proxy_buffering off;"; + locations = { + "= /" = { + extraConfig = "add_header Content-Type text/html;"; + return = ''200 + '<!DOCTYPE html> + <html lang="en"> + <head> + <meta charset="UTF-8"> + <title>Nix Cache</title> + </head> + <body> + <center> + <h1 style="font-size: 8em"> + ❄️ Nix Cache + </h1> + <p style="font-weight: bold"> + Public Key: nixbin.sinanmohd.com:dXV3KDPVrm+cGJ2M1ZmTeQJqFGaEapqiVoWHgYDh03k= + </p> + </center> + </body> + </html>' + ''; + }; + + "/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${ + toString config.services.nix-serve.port + }"; + }; + }; }; }; } |