From 02a6723b567187fa0770b2d5ac3cc947b7b29954 Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Sat, 28 Oct 2023 17:27:29 +0200 Subject: [PATCH] services: nginx: Ensure network is up before starting Signed-off-by: Christoph Heiss --- services/nginx.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/nginx.nix b/services/nginx.nix index 7ec3bae..7037dfa 100644 --- a/services/nginx.nix +++ b/services/nginx.nix @@ -24,4 +24,9 @@ reloadServices = [ "nginx" ]; environmentFile = "/var/secrets/hetzner-acme"; }; + + systemd.services.nginx = { + after = [ "network-online.target" ]; + wants = [ "network-online.target" ]; + }; }