From c5e23fd3a33c09bbb3215c5ecca89588ac297314 Mon Sep 17 00:00:00 2001 From: atlas Date: Sat, 6 Jun 2026 11:49:59 +0200 Subject: [PATCH] fix(matrix): correct container ordering unit name to container@.service The host systemd unit for a declarative nixos-container is container@.service (confirmed from the live container@hive-matrix.service status), not nixos-container@. The prior commit's nixos-container@ ordering targeted a non-existent unit (a silent no-op). Use container@hive-{matrix,gateway}.service so the after-ordering actually takes effect. --- nix/modules/hive-matrix.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nix/modules/hive-matrix.nix b/nix/modules/hive-matrix.nix index 875b165a..7f60fc29 100644 --- a/nix/modules/hive-matrix.nix +++ b/nix/modules/hive-matrix.nix @@ -415,10 +415,11 @@ in # requirement. Soft `after` ordering (not `requires`) keeps the matrix # container's lifecycle decoupled from the gateway's. `network.enable` # asserts `gateway.enable`, so the gateway container unit always exists - # here. (Declarative `containers.` → `nixos-container@.service`, - # per the hive-ci precedent.) - systemd.services."nixos-container@hive-matrix".after = lib.mkIf networkCfg.enable [ - "nixos-container@hive-gateway.service" + # here. (Declarative `containers.` → `container@.service` — the + # nspawn template NixOS generates, confirmed from the live + # `container@hive-matrix.service` host unit.) + systemd.services."container@hive-matrix".after = lib.mkIf networkCfg.enable [ + "container@hive-gateway.service" ]; }; }