feat(nix): opt Electra into Nova remote builds #244
No reviewers
Labels
No labels
area:authentication
area:flake-utilities
area:performance
area:tbd
host:chaos
host:electra
host:fleet
host:lyra
host:nova
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: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:mem0
service:nix
service:sillytavern
service:slskd
service:synthseek
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config!244
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/issue-234-nova-builder-opt-in"
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?
Closes #234.
Scope:
x86_64-linux, three jobs, speed factor 1, and no special features.Validation:
nix flake checkandnix build .#checks.x86_64-linux.nova-remote-builder-configpassed.just testfrom itsbatteryspecialisation, followed by a 2-second no-opjust test; noswitchwas used.max-jobs = 0andbuilders-use-substitutes = true; a deliberately non-substituted derivation built onssh://nix-remote-builder@novaand returned to Electra.https://cache.nixos.org.max-jobs = 1recovered by building locally.Automated code review
Reviewed commit:
e77c38ffe81faac889ff1204001718a70e6d7ebaVerdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The PR introduces a reusable NixOS module for configuring Electra as a remote-only client for the 'Nova' builder. It enforces strict build isolation by setting local jobs to zero, pins Nova's SSH host key, and includes flake assertions to verify configuration invariants. The import order dependency on
nix-settings.nixhas been resolved by importing it directly within the new module.Blocking findings
None.
Important findings
The
publicHostKeyis hardcoded as a string literal:"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILtJEHXw4DrJywYvhG3tXqk6W3kq+MtjFFzbDlLXMH8N".Impact: If Nova's host key rotates, this module will cause build failures until the code is updated and redeployed. While pinned for security (preventing MITM), it reduces operational flexibility compared to dynamic fetching or external secret management.
Suggested fix: Consider sourcing the host key from a SOPS secret or a dedicated configuration file if key rotation frequency is expected to be high, otherwise document the manual update procedure clearly in
docs/nova-remote-builder.md.Suggestions
The documentation provides a specific
sudo nixos-rebuild test ... --option builders ''command for recovery.Impact: Operators might confuse this one-shot override with the declarative configuration. If not clearly distinguished, they might attempt to use it in scripts or CI pipelines where persistence is not desired.
Suggested fix: Ensure the documentation explicitly states that this command overrides the declarative
buildMachinesfor a single invocation only and does not modify the NixOS configuration.Tests and validation
Questions
Review limitations
nix flake checkmyself, relying on the provided diff and human confirmation.Diff coverage
docs/nova-remote-builder.md: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchhosts/electra/default.nix: reviewed — included in a context-limited batchmodules/common/base.nix: reviewed — included in a context-limited batchmodules/common/nova-remote-builder.nix: reviewed — included in a context-limited batchReview metadata
Review follow-up:
c9655bc: NixOS usesbuildMachines.publicHostKeyfor this, not ansshKnownHostsfield. Nova’s live Ed25519 host key was verified against Electra’s existingknown_hostsentry (fingerprintSHA256:igJd4f0dHQKGFXdBK4eNPxVhXdmZFFc0i8tNsa6vk9g) and is now pinned in the module. The focused flake assertion covers it.just testcompleted and all three specialisation closures built on Nova; the rendered/etc/nix/machinesentry includes the exact pinned key. No switch was used. Electra was healthy afterward and its temporary update hold was released.supportedFeatures = [ ]is intentional for this initial opt-in. Nova locally enablesbenchmark,big-parallel,kvm,nixos-test, anduid-range, but #234 deliberately advertises none until a future issue independently verifies that remote jobs may rely on each capability. Ordinaryx86_64-linuxbuilds are the only scheduling contract here.nix flake checkpassed after the change.Second review follow-up:
e77c38f.nova-remote-builder.nixnow importsnix-settings.nixdirectly, so itsbuilders-use-substitutes = truesetting has an explicit dependency on the shared substituters and trusted signing keys.common/base.nixno longer owns that indirect ordering.nixosConfig.novaRemoteBuilder.enabledefaults to false, only Electra sets it true, and the focused flake check asserts Lyra remains disabled with no build machines.nix flake checkandnix build .#checks.x86_64-linux.nova-remote-builder-config --no-linkpass after the change. The earlier live Electra canary also demonstrated both cache substitution and Nova remote builds.