From adbde0eade71ce22c69f14e31970afc374e5e21f Mon Sep 17 00:00:00 2001 From: Padreug Date: Wed, 13 May 2026 12:19:51 +0200 Subject: [PATCH] chore(deploy): pin auto-upgrade to ?ref=dev on this branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The system.autoUpgrade flake URL had no explicit ref, so the auto-pull at 04:00 resolves to the repo's default branch (main). That's correct for production ATMs flashed from main, but it would silently regress a Sintra flashed from dev back to main code overnight. Pin to ?ref=dev on the dev branch so any ATM deployed from dev stays on dev. The main branch's flake.nix stays unchanged — production ATMs keep pulling main HEAD as before. First commit on the new dev branch. Tagged pre-bitspire-cutover on main beforehand as a rollback target. Co-Authored-By: Claude Opus 4.7 (1M context) --- flake.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 143667f..371185f 100644 --- a/flake.nix +++ b/flake.nix @@ -168,11 +168,18 @@ ]; }; - # Auto-upgrade: pulls latest flake and runs nixos-rebuild switch - # To update manually: sudo nixos-rebuild switch --flake git+ssh://forgejo@git.atitlan.io/aiolabs/lamassu-next.git#-installed + # Auto-upgrade: pulls latest flake and runs nixos-rebuild switch. + # NOTE: this branch (dev) pins the upgrade source to ?ref=dev so + # any ATM flashed from `dev` stays on `dev`. Without the explicit + # ref, nix would resolve to the repo's default branch (main), + # which would silently regress a dev-deployed Sintra back to the + # lamassu-next production code at 04:00. The `main` branch's + # flake.nix continues to omit ?ref= so production ATMs (batm3, + # douro) keep pulling main HEAD as before. + # To update manually: sudo nixos-rebuild switch --flake git+ssh://forgejo@git.atitlan.io/aiolabs/lamassu-next.git?ref=dev#-installed system.autoUpgrade = { enable = true; - flake = "git+ssh://forgejo@git.atitlan.io/aiolabs/lamassu-next.git#${machineModel}-installed"; + flake = "git+ssh://forgejo@git.atitlan.io/aiolabs/lamassu-next.git?ref=dev#${machineModel}-installed"; flags = [ "--refresh" ]; dates = "04:00"; # daily at 4am allowReboot = false;