Compare commits

...

2 commits

Author SHA1 Message Date
8899f4ef48 Merge branch 'fix/sintra-timezone' into perf/gpu-acceleration 2026-09-25 00:23:33 +02:00
e98fd67653 feat(deploy): set the timezone per machine, sintra to Europe/Paris
Every machine inherited America/Guatemala from the shared base config,
which is right for douro and tejo and wrong for sintra in France. It read
six hours behind, so its journal timestamps had to be converted by hand
against anything on the relay.

The clock is not cosmetic here. system.autoUpgrade's `dates = "04:00"` is
local time, so the zone decides when the nightly rebuild restarts the app
and the Fujitsu dispenser runs its audible init routine. On sintra that
was firing at 10:17 in the morning, in the room, rather than at 4am.

timeZoneForModel mirrors fiatCodeForModel and lists only the exceptions.
The base config keeps America/Guatemala as the fleet default, now under
mkDefault so a per-model value wins without mkForce. Verified by eval:
sintra resolves to Europe/Paris, douro, tejo and batm3 are unchanged.

batm3 is deliberately left alone. It is USD and in the field, and I do
not know where.
2026-09-24 12:26:55 +02:00
2 changed files with 19 additions and 2 deletions

View file

@ -282,8 +282,9 @@ in
}; };
}; };
# Timezone - set to your location # Fleet default. Override per machine with timeZoneForModel in flake.nix —
time.timeZone = "America/Guatemala"; # mkDefault is what lets that override win without mkForce.
time.timeZone = lib.mkDefault "America/Guatemala";
# Locale # Locale
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";

View file

@ -116,6 +116,18 @@
batm3 = "USD"; batm3 = "USD";
}; };
# Timezone per machine model. Wall-clock time on an ATM is not cosmetic:
# it is what the journal is read in when someone is standing at the
# machine, and system.autoUpgrade's `dates = "04:00"` is local, so this
# decides when the nightly rebuild restarts the app and the dispenser
# runs its audible init routine. A machine on the wrong zone does that
# in the middle of its own business hours.
#
# Unlisted models fall back to the fleet default in configuration.nix.
timeZoneForModel = {
sintra = "Europe/Paris";
};
lib = nixpkgs.lib; lib = nixpkgs.lib;
# Helper to create a live USB NixOS config for a specific machine model # Helper to create a live USB NixOS config for a specific machine model
@ -174,6 +186,10 @@
appDir = "${atm-app}"; appDir = "${atm-app}";
}; };
# Per-machine wall clock; see timeZoneForModel above.
time.timeZone = lib.mkIf (timeZoneForModel ? ${machineModel})
timeZoneForModel.${machineModel};
# Operator TUI and CLI tools # Operator TUI and CLI tools
environment.systemPackages = [ environment.systemPackages = [
atm-tui.packages.${system}.default atm-tui.packages.${system}.default