fix(public-ip): move system.activationScripts under the config attribute

The module mixed the `options` keyword attribute with a bare top-level
`system.*` setting. Once a module declares `options` (or `config`), every
other top-level attribute must be a reserved module keyword — the nixpkgs
unifyModuleSyntax check rejects anything else, so every nixos-rebuild
aborted at evaluation time with:

  error: Module '.../modules/core/public-ip.nix' has an unsupported
  attribute `system'. ... move all of them (namely: system) into the
  `config' attribute.

Prefix the activation script with `config.` (equivalent to wrapping it in
`config = { ... };`) so the module evaluates again. The detector script
itself is unchanged.

Fixes: ac6c498615 (-feat(public-ip): unify public-IP detection into one privacy-first script-)
This commit is contained in:
2026-08-20 17:00:23 -05:00
parent ac6c498615
commit 47e9bb99b0
+5 -1
View File
@@ -93,7 +93,11 @@ in
}; };
# ── Install the unified detector ────────────────────────────────────────── # ── Install the unified detector ──────────────────────────────────────────
system.activationScripts.sovranPublicIpInstall = lib.stringAfter [ "users" ] '' # This module declares `options` above, so ALL configuration must go under
# the `config` attribute: NixOS forbids mixing bare top-level settings
# (like `system.*`) with the `options`/`config` keyword attributes in the
# same module. (Fixes: "Module ... has an unsupported attribute `system'".)
config.system.activationScripts.sovranPublicIpInstall = lib.stringAfter [ "users" ] ''
install -d -m 0755 /var/lib/sovran install -d -m 0755 /var/lib/sovran
cat > /var/lib/sovran/public-ip.py <<'PYEOF' cat > /var/lib/sovran/public-ip.py <<'PYEOF'
#!/usr/bin/env python3 #!/usr/bin/env python3