From 9ade8f6eb774dc7d19d82a070199b5024786b819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 17 May 2019 01:43:18 +0200 Subject: Use acme directory config rather than hardcoding the value --- modules/websites/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/websites/default.nix') diff --git a/modules/websites/default.nix b/modules/websites/default.nix index b76aeea..e57f505 100644 --- a/modules/websites/default.nix +++ b/modules/websites/default.nix @@ -102,7 +102,7 @@ in serverAliases = [ "*" ]; enableSSL = false; logFormat = "combinedVhost"; - documentRoot = "/var/lib/acme/acme-challenge"; + documentRoot = "${config.security.acme.directory}/acme-challenge"; extraConfig = '' RewriteEngine on RewriteCond "%{REQUEST_URI}" "!^/\.well-known" @@ -131,9 +131,9 @@ in }; toVhost = ips: vhostConf: { enableSSL = true; - sslServerCert = "/var/lib/acme/${vhostConf.certName}/cert.pem"; - sslServerKey = "/var/lib/acme/${vhostConf.certName}/key.pem"; - sslServerChain = "/var/lib/acme/${vhostConf.certName}/chain.pem"; + sslServerCert = "${config.security.acme.directory}/${vhostConf.certName}/cert.pem"; + sslServerKey = "${config.security.acme.directory}/${vhostConf.certName}/key.pem"; + sslServerChain = "${config.security.acme.directory}/${vhostConf.certName}/chain.pem"; logFormat = "combinedVhost"; listen = map (ip: { inherit ip; port = 443; }) ips; hostName = builtins.head vhostConf.hosts; -- cgit v1.2.3