feat: ssl for pre-nextcloud

This commit is contained in:
DACHXY 2025-05-03 23:48:14 +08:00
parent 5206893dcd
commit 62c1eb4b1d

View file

@ -2,8 +2,6 @@
config,
lib,
pkgs,
settings,
devices,
...
}:
let
@ -12,7 +10,7 @@ let
certScript = pkgs.writeShellScriptBin "certbot-nextcloud" ''
${pkgs.certbot}/bin/certbot certonly --webroot \
--webroot-path ${acmeWebRoot} -v \
-d ${config.services.neextcloud.hostName} \
-d ${config.services.nextcloud.hostName} \
--server https://ca.net.dn:8443/acme/acme/directory \
-m admin@mail.net.dn
@ -63,7 +61,7 @@ in
'';
};
pre7780Hostname = {
${pre7780.hostname} = {
listen = [
{
addr = "0.0.0.0";
@ -93,6 +91,10 @@ in
'';
};
forceSSL = true;
sslCertificate = "/etc/letsencrypt/live/${pre7780.hostname}/fullchain.pem";
sslCertificateKey = "/etc/letsencrypt/live/${pre7780.hostname}/privkey.pem";
extraConfig = ''
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers 'TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384';