diff --git a/deploy/nixos/configuration.nix b/deploy/nixos/configuration.nix index eeabe5a..239cf53 100644 --- a/deploy/nixos/configuration.nix +++ b/deploy/nixos/configuration.nix @@ -282,8 +282,9 @@ in }; }; - # Timezone - set to your location - time.timeZone = "America/Guatemala"; + # Fleet default. Override per machine with timeZoneForModel in flake.nix — + # mkDefault is what lets that override win without mkForce. + time.timeZone = lib.mkDefault "America/Guatemala"; # Locale i18n.defaultLocale = "en_US.UTF-8"; diff --git a/flake.nix b/flake.nix index 9fb2304..15543ee 100644 --- a/flake.nix +++ b/flake.nix @@ -116,6 +116,18 @@ 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; # Helper to create a live USB NixOS config for a specific machine model @@ -174,6 +186,10 @@ appDir = "${atm-app}"; }; + # Per-machine wall clock; see timeZoneForModel above. + time.timeZone = lib.mkIf (timeZoneForModel ? ${machineModel}) + timeZoneForModel.${machineModel}; + # Operator TUI and CLI tools environment.systemPackages = [ atm-tui.packages.${system}.default