From 0456fa91ecfad4bc535f2d7e99f87bd22dc76fd4 Mon Sep 17 00:00:00 2001 From: Josh Palmer Date: Tue, 3 Feb 2026 17:43:09 -0800 Subject: [PATCH] infra: avoid amazon-init bootstrap deadlock - drop amazon-init ordering for clawdinator-bootstrap - wait on fetch-ec2-metadata when available --- nix/modules/clawdinator.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nix/modules/clawdinator.nix b/nix/modules/clawdinator.nix index 402e3bd..d25020e 100644 --- a/nix/modules/clawdinator.nix +++ b/nix/modules/clawdinator.nix @@ -699,8 +699,12 @@ in systemd.services.clawdinator-bootstrap = lib.mkIf cfg.bootstrap.enable { description = "CLAWDINATOR bootstrap (S3 secrets + repo seeds)"; wantedBy = [ "multi-user.target" ]; - after = [ "network-online.target" "amazon-init.service" ]; - wants = [ "network-online.target" "amazon-init.service" ]; + after = + [ "network-online.target" ] + ++ lib.optional (config.systemd.services ? fetch-ec2-metadata) "fetch-ec2-metadata.service"; + wants = + [ "network-online.target" ] + ++ lib.optional (config.systemd.services ? fetch-ec2-metadata) "fetch-ec2-metadata.service"; serviceConfig = { Type = "oneshot"; RemainAfterExit = true;