refactor(auto-update): split updater into standalone flake #156
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!156
Loading…
Reference in a new issue
No description provided.
Delete branch "tidy-auto-update-split-repo"
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?
Summary
nimmo/nixos-auto-updateflake for the updater package, module, and VM state-machine checkValidation
nix flake check --accept-flake-configbash -n scripts/attic-cache-build.shjust test(user-run)Remaining live evidence
After merge and deployment to a clean
maincheckout, run one genuine Vega auto-update followed immediately by a no-op follow-up.Refs #61
Automated code review
Reviewed commit:
569d02ef9fc31db63c77194f0c249cd602a7057dVerdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
Refactors the NixOS auto-update implementation by removing local scripts, packages, and modules, replacing them with an external
nimmo/nixos-auto-updateflake input. Updates CI workflows, host configurations, and the common base module to consume the new module and package. Introduces direct configuration of the ntfy SOPS file in the base module and changes script sourcing to rely on the external package's output path.Blocking findings
Impact: If the external
nimmo/nixos-auto-updateflake module does not define theservices.nixos-auto-update.notifications.ntfy.sopsFileoption, all hosts will fail NixOS evaluation immediately upon deployment.Suggested fix: Verify that the pinned external flake exposes this exact option. If it uses a different option name or manages secrets internally, adjust the assignment in
modules/common/base.nixaccordingly.Important findings
+. "$auto_update_package/share/nixos-auto-update/nixos-update-common.sh"
Impact: The Attic cache workflow will fail if the external flake's
nixos-auto-updatepackage does not installnixos-update-common.shto the exact path/share/nixos-auto-update/nixos-update-common.sh. This breaks the automated lock-update pipeline.Suggested fix: Confirm the external flake's
default.nixorshell.nixinstalls the shared script to this location. If it uses a different output or path, update the sourcing command inattic-cache-build.sh.Suggestions
Deleted file. Removed from
.forgejo/workflows/attic-cache.ymlandjustfiles/maintenance.just.Impact: The repository no longer runs the local auto-update regression tests in CI or via
just test-auto-update. If these tests were not fully migrated to the external flake's CI, validation coverage for policy enforcement and isolation logic is reduced.Suggested fix: Ensure the external flake's CI pipeline executes equivalent regression tests. If so, document this dependency in the PR description or README.
Tests and validation
Questions
nimmo/nixos-auto-updateflake module defineservices.nixos-auto-update.notifications.ntfy.sopsFile, or does it expect secrets to be managed differently (e.g., via a dedicatedsopsFileoption at the top level)?Review limitations
nimmo/nixos-auto-updateflake, so I cannot verify if the expected NixOS options or package output paths are actually defined there.Diff coverage
.forgejo/workflows/attic-cache.yml: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchflake.lock: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchhosts/chaos/default.nix: reviewed — included in a context-limited batchhosts/cosmos/default.nix: reviewed — included in a context-limited batchhosts/lyra/default.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchjustfiles/maintenance.just: reviewed — included in a context-limited batchmodules/common/base.nix: reviewed — included in a context-limited batchmodules/profiles/gui.nix: reviewed — included in a context-limited batchmodules/services/nixos-auto-update.nix: reviewed — included in a context-limited batchpackages/nixos-auto-update/default.nix: reviewed — included in a context-limited batchpotential/nova/default.nix: reviewed — included in a context-limited batchscripts/attic-cache-build.sh: reviewed — included in a context-limited batchscripts/nixos-auto-update-control.sh: reviewed — included in a context-limited batchscripts/nixos-auto-update.sh: reviewed — included in a context-limited batchscripts/nixos-update-common.sh: reviewed — included in a context-limited batchsecrets/README.md: reviewed — included in a context-limited batchtests/auto-update-regressions.sh: reviewed — included in a context-limited batchtests/nixos-auto-update-vm.nix: reviewed — included in a context-limited batchReview metadata
Automated-review follow-up
The two important findings are verified against the pinned external flake revision rather than assumed from the diff:
nix flake check --accept-flake-configevaluated every host and ran the re-exported external updater VM state-machine test. That evaluation would fail ifservices.nixos-auto-update.notifications.ntfy.sopsFilewere undefined.nix eval --raw .#nixosConfigurations.vega.config.services.nixos-auto-update.notifications.ntfy.sopsFileresolves to the SOPS secret file in the store.nix build --no-link --print-out-paths .#nixos-auto-updateexposes the required library atshare/nixos-auto-update/nixos-update-common.sh; the new producer source path was checked withtest -r.The external flake’s own CI and re-exported state-machine check replace the deleted in-tree test fixture. The remaining live evidence is still documented in #61: one genuine post-merge Vega update and an immediate no-op follow-up.