nginx: Use openresty package. Add openidc plugin.
This commit is contained in:
parent
9a2c8886ed
commit
dddc557b46
@ -1,8 +1,9 @@
|
|||||||
{ services, ... }:
|
{ services, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.openresty;
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
recommendedOptimisation = true;
|
recommendedOptimisation = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
@ -25,6 +26,17 @@
|
|||||||
"/wat.jpg" = { };
|
"/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 = ''
|
appendConfig = ''
|
||||||
worker_processes 24;
|
worker_processes 24;
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user