options: added path to nginx server service

This commit is contained in:
Giulio De Pasquale 2023-06-26 21:00:40 +02:00
parent 8de07dad91
commit 0893feb26d

View File

@ -108,6 +108,11 @@ in
description = "IP address or CIDR block to allow.";
};
path = mkOption {
type = types.str;
default = "";
};
deny = mkOption {
type = types.listOf types.str;
default = [ ];
@ -132,7 +137,7 @@ in
enableACME = true;
locations = mapAttrs
(path: location: {
proxyPass = "http://${location.host}:${toString location.port}";
proxyPass = "http://${location.host}:${toString location.port}${location.path}";
proxyWebsockets = location.proxyWebsockets;
extraConfig = ''
${optionalString location.allowLan "deny 10.0.0.1;"}