mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
refactor(nginx): ssl preread
This commit is contained in:
parent
418caefe64
commit
b0a3da835c
7 changed files with 162 additions and 74 deletions
|
|
@ -1,13 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
networking.firewall.interfaces.local.allowedTCPPorts = [
|
||||
443
|
||||
80
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkDefault;
|
||||
cfg = config.services.nginx;
|
||||
in {
|
||||
networking.firewall.interfaces.local.allowedTCPPorts = let
|
||||
inherit (cfg.ssl) preread;
|
||||
in mkIf cfg.enable [
|
||||
(if preread.enable then preread.serverPort else cfg.defaultSSLListenPort)
|
||||
cfg.defaultHTTPListenPort
|
||||
];
|
||||
|
||||
services.nginx = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue