This commit is contained in:
KaitoTLex 2025-01-05 15:37:29 +08:00
parent b5c9b5ca09
commit 2ee929cbd9
3 changed files with 38 additions and 22 deletions

View file

@ -114,9 +114,25 @@
};
# Set your time zone.
time.timeZone = "Asia/Taipei"; # lib.mkDefault
#time.timeZone = "Americas/"; # Asia/Taipei lib.mkDefault
#services.automatic-timezoned.enable = true;
time.timeZone = lib.mkForce null;
services.timesyncd.enable = true;
systemd.services = {
# Ensure network uplink on boot
NetworkManager-wait-online.enable = true;
# Automatic time zone switching
updateTimezone = {
description = "Automatically update timezone using `timedatectl` and `tzupdate`";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
requires = [ "network-online.target" ];
script = ''
timedatectl set-timezone $("${pkgs.tzupdate}/bin/tzupdate" -p)
'';
};
};
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";