fixup! oauth2_proxy: add nginx vhost module

This commit is contained in:
Michishige Kaito 2018-06-29 16:23:24 +01:00
parent 4a72999c75
commit 2fec848254

View File

@ -8,10 +8,16 @@ in
proxy = mkOption {
type = types.string;
default = config.services.oauth2_proxy.httpAddress;
description = ''
The address of the reverse proxy endpoint for oauth2_proxy
'';
};
virtualHosts = mkOption {
type = types.listOf types.string;
default = [];
description = ''
A list of nginx virtual hosts to put behind the oauth2 proxy
'';
};
};
config.services.oauth2_proxy = mkIf (cfg.virtualHosts != [] && (hasPrefix "127.0.0.1:" cfg.proxy)) {