hyperhive/nix/modules
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas a3796890f5 feat(#2363): DHCP pool for bridge service containers
Add a DHCP pool to the gateway's dnsmasq so bridge-attached service
containers (hive-ci and future equivalents) get their addresses from
a proper DHCP server instead of a brittle static derivation.

gateway (hive-gateway.nix):
- Add IPv4 arithmetic helpers (ipToInt, intToIp, pow2) to compute the
  DHCP pool range at nix eval time from bridgeIp + bridgePrefixLength.
- Reserve the last dhcpPoolSize (14) usable host addresses as the DHCP
  pool (e.g. .241-.254 on a /24 with 10.42.0.0 network).
- Add dhcp-range and dhcp-leasefile to the dnsmasq settings block.
  The pool is active whenever services.hyperhive.network.enable is true.

hive-ci (hive-ci.nix):
- Remove the ciBridgeIp / ciBridgeOctets static derivation and the
  brittle top-of-/24 comment block.
- Switch networking.interfaces.eth0 to useDHCP = true so hive-ci gets
  its address from the gateway DHCP pool.

lifecycle (mod.rs, tests.rs):
- Add DHCP_POOL_SIZE = 14 constant (must stay in sync with
  dhcpPoolSize in hive-gateway.nix).
- Remap agents whose FNV-1a hash falls in the DHCP pool into the
  agent-only window [2, dhcp_start - 1]. Only the rare agent whose
  name hashes into the pool is affected; all others keep their IPs.
- Update and extend tests: agent range is now .2-.240 on /24;
  add agent_network_ip_never_in_dhcp_pool covering 18 agent names.
2026-07-13 11:57:14 +02:00
..
hive-c0re.nix feat(#1970): host services.hyperhive.github.enable (default true) + meta.rs propagation of the off-switch 2026-07-11 12:18:55 +02:00
hive-ci.nix feat(#2363): DHCP pool for bridge service containers 2026-07-13 11:57:14 +02:00
hive-forge.nix chore(docs,nix): fix stale 'localhost via shared netns' claims in forge/matrix 2026-07-04 22:54:38 +02:00
hive-gateway.nix feat(#2363): DHCP pool for bridge service containers 2026-07-13 11:57:14 +02:00
hive-matrix.nix chore(docs,nix): fix stale 'localhost via shared netns' claims in forge/matrix 2026-07-04 22:54:38 +02:00
hive-network.nix chore(nix): trim stale body from deprecated isolateContainers option doc 2026-07-04 21:57:26 +02:00
hive-tls.nix fix(#2332): add After=hive-tls-ca to resign service — prevent first-boot CA race 2026-07-10 19:37:08 +02:00