nixos/acme: remove scripted webroot creation

Situations where systemd-tmpfiles rules aren't applied but
acme-$name.service is rerun are quite unlikely, so it should be fine to
remove the mkdir completely.
This commit is contained in:
Linus Heckemann
2026-04-16 16:41:56 +02:00
parent a86d6ed9b1
commit d25d639031
-15
View File
@@ -441,21 +441,6 @@ let
chown -R ${user}:${data.group} "$fixpath"
fi
done
${lib.optionalString (data.webroot != null) ''
# Ensure the webroot exists.
# Lego will fail if the webroot does not exist at all.
(
# If creating the webroot dir, make it world-readable so that the
# web server can access it regardless of whether the certificate
# is actually being generated for this web server.
umask 0022 \
&& mkdir -p '${data.webroot}/.well-known/acme-challenge'
) || (
echo 'Please ensure ${data.webroot}/.well-known/acme-challenge exists and is writable by the user ${user}.' \
&& exit 1
)
''}
'';
};