nixos/tzupdate: report timezone being set in journal (#374485)

This commit is contained in:
Doron Behar
2025-02-08 22:57:45 +02:00
committed by GitHub
+5 -1
View File
@@ -28,7 +28,11 @@ in {
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
script = ''
timedatectl set-timezone "$(${lib.getExe pkgs.tzupdate} --print-only)"
timezone="$(${lib.getExe pkgs.tzupdate} --print-only)"
if [[ -n "$timezone" ]]; then
echo "Setting timezone to '$timezone'"
timedatectl set-timezone "$timezone"
fi
'';
serviceConfig = {