summaryrefslogtreecommitdiff
path: root/os/kay/modules/www.nix
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2025-02-18 09:57:52 +0530
committersinanmohd <sinan@sinanmohd.com>2025-02-18 09:57:52 +0530
commit51e3f7ed9f76e0ad6b22bf3bcc7a97815cd80003 (patch)
treea0f090e4dba9cbac4286f7d87b71daceb1517cf7 /os/kay/modules/www.nix
parent661e146bebd7af2c255c85cb01e110cff459f5bc (diff)
kay/nix-cache: init
Diffstat (limited to 'os/kay/modules/www.nix')
-rw-r--r--os/kay/modules/www.nix32
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
+ }";
+ };
+ };
};
};
}