nixos/acme: don't depend on multi-user.target inside a container

On boot, a container doesn't have an uplink and would run into a timeout
while waiting for cert renewal[1].

[1] https://github.com/NixOS/nixpkgs/pull/81371#issuecomment-605526099
This commit is contained in:
Maximilian Bosch 2020-03-29 19:59:52 +02:00
parent 9e7c54325e
commit 1a5289f803
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E

View File

@ -318,7 +318,7 @@ in
description = "Renew ACME Certificate for ${cert}";
after = [ "network.target" "network-online.target" ];
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
wantedBy = mkIf (!config.boot.isContainer) [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
# With RemainAfterExit the service is considered active even