Commit 8efaf0d2 authored by Doron Behar's avatar Doron Behar
Browse files

nixos/tzupdate: use timedatectl to actually set the timezone

parent 94892f8f
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -30,13 +30,12 @@ in {
      description = "tzupdate timezone update service";
      wants = [ "network-online.target" ];
      after = [ "network-online.target" ];
      script = ''
        timedatectl set-timezone $(${lib.getExe pkgs.tzupdate} --print-only)
      '';

      serviceConfig = {
        Type = "oneshot";
        # We could link directly into pkgs.tzdata, but at least timedatectl seems
        # to expect the symlink to point directly to a file in etc.
        # Setting the "debian timezone file" to point at /dev/null stops it doing anything.
        ExecStart = "${pkgs.tzupdate}/bin/tzupdate -z /etc/zoneinfo -d /dev/null";
      };
    };
  };