chore(deploy): pin auto-upgrade to ?ref=dev on this branch

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) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-05-13 12:19:51 +02:00
commit adbde0eade

View file

@ -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#<model>-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#<model>-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;