acme: ensure nginx challenges directory is writeable
commit75f131da02c00027b9a8240fb74d117cb0f9d9cf
authorDomen Kožar <domen@dev.si>
dateTue 29 Nov 2016, 15:55 (10 years ago)
parent69e0740
nixos/modules/security/acme.nix+1
@@ -178,6 +178,7 @@ in
178178 path = [ pkgs.simp_le ];
179179 preStart = ''
180180 mkdir -p '${cfg.directory}'
181+ chown '${data.user}:${data.group}' '${cfg.directory}'
181182 if [ ! -d '${cpath}' ]; then
182183 mkdir '${cpath}'
183184 fi
nixos/modules/security/acme.xml+1−1
@@ -75,7 +75,7 @@ options for the <literal>security.acme</literal> module.</para>
7575
7676<programlisting>
7777security.acme.certs."foo.example.com" = {
78− webroot = "/var/www/challenges";
78+ webroot = config.security.acme.directory + "/acme-challenge";
7979 email = "foo@example.com";
8080 user = "nginx";
8181 group = "nginx";