From 58a6e4b796460712dd84932be09ff172ec4f0b3e Mon Sep 17 00:00:00 2001 From: damocles Date: Fri, 14 Aug 2026 09:54:20 +0200 Subject: [PATCH] nix: fix shallow-merge drop in module-eval's hive stub helper --- nix/module-eval.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/nix/module-eval.nix b/nix/module-eval.nix index fb37f0b9..29d70fa2 100644 --- a/nix/module-eval.nix +++ b/nix/module-eval.nix @@ -49,13 +49,20 @@ let }; boot.loader.grub.enable = false; system.stateVersion = "25.11"; - services.hyperhive = { + # `recursiveUpdate`, not `//`: a plain `//` only merges the + # *top-level* keys of `extra` in, so an `extra` that touches a + # nested attr under an existing top-level key (e.g. `swarm.*`) + # silently drops every sibling under that key instead of merging + # into it — the same class of bug as the `services.hyperhive` + # double-nesting mistake this stub already had to dodge once, + # just one level down. `recursiveUpdate` merges nested attrsets + # all the way down instead. + services.hyperhive = lib.recursiveUpdate { enable = true; hiveName = "h1"; swarm.domain = "t.local"; swarm.hives.h1.domain = "h1.t.local"; - } - // extra; + } extra; } ]; }).config;