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 --- .../changes/archive/2026-09-24-add-automatic-timezone/tasks.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 openspec/changes/archive/2026-09-24-add-automatic-timezone/tasks.md (limited to 'openspec/changes/archive/2026-09-24-add-automatic-timezone/tasks.md') diff --git a/openspec/changes/archive/2026-09-24-add-automatic-timezone/tasks.md b/openspec/changes/archive/2026-09-24-add-automatic-timezone/tasks.md new file mode 100644 index 0000000..e139bbd --- /dev/null +++ b/openspec/changes/archive/2026-09-24-add-automatic-timezone/tasks.md @@ -0,0 +1,10 @@ +## 1. Enable automatic timezone detection + +- [x] 1.1 Add `services.automatic-timezoned.enable = true;` to `modules/nixos/common.nix`, alongside the other unconditional host-level services +- [x] 1.2 Verify `nix eval '.#nixosConfigurations.test-vm.config.services.automatic-timezoned.enable'` (or the appropriate real host output) evaluates to `true`, and that `.config.services.geoclue2.enable` and `.config.time.timeZone` evaluate to `true` and `null` respectively (confirming `automatic-timezoned` took over from the `Etc/UTC` default as expected) — this repo has no host tracked in git today (`hosts/test-vm` is a local-only scratch VM excluded via `.git/info/exclude`, so it's invisible to the flake's git-tree evaluation and `nixosConfigurations` is currently empty); verified instead via a synthetic `nixpkgs.lib.nixosSystem` built directly from `modules/nixos/common.nix`, confirming `services.automatic-timezoned.enable = true`, `services.geoclue2.enable = true`, and `time.timeZone = null` + +## 2. Verification + +- [x] 2.1 Run `nix flake check` and confirm it passes +- [x] 2.2 Run `nix build '.#nixosConfigurations.test-vm.config.system.build.toplevel'` (or the appropriate real host output) and confirm it succeeds — same test-vm caveat as 1.2; built the synthetic `nixosSystem`'s `config.system.build.toplevel` instead, which succeeded natively (this machine is aarch64-linux) and produced a closure including the `automatic-timezoned`, `automatic-timezoned-geoclue-agent`, `geoclue`, and `systemd-timedated` units +- [x] 2.3 Run `nix fmt` and confirm `modules/nixos/common.nix` is formatted with no diff -- cgit v1.3