From b939506879714ee5034e12eca390117b5e789000 Mon Sep 17 00:00:00 2001 From: niten Date: Sun, 30 Jul 2023 10:10:57 -0700 Subject: [PATCH] Wait for the network before starting lemmy. --- lemmy-docker.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lemmy-docker.nix b/lemmy-docker.nix index 6af3ef1..2247438 100644 --- a/lemmy-docker.nix +++ b/lemmy-docker.nix @@ -350,10 +350,16 @@ in { }; }; - systemd.tmpfiles.rules = [ - "d ${cfg.state-directory}/pictrs 0700 lemmy-pictrs root - -" - "d ${cfg.state-directory}/postgres 0700 lemmy-postgres root - -" - ]; + systemd = { + services.arion-lemmy = { + after = [ "network-online.target" ]; + requires = [ "network-online.target" ]; + }; + tmpfiles.rules = [ + "d ${cfg.state-directory}/pictrs 0700 lemmy-pictrs root - -" + "d ${cfg.state-directory}/postgres 0700 lemmy-postgres root - -" + ]; + }; virtualisation = { arion.projects.lemmy.settings = let