From 4870446fdc08f066c124ffc148d274942f37b631 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Thu, 27 Feb 2025 11:21:38 +0530 Subject: kay/www: expose /nix/store with HTTP for aws snapshot import --- os/cez/modules/www.nix | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 os/cez/modules/www.nix (limited to 'os/cez') diff --git a/os/cez/modules/www.nix b/os/cez/modules/www.nix new file mode 100644 index 0000000..9ec20da --- /dev/null +++ b/os/cez/modules/www.nix @@ -0,0 +1,46 @@ +{ config, pkgs, lib, ... }: + +let + domain = config.global.userdata.domain; +in +{ + services.nginx = { + enable = true; + + recommendedTlsSettings = true; + recommendedOptimisation = true; + recommendedGzipSettings = true; + recommendedProxySettings = true; + recommendedBrotliSettings = true; + + virtualHosts.${domain} = { + forceSSL = true; + enableACME = true; + useACMEHost = domain; + locations."= /" = { + extraConfig = "add_header Content-Type text/html;"; + return = ''200 + ' + + + + Nix Cache + + +
+

+ ❄️ Nix Cache +

+

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

+
+ + ' + ''; + }; + }; + + }; + }; +} -- cgit v1.2.3