From 13fe8e2fb5c1215e707d14dee000faeb1137c6c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Thu, 22 Aug 2024 12:14:26 +0000 Subject: [PATCH] fix(acme): certificate valid for all domains --- sourcehut.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sourcehut.nix b/sourcehut.nix index d2caefa..926c861 100644 --- a/sourcehut.nix +++ b/sourcehut.nix @@ -1,6 +1,7 @@ # vim: tabstop=2 shiftwidth=2 expandtab let - fqdn = "sourcehut.005540.xyz"; + base-domain = "005540.xyz"; + fqdn = "sourcehut.${base-domain}"; in { services.sourcehut = { @@ -42,7 +43,8 @@ in }; security.acme = { - certs.${fqdn}.extraDomainNames = [ + certs.${base-domain}.extraDomainNames = [ + "${fqdn}" "meta.${fqdn}" "git.${fqdn}" ]; @@ -60,6 +62,9 @@ in recommendedGzipSettings = true; recommendedProxySettings = true; virtualHosts = { + "${base-domain}" = { + enableACME = true; + }; "${fqdn}" = { enableACME = true; };