From 51e3f7ed9f76e0ad6b22bf3bcc7a97815cd80003 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Tue, 18 Feb 2025 09:57:52 +0530 Subject: kay/nix-cache: init --- os/kay/modules/www.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'os/kay/modules/www.nix') 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 + ' + + + + Nix Cache + + +
+

+ ❄️ Nix Cache +

+

+ Public Key: nixbin.sinanmohd.com:dXV3KDPVrm+cGJ2M1ZmTeQJqFGaEapqiVoWHgYDh03k= +

+
+ + ' + ''; + }; + + "/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${ + toString config.services.nix-serve.port + }"; + }; + }; }; }; } -- cgit v1.2.3