hyperhive/nix
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 9f3f01450b swarm-bao: keep the raft state in the container, bind only the TLS material
The state directory was bind-mounted from the host so a nixos-container
destroy could not take the swarm's secrets with it. No sibling service does
that -- swarm-grafana keeps its sqlite database inside the container on
ephemeral = false -- and the bind is what broke the store: upstream pairs
StateDirectory= with DynamicUser=, systemd relocates the state to
/var/lib/private/openbao, and that rename fails EBUSY on an active mount
point, so the unit died at STATE_DIRECTORY before bao ever ran.

The TLS material still has to cross the boundary, because a host unit writes
it and the container reads it, so it moves to its own small bind at
/var/lib/swarm-bao-tls rather than riding along in the state directory. That
directory is 0755 and read-only inside: the certificate and client CA are
public and are read straight off the mount.

The private key is not. install -m 0600 leaves it root-owned and the service
runs as a DynamicUser, so the bind-mounted file is unreadable to it -- which
the old layout hid, because StateDirectory chowned the whole tree on the way
past. LoadCredential is systemd's mechanism for precisely this: PID 1 opens
the source as root and re-exposes it inside the unit owned by the service's
own account.
2026-08-31 00:33:37 +02:00
..
agent-modules nix, hive-sh4re: name modules that exist in the stale harness-base refs 2026-08-30 04:19:11 +02:00
docs nix/docs: stop naming a specific remote builder in a comment 2026-08-30 20:20:40 +02:00
host-modules swarm-bao: keep the raft state in the container, bind only the TLS material 2026-08-31 00:33:37 +02:00
packages docs: split swarm/deploy options into their own reference pages 2026-08-30 04:32:01 +02:00
templates refactor: nix/host-modules + nix/agent-modules layout, update doc paths 2026-07-13 22:05:49 +02:00
checks.nix agent: fix CI — drop tracker tag in checks.nix comment, regenerate npmDepsHash 2026-08-28 22:05:13 +02:00
devshell.nix types: let nix own the reserved-name blacklist 2026-08-27 16:36:42 +02:00
module-eval.nix deploy: rename enableAllLocalDefaults to deploy.singleHostSwarm 2026-08-30 20:12:16 +02:00
reserved-names.nix types: let nix own the reserved-name blacklist 2026-08-27 16:36:42 +02:00
rust.nix docs(rust): the dep-cache comment no longer describes two consumers 2026-08-11 22:29:56 +02:00
sources.nix refactor: slim flake.nix into nix/ entry files 2026-07-13 20:55:43 +02:00
treefmt.nix refactor: slim flake.nix into nix/ entry files 2026-07-13 20:55:43 +02:00