nix: fix shallow-merge drop in module-eval's hive stub helper
This commit is contained in:
parent
8997938557
commit
58a6e4b796
1 changed files with 10 additions and 3 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue