cert access to homepage

This commit is contained in:
2025-07-16 13:50:10 -06:00
parent 98024d8672
commit 90dac76ad1
5 changed files with 69 additions and 10 deletions

View File

@@ -48,6 +48,10 @@ let
type = lib.types.bool;
default = false;
};
certPath = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
};
};
proxy = locations: {
inherit locations;
@@ -84,6 +88,16 @@ let
proxy_http_version 1.1;
'';
};
proxyReversePrivate =
cfg:
proxyReverse cfg
// {
extraConfig = ''
ssl_verify_client on;
ssl_client_certificate ${cfg.certPath};
error_page 403 /403.html;
'';
};
in
{
inherit
@@ -91,5 +105,6 @@ in
proxy
proxyReverse
proxyReverseFix
proxyReversePrivate
;
}