aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <tom@vanderlee.com>2026-09-24 15:28:24 +0000
committerGravatar Tom van der Lee <tom@vanderlee.com>2026-09-24 15:28:24 +0000
commitb0c5452e3bb1e3bdbb27181e331fc959fa43f4fc (patch)
tree985f8f3f9ff08519a30dd839e2f0853db1cfdb82 /modules
parent8c6d9629a0b3b723ce2785d26a36c26b8c8d1ba9 (diff)
downloaddesktop-flake-b0c5452e3bb1e3bdbb27181e331fc959fa43f4fc.tar.gz
desktop-flake-b0c5452e3bb1e3bdbb27181e331fc959fa43f4fc.tar.bz2
desktop-flake-b0c5452e3bb1e3bdbb27181e331fc959fa43f4fc.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/nixos/common.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/nixos/common.nix b/modules/nixos/common.nix
index 9ee164b..919e2f0 100644
--- a/modules/nixos/common.nix
+++ b/modules/nixos/common.nix
@@ -12,10 +12,19 @@
12 }; 12 };
13 13
14 # Per-host configuration.nix can override either of these without 14 # Per-host configuration.nix can override either of these without
15 # conflicting, since they're set with mkDefault here. 15 # conflicting, since they're set with mkDefault here. automatic-timezoned
16 # (below) overrides time.timeZone to null at normal priority once enabled;
17 # Etc/UTC only remains as the boot-time value until it detects and applies
18 # the real one.
16 time.timeZone = lib.mkDefault "Etc/UTC"; 19 time.timeZone = lib.mkDefault "Etc/UTC";
17 i18n.defaultLocale = lib.mkDefault "en_US.UTF-8"; 20 i18n.defaultLocale = lib.mkDefault "en_US.UTF-8";
18 21
22 # Keeps the system timezone in sync with actual location with no manual
23 # timedatectl step and no interactive auth prompt (unlike GNOME's own
24 # "Automatic Time Zone" toggle, which nixpkgs' GNOME module doesn't wire up
25 # to a passwordless polkit rule the way it does for KDE Plasma).
26 services.automatic-timezoned.enable = true;
27
19 users.users.tom = { 28 users.users.tom = {
20 isNormalUser = true; 29 isNormalUser = true;
21 extraGroups = [ 30 extraGroups = [