fix(nix): keep the domain-derived defaults total

The required-domain assertion in hive-network.nix could not be reached:
`forge.<domain>` and `matrix.<domain>` are evaluated while the
assertion list is, so an unset domain threw `cannot coerce null to a
string` naming one of those options instead of printing the message
that says which option to set.

Both defaults now fall back to a name under the reserved `.invalid`
TLD, which the assertion refuses to let out the door.
This commit is contained in:
atlas 2026-08-05 14:47:26 +02:00 committed by mara
commit 747f405c6f
4 changed files with 21 additions and 6 deletions

View file

@ -120,7 +120,9 @@ in
domain = lib.mkOption {
type = lib.types.str;
default = "forge.${hyperhiveDomain}";
# Total on a null hive domain so the required-domain assertion in
# hive-network.nix is the thing that fires; see the comment there.
default = if hyperhiveDomain == null then "forge.invalid" else "forge.${hyperhiveDomain}";
defaultText = lib.literalExpression ''"forge.''${services.hyperhive.domain}"'';
example = "git.example.com";
description = ''