mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat(nginx): enable option for vhost/location
This commit is contained in:
parent
a6fced79d5
commit
8f227a1bc5
7 changed files with 116 additions and 31 deletions
|
|
@ -52,17 +52,20 @@ in {
|
|||
in {
|
||||
plex = {
|
||||
inherit name locations extraConfig kTLS;
|
||||
listenPorts = {
|
||||
http = { };
|
||||
https.ssl = true;
|
||||
external = {
|
||||
enable = mkDefault (access.externalPort != null);
|
||||
port = mkDefault access.externalPort;
|
||||
extraParameters = [ "default_server" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
plex'local = {
|
||||
inherit name locations extraConfig kTLS;
|
||||
local.enable = true;
|
||||
};
|
||||
plex-external = mkIf (access.externalPort != null) {
|
||||
serverName = mkDefault "plex.${config.networking.domain}";
|
||||
default = mkDefault true;
|
||||
listenPorts.external.port = access.externalPort;
|
||||
inherit extraConfig locations;
|
||||
};
|
||||
};
|
||||
};
|
||||
config.networking.firewall.allowedTCPPorts = mkIf (access.externalPort != null) [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue