Default the backend time zone from the host configuration #14

Open
opened 2026-11-10 19:47:06 +00:00 by martin · 0 comments
Owner

Summary

The module should propagate the host's time.timeZone to the backend as TZ, so operators do not have to configure the zone twice and do not hit the tzlocal warning on hosts that already set a system time zone.

Context

  • The backend resolves its zone through tzlocal, which reads TZ, /etc/timezone, and /etc/localtime; without one it warns and falls back to UTC.
  • The manual workaround is documented in #13: set services.kitchenowl.extra-settings.TZ.
  • services/default.nix already reads from config for nginx, postgresql, and systemd settings.

Scope

  • Set TZ from config.time.timeZone when it is not null, at a priority that lets extra-settings.TZ override it.
  • Update the README to describe the automatic behaviour and keep the manual override documented.

Acceptance criteria

  • Enabling the module on a host with time.timeZone set adds TZ to the backend environment.
  • An explicit extra-settings.TZ still wins.
  • Hosts with time.timeZone = null are unchanged.
  • README documents the automatic behaviour.
  • just test passes.

Dependencies

## Summary The module should propagate the host's `time.timeZone` to the backend as `TZ`, so operators do not have to configure the zone twice and do not hit the `tzlocal` warning on hosts that already set a system time zone. ## Context - The backend resolves its zone through `tzlocal`, which reads `TZ`, `/etc/timezone`, and `/etc/localtime`; without one it warns and falls back to UTC. - The manual workaround is documented in #13: set `services.kitchenowl.extra-settings.TZ`. - `services/default.nix` already reads from `config` for nginx, postgresql, and systemd settings. ## Scope - Set `TZ` from `config.time.timeZone` when it is not null, at a priority that lets `extra-settings.TZ` override it. - Update the README to describe the automatic behaviour and keep the manual override documented. ## Acceptance criteria - [ ] Enabling the module on a host with `time.timeZone` set adds `TZ` to the backend environment. - [ ] An explicit `extra-settings.TZ` still wins. - [ ] Hosts with `time.timeZone = null` are unchanged. - [ ] README documents the automatic behaviour. - [ ] `just test` passes. ## Dependencies - Follow-up to the documentation in https://code.martials.no/martin/kitchenowl-flake/pulls/13.
Sign in to join this conversation.
No milestone
No project
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
Personal/kitchenowl-flake#14
No description provided.