nginx: Add additional plugins for OpenID to work

This commit is contained in:
Giulio De Pasquale 2022-10-28 14:35:22 +02:00
parent dddc557b46
commit c1a2c8238b

View File

@ -27,14 +27,26 @@
};
};
appendHttpConfig = let
extraPureLuaPackages = with pkgs.luajitPackages; [ lua-resty-openidc ];
extraPureLuaPackages = with pkgs.luajitPackages; [
lua-resty-openidc
lua-resty-http
lua-resty-session
lua-resty-jwt
lua-resty-openssl
];
luaPath = pkg: "${pkg}/share/lua/5.1/?.lua";
makeLuaPath = lib.concatMapStringsSep ";" luaPath;
in ''
lua_package_path '${makeLuaPath extraPureLuaPackages};;';
lua_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
lua_ssl_verify_depth 5;
# cache for OIDC discovery metadata
lua_shared_dict discovery 1m;
lua_shared_dict jwks 1m;
# https://github.com/openresty/lua-resty-redis/issues/159
resolver local=on ipv6=off;
'';
appendConfig = ''