From ac410a134f131e8440a333432531652d3967031f Mon Sep 17 00:00:00 2001 From: emily Date: Fri, 12 Jan 2024 15:14:54 +0100 Subject: [PATCH] gitignore --- test.nix | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 test.nix diff --git a/test.nix b/test.nix deleted file mode 100644 index a402fc6..0000000 --- a/test.nix +++ /dev/null @@ -1,48 +0,0 @@ -let - extraConfig = '' - add_header Referrer-Policy "same-origin" always; - ''; - func = builtins.mapAttrs (vhostName: vhostCfg: - let - def = { - forceSSL = true; - http3 = true; - quic = true; - }; - conf = if builtins.hasAttr "redirectTo" vhostCfg - then { - useACMEHost = vhostCfg.redirectTo; - globalRedirect = vhostCfg.redirectTo; - } - else if builtins.hasAttr "ACMEHost" vhostCfg - then { - useACMEHost = vhostCfg.ACMEHost; - root = vhostCfg.webroot; - } - else { - enableACME = true; - root = vhostCfg.webroot; - }; - otherCfg = (builtins.removeAttrs vhostCfg [ "redirectTo" "ACMEHost" "webroot" "extraConfig" ] // ( - if builtins.hasAttr "extraConfig" vhostCfg - then { extraConfig = ''${vhostCfg.extraConfig} ${extraConfig}''; } - else { inherit extraConfig; } - )); - in - conf // def // otherCfg - ); -in { - test = func { - "www.miau.zip" = { - redirectTo = "miau.zip"; - }; - "miau.zip" = { - ACMEHost = "miau.zip"; - webroot = "/skgj"; - locations."/".extraConfig = "fsfs"; - extraConfig = '' - skfdsjf - ''; - }; - }; -}