Unverified Commit 4fcd6b86 authored by Doron Behar's avatar Doron Behar Committed by GitHub
Browse files

nixos/tzupdate: make it actually work (#343748)

parents 0896eb4c 8efaf0d2
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -30,16 +30,15 @@ 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";
      };
    };
  };

  meta.maintainers = [ ];
  meta.maintainers = with lib.maintainers; [ doronbehar ];
}
+8 −5
Original line number Diff line number Diff line
@@ -11,18 +11,21 @@ rustPlatform.buildRustPackage rec {
  src = fetchFromGitHub {
    owner = "cdown";
    repo = "tzupdate";
    rev = version;
    rev = "refs/tags/${version}";
    hash = "sha256-eod4yFzX7pATNQmG7jU+r9mnC9nprJ55ufMXpKjw/YI=";
  };

  cargoHash = "sha256-5+lp5xlwJxFDqzVxptJPX7z0iLoMkgdwHxvRVIXHF7Y=";

  meta = with lib; {
  meta = {
    description = "Set the system timezone based on IP geolocation";
    homepage = "https://github.com/cdown/tzupdate";
    license = licenses.mit;
    maintainers = with maintainers; [ camillemndn ];
    platforms = platforms.linux;
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [
      camillemndn
      doronbehar
    ];
    platforms = lib.platforms.linux;
    mainProgram = "tzupdate";
  };
}