diff --git a/app/sovran_systemsos_web/server.py b/app/sovran_systemsos_web/server.py index 9695032..2499733 100644 --- a/app/sovran_systemsos_web/server.py +++ b/app/sovran_systemsos_web/server.py @@ -444,11 +444,11 @@ def _read_hub_overrides() -> tuple[dict, str | None]: with open(HUB_OVERRIDES_NIX, "r") as f: content = f.read() for m in re.finditer( - r'sovran_systemsOS\.features\.([a-zA-Z0-9_-]+)\s*=\s*(true|false)\s*;', + r'sovran_systemsOS\.features\.([a-zA-Z0-9_-]+)\s*=\s*(?:lib\.mkForce\s+)?(true|false)\s*;', content, ): features[m.group(1)] = m.group(2) == "true" - m2 = re.search(r'sovran_systemsOS\.nostr_npub\s*=\s*"([^"]*)"', content) + m2 = re.search(r'sovran_systemsOS\.nostr_npub\s*=\s*(?:lib\.mkForce\s+)?"([^"]*)"', content) if m2: nostr_npub = m2.group(1) except FileNotFoundError: @@ -461,13 +461,13 @@ def _write_hub_overrides(features: dict, nostr_npub: str | None) -> None: lines = [] for feat_id, enabled in features.items(): val = "true" if enabled else "false" - lines.append(f" sovran_systemsOS.features.{feat_id} = {val};") + lines.append(f" sovran_systemsOS.features.{feat_id} = lib.mkForce {val};") if nostr_npub: - lines.append(f' sovran_systemsOS.nostr_npub = "{nostr_npub}";') + lines.append(f' sovran_systemsOS.nostr_npub = lib.mkForce "{nostr_npub}";') body = "\n".join(lines) + "\n" if lines else "" content = ( "# Auto-generated by Sovran Hub — do not edit manually\n" - "{ ... }:\n" + "{ lib, ... }:\n" "{\n" + body + "}\n" diff --git a/modules/core/sovran-hub.nix b/modules/core/sovran-hub.nix index 02faeaf..0d3b56d 100644 --- a/modules/core/sovran-hub.nix +++ b/modules/core/sovran-hub.nix @@ -294,7 +294,7 @@ in script = '' cat > /etc/nixos/hub-overrides.nix <<'EOF' # Auto-generated by Sovran Hub — do not edit manually -{ ... }: +{ lib, ... }: { } EOF @@ -303,4 +303,4 @@ EOF networking.firewall.allowedTCPPorts = [ 8937 ]; }; -} \ No newline at end of file +}