Enroll Pangolin Matrix client in Nebula #338
No reviewers
Labels
No labels
area:authentication
area:flake-utilities
area:performance
area:tbd
host:chaos
host:cosmos
host:electra
host:fleet
host:lena
host:lyra
host:mass-storage
host:media1
host:nimmog-de
host:nova
host:pangolin
host:pangolin-vps
host:phone
host:router
host:vega
investigation
phase:cutover
phase:deploy
phase:mcp
phase:module
phase:packaging
phase:prep
phase:validation
priority:high
priority:medium
project:attic-postgres-lyra-rollout
project:auto-update-reliability
project:auto-update-remediation
project:declarative-purity-cleanup
project:external-review
project:fleet-boundary-cleanup
project:host-facts-refactor
project:lyra-nixos-deploy
project:lyra-service-stack-migration
project:nebula-mesh-network
project:nix-idioms-hygiene
project:nixos-build-deployment-pipeline
project:security-hardening
project:service-stack-migration
project:vega-sillytavern-cutover
project:wiki-rebuild
repo:numtide/flake-utils
repo:numtide/nix-auth
repo:numtide/nixos-passthru-cache
repo:numtide/nix-relay
service:auto-update
service:gitlab
service:hermes
service:mem0
service:nix
service:sillytavern
service:slskd
service:synthseek
service:tdarr
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config!338
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/pangolin-nebula"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Matrix host formerly called ES2 needs normal mesh access as a main-fleet client. Enroll its Nebula identity as pangolin while retaining pangolin-vps as the existing external lighthouse. Totalgeek remains outside the mesh.
Validation: nix flake check passes. The certificate's CA signature, expected identity/networks/groups and private-key pairing were verified without exposing key material. The native Ubuntu config passed validation before activation. Live IPv4/IPv6 overlay traffic, authenticated SSH over both families, lighthouse/router reachability and mesh DNS checks pass. Existing public application endpoints and container health remain good. The native service is active and enabled; its temporary activation rollback timer was cancelled after acceptance. Temporary local and remote credential staging was shredded/removed, retaining only the protected installed key and recovery records. Upstream stdenv deprecation warnings were reviewed and are unrelated.
Native setup files remain in the separate router-nebula project, as requested. Detailed operational records are private in KiwiFS. The live OS hostname currently reports matrix; the Nebula identity pangolin does not require changing it.
AI review: current-head review 85 is Ready to merge with zero findings or suggestions; relevant CI passed. Remaining: normal deployment of the shared NixOS discovery metadata after merge. This source commit does not modify public application routing or firewall policy. No extra credentials are needed from the user.
Closes #337. Milestone: Pangolin Mesh Enrollment (39).
Also records the explicitly requested automated MR follow-up process in AGENTS.md: five-minute review polling, a 30-minute response window per submission/push, valid-feedback fixes with validation and comments before pushing, and an explicit stop on readiness or timeout. This documentation received focused review and git diff --check validation. The current submission is subject to that process; no merge is authorized by this request.
First scheduled review check: the CI test passed, but the automated review run failed before publishing any review (review CLI exited with code 1). No code findings are available. Retrying that review run once on the same head; no source changes or extra push are warranted. The original 30-minute response window remains in effect.
The authorized 30-minute automated-review response window has expired, and scheduled polling has stopped. No review report was available at the final eligible check. Both the original review invocation and one manual retry failed before publishing findings (review CLI exit code 1). The CI test passed. No source changes were justified by these execution failures. MR remains open and unmerged; review readiness has not been established.
Automated code review
Reviewed commit:
2c1d57649354a6f6b0e4b373cf7137f691fb7213Verdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
The change adds a new Nebula client identity
pangolin(the Matrix host formerly called ES2): a signed public certificate atnebula/certs/pangolin.crt, a scoped SOPS-encrypted node key atsecrets/nebula/pangolin.yaml, and matching entries inmodules/networking/nebula.nix(hostMap10.10.0.11 andipv6HostMapdefault fd56:f458:569c::11), plus README/AGENTS.md prose. The internal consistency checks I could perform hold: the two maps stay paired, so the module assertionlib.all (name: hostMap ? ${name}) (builtins.attrNames cfg.ipv6HostMap)(modules/networking/nebula.nix:161) is satisfied; the addresses 10.10.0.11 / fd56:f458:569c::11 do not collide with any other entry in the checked-outhostMap/ipv6HostMap(pangolin-vps 1, vega 2, lyra 3, nova 4, mass-storage 5, media1 6, nimmog-de 7, electra 20, lena 21, router, phone 30);pangolinis not innebula/revoked.json; and the new secret file's three age recipients (both YubiKeys plus the provisioning key) match the explicit admin-onlysecrets/nebula/[^/]+\.yaml$rule for external nodes (.sops.yaml:266), which is the correct scope for a non-NixOS client. The key structurenebula: pangolin-keyfollows the existing per-node convention. One documentation inconsistency is demonstrable: the README sentence enumerating theipv6HostMapinventory was not extended, so it now understates the map this same change widened.Blocking findings
None.
Important findings
None.
Suggestions
nixosConfig.nebula.ipv6HostMapnow omitspangolin(README.md:147; high confidence)README.md lines 145-147 state: "
nixosConfig.nebula.ipv6HostMapsupplies hosts-file and DNS AAAA records for confirmed certificate addresses across the fleet: the VPS, router, phone, Vega, Lyra, Lena, Electra, Nova, mass-storage, Media1 and Nimmog-de." The same MR addspangolin = "fd56:f458:569c::11"to that option's default inmodules/networking/nebula.nix(andpangolin = "10.10.0.11"tohostMap), and the new README text at lines 158-159 documents the node only as being distinct frompangolin-vps.Impact: The prose inventory is now stale relative to the module default it describes, so an operator or agent using README to enumerate nodes with AAAA/hosts-file records would miss
pangolin; the module itself is unaffected and evaluation is unchanged.Suggested fix: Extend the existing enumeration to name
pangolinalongside the other confirmed addresses (or reword it to say the list followsipv6HostMapinmodules/networking/nebula.nix), and stage the README edit with the rest of the commit as AGENTS.md instructs.Tests and validation
Questions
pangolinis already used in this repository for unrelated things (secrets/pangolin.yaml,modules/mcp/pangolin.nix,packages/mcp-pangolin,modules/profiles/pi-pangolin.nix, and the public endpointhttps://pangolin.nimmog.ukinmodules/services/newt.nix). After this change every NixOS member also gets bare/etc/hostsentriespangolinandpangolin.meshfor 10.10.0.11. Was that naming overlap considered acceptable, or should the node use a name that does not read as the Pangolin service?matrixwhile its Nebula identity ispangolin.modules/networking/nebula.nixderivesoverlayIpfromhostMap.${config.networking.hostName}; is the host intended to stay permanently outside the flake (owned only by~/Projects/router-nebula), i.e. never a NixOS target namedmatrix?Review limitations
nebula/certs/pangolin.crt: the available tools are read/grep/find/ls only, so the certificate's signed identity, networks, groups and its pairing with the encrypted node key remain unverified from supplied evidence (the PR text asserts they were checked).nix flake check,just test, or any repository code, so evaluation and deployment claims in the PR text (flake check passing, native Ubuntu config validation, live overlay/SSH/DNS checks, service enabled, rollback timer cancelled) are taken as stated, not verified.~/Projects/router-nebulaproject, which is not part of this checkout; I could not confirm that it referencesnebula/certs/pangolin.crtandsecrets/nebula/pangolin.yamlwith the expected paths and key name..sops.yaml,nebula/revoked.json,justfiles/nebula.just,modules/networking/nebula.nix, README/AGENTS context) as checked-out evidence, and I did not verify the full history or CI results for the branch.Diff coverage
AGENTS.md: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchmodules/networking/nebula.nix: reviewed — included in a context-limited batchnebula/certs/pangolin.crt: reviewed — included in a context-limited batchsecrets/nebula/pangolin.yaml: reviewed — included in a context-limited batchReview metadata
Assessed the current-head review: the README inventory omission is valid and is now corrected to include the Pangolin Matrix client. Validation: focused comparison with the module inventory and git diff --check passed; this follow-up changes documentation only.
On the questions: the client identity is intentionally distinct from the Pangolin application/service names; those use their own configuration paths and fully qualified service endpoints. The client currently uses a native Ubuntu deployment maintained outside this flake, so its OS hostname does not participate in the NixOS hostname lookup. Any future NixOS migration will need an explicit inventory/hostname decision at that time; no such migration is part of this MR.
Posting this explanation before pushing the documentation fix. The push will start a fresh current-head review and 30-minute response window under the recorded process. No merge is being performed.
Automated code review
Reviewed commit:
144eba1b1ae2022ec3324e08e288fbe2664726beVerdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
The supplied changes register a new external Nebula identity
pangolin(the Matrix client formerly called ES2) at overlay IPv4 10.10.0.11 / IPv6 fd56:f458:569c::11. I checked the changed files against the checked-out code and found no evaluation-breaking or fleet-breaking defect: thehostMapandipv6HostMapadditions are mutually consistent, so the module assertionlib.all (name: hostMap ? ${name}) (builtins.attrNames cfg.ipv6HostMap)(modules/networking/nebula.nix) still holds; 10.10.0.11 and fd56:f458:569c::11 are unique — grep for10\.10\.0\.11and::11matches only the two new lines, and the router keeps 10.10.0.10/::10; no registered host overridesnixosConfig.nebula.ipv6HostMap, so the module default is the effective value on electra, lena, vega and lyra. Because no NixOS host is namedpangolin, the per-hostsops.secrets."nebula/${hostname}-key"andnebula/certs/${hostname}.crtlookups in the module are untouched. The new secret file follows the external-node convention exactly: its key pathnebula.pangolin-keymatches the path used byjustfiles/nebula.just(sops ... --extract '["nebula"]["'"$NAME"'-key"]'), and its three recipients (age1yubikey1qf8kmph… , age1yubikey1q0srxtg… , age1vlc2eans4…) are byte-identical to the*yubikey-nano5c,*yubikey-5-nfc,*provision-keygroup defined at .sops.yaml lines 12/14/16 and selected by the generic external-node rulepath_regex: secrets/nebula/[^/]+\.yaml$(.sops.yaml line 266), the same set used bysecrets/nebula/pangolin-vps.yaml.nebula/revoked.jsoncontains nopangolin/ES2 entry, sojust nebula-bundle/nebula-revokeguards are not affected. The README and AGENTS.md edits are prose only. The one substantive observation is an operator-facing naming ambiguity: the bare mesh keypangolincollides with an identifier already used throughout this repository for the unrelated Pangolin/Newt service and model provider.Blocking findings
None.
Important findings
None.
Suggestions
pangolinreuses an identifier that already denotes the Pangolin service elsewhere in the tree (modules/networking/nebula.nix:32; medium confidence)The added
pangolin = "10.10.0.11";key inhostMap(andpangolin = "fd56:f458:569c::11";inipv6HostMap) is consumed bynetworking.hosts, which emits both the bare name and<name>.meshon every NixOS member, and bycoreDnsStaticZones, which emits apangolin.meshA/AAAA record. The same bare identifier already denotes an unrelated subsystem in the checked-out code:modules/services/newt.nixdefaults its endpoint tohttps://pangolin.nimmog.uk,secrets/pangolin.yamlholdspangolin/mcp/{url,token},modules/common/default-config.nixdefines apangolinenable option,modules/profiles/pi-pangolin.nixregisters apangolinmodel provider, and README.md lines 173/263/292 usePangolinfor that service. The README note added in this change (README.md lines 159-160) disambiguatespangolinonly againstpangolin-vps, not against the service.Impact: No evaluation or deployment failure:
pangolinandpangolin-vpsare distinct attribute keys with distinct IPs, so /etc/hosts and the resolver zones remain well-formed. The risk is operator-facing only — after this change a barepangolin/pangolin.meshlookup on a NixOS member resolves to the Matrix client's overlay IP, while the same word in this repository's configuration, secrets and documentation means the reverse-proxy/API service, so operator notes and shell commands using the bare name are ambiguous.Suggested fix: If the bare name is intentional, extend the README/AGENTS.md note to state that the mesh key
pangolinis the Matrix client and never the Pangolin service; otherwise pick a client-identifying inventory key (e.g.matrixores2-matrix) and use it consistently inhostMap,ipv6HostMap,nebula/certs/<name>.crtandsecrets/nebula/<name>.yaml. No code change is required if the current name is deliberate.Tests and validation
Questions
just test/just test-remoterun, after this change? The new entries live in the module'sletbindings and theipv6HostMapoption default, and no registered host overrides that option, so the /etc/hosts lines and CoreDNS static zones change on electra, lena, vega and lyra; the supplied evidence only describes the client's own native host.pangolinintended to be reachable from the NixOS members? Nothing in the supplied material shows a consumer ofpangolin/pangolin.mesh, and neither map contains amatrixentry, so I could not tell whether the client's own configuration uses these names.nebula-cert printhere, so the certificate's networks, groups, expiry and CA signature are taken from the pull-request text rather than verified against 10.10.0.11/16 and fd56:f458:569c::11/64.keys/hermes-fleet-known-hosts(which pinspangolin-vpsbut has no entry for the new node) in scope for this milestone? It is not a changed file, so I did not treat the omission as a finding.Review limitations
nix flake check, the certificate's networks/groups/expiry/CA signature, and the private-key pairing are taken from the pull-request text rather than verified; I verified only the file contents and the recipient/key-path conventions by reading the checked-out files.pangolinis unverified here.router-nebulaproject, the live hosts, the client's native Nebula configuration, KiwiFS operational records, Forgejo issue #337 / milestone 39, and CI (including the attic-cache workflow) were not supplied and could not be inspected.nebula/revoked.json.Diff coverage
AGENTS.md: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchmodules/networking/nebula.nix: reviewed — included in a context-limited batchnebula/certs/pangolin.crt: reviewed — included in a context-limited batchsecrets/nebula/pangolin.yaml: reviewed — included in a context-limited batchReview metadata
Review 84 is Ready to merge and current-head CI passed. Its naming suggestion is useful: README now explicitly distinguishes the Matrix client's mesh names from the Pangolin service endpoint. Also clarified that the documented review-follow-up process operates within user-authorized publication and does not independently authorize pushes. Validation: focused documentation review and git diff --check passed.
The remaining questions do not require additional source changes: normal NixOS discovery deployment remains explicitly pending merge; the new mesh names are intentional fleet discovery entries; certificate identity, networks, signature and key pairing were already verified during enrollment as recorded in the MR validation. Hermes SSH trust inventory is a separate enrollment scope, not implicitly expanded by mesh membership.
Commenting before pushing these documentation clarifications. A fresh review window will follow; no merge is being performed.
Automated code review
Reviewed commit:
b3523aad9101773fc8e54efe9eb9b6bc410ec78dVerdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
The supplied change adds a new external Nebula node,
pangolin, to the mesh inventory and documents it. I verified the internal consistency of the checked-out code: inmodules/networking/nebula.nixthe newpangolin = "10.10.0.11"entry inhostMap(line 32) andpangolin = "fd56:f458:569c::11"in theipv6HostMapdefault (line 95) are added as a pair, so the module assertion at line 161 (lib.all (name: hostMap ? ${name}) (builtins.attrNames cfg.ipv6HostMap)) still holds; neither address collides with the router (routerIp/router.ipv6fromnebula/router.json) or with any other listed entry, and both fall inside the documented10.10.0.0/16andfd56:f458:569c::/64plans injustfiles/nebula.just.hosts/contains onlyelectra,lena,lyra,vega, so no NixOS host is namedpangolinand the module'ssops.secrets."nebula/${hostname}-key"/nebula/certs/${hostname}.crtlookups are unaffected; the newsecrets/nebula/pangolin.yamlandnebula/certs/pangolin.crtfollow the same external-node layout already used bypangolin-vps,router,phone,nova,mass-storage,media1andnimmog-de. The three age recipients insecrets/nebula/pangolin.yamlare exactly*yubikey-nano5c,*yubikey-5-nfcand*provision-keyfrom.sops.yaml, i.e. the admin-only rulepath_regex: secrets/nebula/[^/]+\.yaml$(line 266), which is the documented default for nodes with no NixOS host key, and the key namenebula.pangolin-keymatches theNAME-keyshape written byjust nebula-add-host. Noscripts/check-*.nix, test, or flake check inspectsnetworking.hosts,hostMapor the Nebula maps, so the added names cannot trip a deterministic gate; no test intests/references Nebula. The README inventory sentence (lines 147-148) now matches the two maps exactly, and the disambiguation text (lines 159-162) is consistent withmodules/services/newt.nix, whosenixosConfig.newt.endpointdefault remains the separate service URLhttps://pangolin.nimmog.uk. No trailing whitespace was introduced in the changed Nix or Markdown. I found no defect that the supplied evidence demonstrates.Blocking findings
None.
Important findings
None.
Suggestions
None.
Tests and validation
Questions
nebula/certs/pangolin.crtis opaque base64 in the supplied material, so I could not confirm from evidence that its signed payload carries namepangolinand the networks10.10.0.11/16andfd56:f458:569c::11/64. Theipv6HostMapoption description inmodules/networking/nebula.nixstates that IPv6 entries are for 'hosts whose deployed v2 certificates contain them' and must be added 'only with their certificate rollout', sojust nebula-listoutput fornebula/certs/pangolin.crtshould be confirmed to match exactly the two addresses added at lines 32 and 95.pangolincertificate issued with non-lighthouse groups?just nebula-add-hostdefaultsGROUPS="servers", andnebula-bundleinjustfiles/nebula.justderivesam_lighthouse/serve_dnssolely from a group literally namedlighthouse; confirming the issued group set would show the client is registered as an ordinary mesh node rather than inheriting a lighthouse role.nebula/revoked.jsoncontains onlychaosandcosmos, and there is noes2entry innebula/certs/orsecrets/nebula/in this checkout. If an ES2-named certificate was issued outside this repository, should its fingerprint be added tonebula/revoked.jsonso the old name's authority is blocklisted on every peer?Review limitations
nix flake check,just test, or any just recipe, so the claim that flake check passes is taken as supplied rather than verified. My reasoning about the assertion at line 161, the/etc/hostsand CoreDNS generation, and the absence of collisions is static reading of the checked-out source.secrets/nebula/pangolin-vps.yamland.sops.yaml, but could not verify the signed identity, networks, groups, key pairing, or CA signature.~/Projects/router-nebulaproject, the live Matrix-client host configuration, and any CI/Attic or Forgejo workflow output were not supplied, so the client's actual native activation and any live IPv4/IPv6, SSH, lighthouse or mesh-DNS evidence cannot be checked from this checkout.Diff coverage
AGENTS.md: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchmodules/networking/nebula.nix: reviewed — included in a context-limited batchnebula/certs/pangolin.crt: reviewed — included in a context-limited batchsecrets/nebula/pangolin.yaml: reviewed — included in a context-limited batchReview metadata
Current-head review 85 is Ready to merge with zero findings or suggestions, and both the CI test and AI-review workflow succeeded.
The certificate questions are resolved: re-read the committed public certificate with nebula-cert; its v2 identity and both networks match the inventory, and it has the ordinary servers group with no unsafe route authority. Enrollment inspection found no pre-existing Nebula deployment, and repository history contains no ES2 certificate/key. A hypothetical externally issued certificate is not evidence requiring a new revocation; existing targeted revocation policy remains unchanged.
No actionable feedback remains. Automated follow-up is stopping as ready to merge. The MR remains unmerged; normal shared discovery deployment follows merge.