nix: fix shallow-merge drop in module-eval's hive stub helper

This commit is contained in:
damocles 2026-08-14 09:54:20 +02:00 committed by mara
commit 58a6e4b796

View file

@ -49,13 +49,20 @@ let
}; };
boot.loader.grub.enable = false; boot.loader.grub.enable = false;
system.stateVersion = "25.11"; 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; enable = true;
hiveName = "h1"; hiveName = "h1";
swarm.domain = "t.local"; swarm.domain = "t.local";
swarm.hives.h1.domain = "h1.t.local"; swarm.hives.h1.domain = "h1.t.local";
} } extra;
// extra;
} }
]; ];
}).config; }).config;