From 4c8e916ae699a2f9742b8e17f1c620545d72bb90 Mon Sep 17 00:00:00 2001 From: damocles Date: Fri, 5 Jun 2026 23:20:35 +0200 Subject: [PATCH] fix: add /run/lock to hive-priv ReadWritePaths so nixos-container can lock on first launch --- nix/modules/hive-c0re.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nix/modules/hive-c0re.nix b/nix/modules/hive-c0re.nix index 2376bc35..9ae2899e 100644 --- a/nix/modules/hive-c0re.nix +++ b/nix/modules/hive-c0re.nix @@ -795,6 +795,13 @@ in # /run/hive-agent — chown/chmod per-agent socket directories # /run/systemd — container@ unit drop-ins (resource limits) # + machinectl / systemd-machined state + # /run/lock — `nixos-container` opens a lock file at + # /run/lock/nixos-container to serialise + # create/destroy. Under ProtectSystem=strict + # /run is read-only, so without this the very + # first `nixos-container create` (ruth, on a + # fresh host) dies with "Read-only file + # system" before any container exists. # /var/lib/nixos-containers — container rootfs written by nixos-container # /var/lib/hyperhive — agent state files written by WriteAgentForgeToken # / WriteAgentMatrixToken (tokens under agents//state/) @@ -806,6 +813,7 @@ in "/run/hive" "/run/hive-agent" "/run/systemd" + "/run/lock" "/var/lib/nixos-containers" "/var/lib/hyperhive" "/nix"