Extract auto-update implementation into an in-repository package and thin module #60

Closed
opened 2026-07-16 13:52:04 +01:00 by nimmo · 1 comment
Owner

Context

The auto-update implementation has grown into a small operational subsystem with two commands, deterministic runtime dependencies, locking, detached activation, recovery state, notifications, and a dedicated regression suite. This first extraction remains inside nixos-config and establishes the package/module boundary before any external repository is considered.

Delivered

  • Created the in-repository nixos-auto-update package, including both public commands, shared logic, deterministic runtime dependencies, and regression coverage.
  • Reduced modules/services/nixos-auto-update.nix to policy, systemd, host-specific nixos-rebuild wiring, SOPS notifications, and configured command wrappers.
  • Preserved generated build targets, command names, hold semantics, paths, journal unit names, failure stamps, and notifications.
  • Updated documentation and Forgejo workflow coverage.
  • Made nix flake check, including the NixOS VM gate, mandatory for pull requests.

Validation evidence

  • Implemented through !62; manual CLI compatibility and mandatory PR Nix/VM validation were restored through !63.
  • ShellCheck, actionlint, updater regressions, and nix flake check passed locally. Forgejo PR run 330 passed with the mandatory Nix/VM gate.
  • Electra completed a genuine detached update to 370bb6c84a30f7ec5499eb6d9d11b26de64a879e, verified by its helper while retaining the igpu tier.
  • The immediate clean follow-up succeeded: Nothing changed in pull, system is current (HEAD=370bb6c84a30f7ec5499eb6d9d11b26de64a879e).
  • Electra, Vega, and Lyra evaluated with the extracted package. Reverting to the pre-extraction commit remains straightforward.
## Context The auto-update implementation has grown into a small operational subsystem with two commands, deterministic runtime dependencies, locking, detached activation, recovery state, notifications, and a dedicated regression suite. This first extraction remains inside `nixos-config` and establishes the package/module boundary before any external repository is considered. ## Delivered - [x] Created the in-repository `nixos-auto-update` package, including both public commands, shared logic, deterministic runtime dependencies, and regression coverage. - [x] Reduced `modules/services/nixos-auto-update.nix` to policy, systemd, host-specific `nixos-rebuild` wiring, SOPS notifications, and configured command wrappers. - [x] Preserved generated build targets, command names, hold semantics, paths, journal unit names, failure stamps, and notifications. - [x] Updated documentation and Forgejo workflow coverage. - [x] Made `nix flake check`, including the NixOS VM gate, mandatory for pull requests. ## Validation evidence - Implemented through [!62](https://git.nimmog.uk/nimmo/nixos-config/pulls/62); manual CLI compatibility and mandatory PR Nix/VM validation were restored through [!63](https://git.nimmog.uk/nimmo/nixos-config/pulls/63). - ShellCheck, actionlint, updater regressions, and `nix flake check` passed locally. Forgejo PR run 330 passed with the mandatory Nix/VM gate. - Electra completed a genuine detached update to `370bb6c84a30f7ec5499eb6d9d11b26de64a879e`, verified by its helper while retaining the `igpu` tier. - The immediate clean follow-up succeeded: `Nothing changed in pull, system is current (HEAD=370bb6c84a30f7ec5499eb6d9d11b26de64a879e)`. - Electra, Vega, and Lyra evaluated with the extracted package. Reverting to the pre-extraction commit remains straightforward.
Author
Owner

Follow-up created as #61. Externalisation is explicitly blocked until this in-repository extraction has passed its live genuine-update and no-op validation.

Follow-up created as #61. Externalisation is explicitly blocked until this in-repository extraction has passed its live genuine-update and no-op validation.
nimmo closed this issue 2026-07-17 14:51:02 +01:00
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config#60
No description provided.