mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
chore(nginx): rename listenPorts
This commit is contained in:
parent
1d1dc64ef5
commit
8695e2cdb9
6 changed files with 10 additions and 13 deletions
|
|
@ -62,9 +62,6 @@
|
||||||
in mapAttrs (_: mkAlmostOptionDefault) listenAttrs;
|
in mapAttrs (_: mkAlmostOptionDefault) listenAttrs;
|
||||||
mkListens = listen: map (mkListen listen) listen.addresses;
|
mkListens = listen: map (mkListen listen) listen.addresses;
|
||||||
in {
|
in {
|
||||||
imports = [
|
|
||||||
(mkRenamedOptionModule [ "listenPorts" ] [ "listen'" ])
|
|
||||||
];
|
|
||||||
options = with lib.types; {
|
options = with lib.types; {
|
||||||
listen' = mkOption {
|
listen' = mkOption {
|
||||||
type = attrsOf (submoduleWith {
|
type = attrsOf (submoduleWith {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
inherit (config.services) nginx;
|
inherit (config.services) nginx;
|
||||||
access = nginx.access.freepbx;
|
access = nginx.access.freepbx;
|
||||||
freepbx = config.lib.access.systemFor "freepbx";
|
freepbx = config.lib.access.systemFor "freepbx";
|
||||||
hasSsl = nginx.virtualHosts.freepbx'ucp.listenPorts.ucpSsl.enable;
|
hasSsl = nginx.virtualHosts.freepbx'ucp.listen'.ucpSsl.enable;
|
||||||
in {
|
in {
|
||||||
options.services.nginx.access.freepbx = with lib.types; {
|
options.services.nginx.access.freepbx = with lib.types; {
|
||||||
host = mkOption {
|
host = mkOption {
|
||||||
|
|
@ -80,7 +80,7 @@ in {
|
||||||
freepbx'ucp = {
|
freepbx'ucp = {
|
||||||
serverName = mkDefault nginx.virtualHosts.freepbx.serverName;
|
serverName = mkDefault nginx.virtualHosts.freepbx.serverName;
|
||||||
ssl.cert.copyFromVhost = "freepbx";
|
ssl.cert.copyFromVhost = "freepbx";
|
||||||
listenPorts = {
|
listen' = {
|
||||||
ucp = {
|
ucp = {
|
||||||
port = access.ucpPort;
|
port = access.ucpPort;
|
||||||
extraParameters = [ "default_server" ];
|
extraParameters = [ "default_server" ];
|
||||||
|
|
@ -100,7 +100,7 @@ in {
|
||||||
inherit extraConfig kTLS;
|
inherit extraConfig kTLS;
|
||||||
};
|
};
|
||||||
freepbx'local = {
|
freepbx'local = {
|
||||||
listenPorts = {
|
listen' = {
|
||||||
http = { };
|
http = { };
|
||||||
https.ssl = true;
|
https.ssl = true;
|
||||||
ucp = {
|
ucp = {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
inherit (lib.modules) mkIf mkDefault;
|
inherit (lib.modules) mkIf mkDefault;
|
||||||
inherit (config.services) home-assistant nginx;
|
inherit (config.services) home-assistant nginx;
|
||||||
name.shortServer = mkDefault "home";
|
name.shortServer = mkDefault "home";
|
||||||
listenPorts = {
|
listen' = {
|
||||||
http = { };
|
http = { };
|
||||||
https.ssl = true;
|
https.ssl = true;
|
||||||
hass = {
|
hass = {
|
||||||
|
|
@ -30,7 +30,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home-assistant'local = {
|
home-assistant'local = {
|
||||||
inherit name listenPorts;
|
inherit name listen';
|
||||||
ssl.cert.copyFromVhost = "home-assistant";
|
ssl.cert.copyFromVhost = "home-assistant";
|
||||||
local.enable = mkDefault true;
|
local.enable = mkDefault true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ in {
|
||||||
inherit extraConfig;
|
inherit extraConfig;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
listenPorts = {
|
listen' = {
|
||||||
http = { };
|
http = { };
|
||||||
https.ssl = true;
|
https.ssl = true;
|
||||||
stream.port = mkDefault access.streamPort;
|
stream.port = mkDefault access.streamPort;
|
||||||
|
|
@ -60,11 +60,11 @@ in {
|
||||||
kTLS = mkDefault true;
|
kTLS = mkDefault true;
|
||||||
in {
|
in {
|
||||||
kitchencam = {
|
kitchencam = {
|
||||||
inherit name locations listenPorts kTLS;
|
inherit name locations listen' kTLS;
|
||||||
vouch.enable = true;
|
vouch.enable = true;
|
||||||
};
|
};
|
||||||
kitchencam'local = {
|
kitchencam'local = {
|
||||||
inherit name locations listenPorts kTLS;
|
inherit name locations listen' kTLS;
|
||||||
ssl.cert.copyFromVhost = "kitchencam";
|
ssl.cert.copyFromVhost = "kitchencam";
|
||||||
local.enable = true;
|
local.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ in {
|
||||||
in {
|
in {
|
||||||
plex = {
|
plex = {
|
||||||
inherit name locations extraConfig kTLS;
|
inherit name locations extraConfig kTLS;
|
||||||
listenPorts = {
|
listen' = {
|
||||||
http = { };
|
http = { };
|
||||||
https.ssl = true;
|
https.ssl = true;
|
||||||
external = {
|
external = {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ in {
|
||||||
kTLS = mkDefault true;
|
kTLS = mkDefault true;
|
||||||
in {
|
in {
|
||||||
unifi'management = mkIf access.global.management {
|
unifi'management = mkIf access.global.management {
|
||||||
listenPorts.management = {
|
listen'.management = {
|
||||||
port = access.managementPort;
|
port = access.managementPort;
|
||||||
ssl = true;
|
ssl = true;
|
||||||
extraParameters = [ "default_server" ];
|
extraParameters = [ "default_server" ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue