From b0c5452e3bb1e3bdbb27181e331fc959fa43f4fc Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Thu, 24 Sep 2026 15:28:24 +0000 Subject: Detect NixOS host timezone automatically instead of defaulting to UTC Enables services.automatic-timezoned so every host's clock/calendar reflects its actual location with no manual timedatectl step or auth prompt, since GNOME's own automatic-timezone toggle isn't wired to a passwordless polkit rule on NixOS the way KDE's is. Co-Authored-By: Claude Sonnet 5 --- .../specs/automatic-timezone/spec.md | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 openspec/changes/archive/2026-09-24-add-automatic-timezone/specs/automatic-timezone/spec.md (limited to 'openspec/changes/archive/2026-09-24-add-automatic-timezone/specs/automatic-timezone') diff --git a/openspec/changes/archive/2026-09-24-add-automatic-timezone/specs/automatic-timezone/spec.md b/openspec/changes/archive/2026-09-24-add-automatic-timezone/specs/automatic-timezone/spec.md new file mode 100644 index 0000000..c9c50bf --- /dev/null +++ b/openspec/changes/archive/2026-09-24-add-automatic-timezone/specs/automatic-timezone/spec.md @@ -0,0 +1,23 @@ +## Purpose + +Keeps every NixOS host's system timezone in sync with its actual physical location automatically, so the system clock, GNOME's clock/calendar, and log timestamps reflect local time without any manual `timedatectl` step. + +## ADDED Requirements + +### Requirement: NixOS hosts detect and apply their timezone automatically +Every NixOS host built from this flake's shared system module SHALL determine its current timezone based on location and apply it to the system, without requiring the user to run a manual command or interactively authenticate the change. + +#### Scenario: Timezone is applied after boot with network access +- **WHEN** a NixOS host built from this flake's shared system module boots with network connectivity available +- **THEN** the system's active timezone is set to the timezone matching the host's current location, without any interactive prompt + +#### Scenario: No per-host opt-in required +- **WHEN** a NixOS host is built from this flake's shared system module and its own `hosts//configuration.nix` does not configure timezone detection itself +- **THEN** automatic timezone detection is still active, exactly as if it had been configured directly + +### Requirement: A host can still pin an explicit fixed timezone +A NixOS host built from this flake SHALL be able to override automatic detection with a fixed, explicitly configured timezone when that host's own configuration requires one. + +#### Scenario: Host-level override takes effect +- **WHEN** a host's own `hosts//configuration.nix` sets an explicit timezone at a priority higher than the shared default +- **THEN** that host uses the explicitly configured timezone instead of an automatically detected one -- cgit v1.3