From c3da8351ec44228c3383634cfc7a1a52bee8f42a Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Sat, 13 Apr 2024 00:56:08 -0400 Subject: [PATCH] global/security: split into force ssl and add ssl --- modules/global/security.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/global/security.nix b/modules/global/security.nix index 4458db5..5bc5d5a 100644 --- a/modules/global/security.nix +++ b/modules/global/security.nix @@ -54,6 +54,17 @@ with lib; }; common = { - nginx.ssl = { sslCertificate = config.secrets."inx.moe.pem"; sslCertificateKey = config.secrets."inx.moe.key"; forceSSL = true; }; + nginx = rec { + ssl-cert = { + sslCertificate = config.secrets."inx.moe.pem"; + sslCertificateKey = config.secrets."inx.moe.key"; + }; + ssl-optional = ssl-cert // { + addSSL = true; + }; + ssl = ssl-cert // { + forceSSL = true; + }; + }; }; }