From 6895b9357e1fad6f146beff8d7678d9776b6eecd Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Wed, 1 Jan 2025 02:34:23 +0400 Subject: [PATCH] dns challenge --- modules/server/nginx.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/server/nginx.nix b/modules/server/nginx.nix index dbc9ba1d..541d769c 100644 --- a/modules/server/nginx.nix +++ b/modules/server/nginx.nix @@ -12,7 +12,11 @@ in { defaults.server = "https://acme-staging-v02.api.letsencrypt.org/directory"; defaults.group = config.services.nginx.group; - defaults.webroot = "/var/lib/acme/acme-challenge"; + defaults.credentialsFile = { + "PORKBUN_API_KEY" = "/srv/secrets/porkbun-api"; + "PORKBUN_SECRET_API_KEY" = "/srv/secrets/porkbun-secret-api"; + }; + defaults.dnsProvider = "porkbun"; }; services.nginx = { enable = true; @@ -26,7 +30,8 @@ in { commonHttpConfig = '' access_log /var/log/nginx/access.log combined buffer=32k flush=5m; - error_log /var/log/nginx/error.log warn; + error_log /var/log/nginx/error.log warn; + ''; };