diff --git a/hosts/architect/nginx.nix b/hosts/architect/nginx.nix index 0777276..8937587 100644 --- a/hosts/architect/nginx.nix +++ b/hosts/architect/nginx.nix @@ -1,8 +1,9 @@ -{ services, ... }: +{ services, pkgs, lib, ... }: { services.nginx = { enable = true; + package = pkgs.openresty; recommendedGzipSettings = true; recommendedOptimisation = true; recommendedProxySettings = true; @@ -25,6 +26,17 @@ "/wat.jpg" = { }; }; }; + appendHttpConfig = let + extraPureLuaPackages = with pkgs.luajitPackages; [ lua-resty-openidc ]; + luaPath = pkg: "${pkg}/share/lua/5.1/?.lua"; + makeLuaPath = lib.concatMapStringsSep ";" luaPath; + in '' + lua_package_path '${makeLuaPath extraPureLuaPackages};;'; + + # cache for OIDC discovery metadata + lua_shared_dict discovery 1m; + ''; + appendConfig = '' worker_processes 24; '';