modules(pihole-container): add requires-dependency on network-online.target to systemd.service

This commit is contained in:
Christopher Bacher 2022-10-17 00:52:35 +02:00
parent 8ba929f20f
commit dde81d1e16

View file

@ -286,6 +286,7 @@ in rec {
systemd.services."pihole-rootless-container" = { systemd.services."pihole-rootless-container" = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ]; after = [ "network-online.target" ];
requires = [ "network-online.target" ];
# required to make `newuidmap` available to the systemd service (see https://github.com/NixOS/nixpkgs/issues/138423) # required to make `newuidmap` available to the systemd service (see https://github.com/NixOS/nixpkgs/issues/138423)
path = [ "/run/wrappers" ]; path = [ "/run/wrappers" ];