diff options
Diffstat (limited to 'hosts/atlas/nginx.nix')
| -rw-r--r-- | hosts/atlas/nginx.nix | 26 |
1 files changed, 19 insertions, 7 deletions
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"; + }; }; - }; }; } |
