Skip to content

nixos/timesyncd: cleanup & make it bashless#449937

Merged
nikstur merged 2 commits intoNixOS:masterfrom
nikstur:cleanup-timesyncd
Oct 10, 2025
Merged

nixos/timesyncd: cleanup & make it bashless#449937
nikstur merged 2 commits intoNixOS:masterfrom
nikstur:cleanup-timesyncd

Conversation

@nikstur
Copy link
Contributor

@nikstur nikstur commented Oct 8, 2025

Split in two commits.

The first removes an unnecessary workaround:

This is unnecessary because systemd and systemd-timesyncd will never
actually revert to a time lower than the current system time. It will
only advance to the EPOCH if the system time is older.

This also makes systemd-timesyncd bashless as we remove the preStart
script for any NixOS version newer than 19.09.

The second removes an old migration for NixOS versions older than 19.09

Part of #428908

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

This workardoung is now unnecessary because systemd and
systemd-timesyncd will never actually revert to a time lower than the
current system time. It will only *advance* the system time to the EPOCH
if the system time is lower.

This also makes systemd-timesyncd bashless as we remove the preStart
script for any NixOS version newer than 19.09.
Also remove the test that only tested this migration and nothing else
about systemd-timesyncd.
@nikstur nikstur requested a review from a team October 8, 2025 14:07
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Oct 8, 2025
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 8, 2025
@Sigmanificient
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 449937
Commit: ccf0b1426fcd5263cf01983841a76785ba514a2f (subsequent changes)
Merge: 2a13196078963814dc20d755c7c743430bf9849c

Logs: https://github.com/Sigmanificient/nixpkgs-review-gha/actions/runs/18372283986


x86_64-linux

⏩ 2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test

aarch64-linux

⏩ 2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test

@nikstur nikstur added this pull request to the merge queue Oct 10, 2025
Merged via the queue into NixOS:master with commit 3d359bb Oct 10, 2025
34 of 36 checks passed
@nikstur nikstur deleted the cleanup-timesyncd branch October 10, 2025 08:04
@trofi
Copy link
Contributor

trofi commented Oct 11, 2025

Caused minor eval failure. Proposed the possible fix as:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants