From 78a3119c6d1cc698e0f66a8d4be5f11823ea765f Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Mon, 14 Oct 2024 10:23:29 -0600 Subject: [PATCH] nixos: Depend on network-online.target for Postgres Co-authored-by: Adam Stephens --- nixos/atticd.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nixos/atticd.nix b/nixos/atticd.nix index 6069d41..2ca17bf 100644 --- a/nixos/atticd.nix +++ b/nixos/atticd.nix @@ -200,10 +200,8 @@ in systemd.services.atticd = { wantedBy = [ "multi-user.target" ]; - after = [ "network.target" ] ++ lib.optionals hasLocalPostgresDB [ - "postgresql.service" - "nss-lookup.target" - ]; + after = [ "network-online.target" ] ++ lib.optionals hasLocalPostgresDB [ "postgresql.service" ]; + requires = lib.optionals hasLocalPostgresDB [ "postgresql.service" ]; serviceConfig = { ExecStart = "${cfg.package}/bin/atticd -f ${checkedConfigFile} --mode ${cfg.mode}";