From f7956805347563d2958de5cda0a617dfaca640b5 Mon Sep 17 00:00:00 2001 From: seth Date: Thu, 3 Aug 2023 12:13:14 -0400 Subject: hosts/atlas+p-body: add workaround for nixos/nixpkgs#210807 --- hosts/atlas/nginx.nix | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'hosts/atlas/nginx.nix') diff --git a/hosts/atlas/nginx.nix b/hosts/atlas/nginx.nix index 1e2a349..2356e1d 100644 --- a/hosts/atlas/nginx.nix +++ b/hosts/atlas/nginx.nix @@ -20,20 +20,32 @@ recommendedTlsSettings = true; virtualHosts = let + inherit (config.networking) domain; + mkProxy = endpoint: port: { "${endpoint}" = { proxyPass = "http://localhost:${port}"; proxyWebsockets = true; }; }; - inherit (config.networking) domain; - in { - "miniflux.${domain}" = { - enableACME = true; - addSSL = true; - locations = mkProxy "/" "7000"; + mkVHosts = builtins.mapAttrs (_: v: + v + // { + enableACME = true; + # workaround for https://github.com/NixOS/nixpkgs/issues/210807 + acmeRoot = null; + forceSSL = true; + }); + in + mkVHosts { + "miniflux.${domain}" = { + locations = mkProxy "/" "7000"; + }; + + "msix.${domain}" = { + root = "/var/www/msix"; + }; }; - }; }; } -- cgit v1.2.3