nixos/acme: Set /var/lib/acme permissions to 755

It was being created with the default home permissions of 700, and then
set to 755 at runtime by something either some script or systemd as
part of service startup.

It worked fine without sysusers, but when it's enabed with:

    systemd.sysusers.enable = true;

systemd-tmpfiles is resetting permissions on each activation, which
breaks, for example, nginx reload, because it cannot load certificates
anymore, because it doesn't have any access to `/var/lib/acme`.

Fix this by setting `homeMode = "755";` explicitely so that it's set to
the final value from the beginning.

(cherry picked from commit 64a6e8292a)
This commit is contained in:
Yuriy Taraday 2024-11-04 15:49:57 +01:00 committed by github-actions[bot]
parent 28d1fb6d22
commit 28ba9e2c27

View File

@ -967,6 +967,7 @@ in {
users.users.acme = {
home = "/var/lib/acme";
homeMode = "755";
group = "acme";
isSystemUser = true;
};