Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@stepbrobd
Copy link
Contributor

following the NixOS module networking.timeServers knob

with this, we can make the macOS default timed to be mutually exclusive with other ntp clients like #1523

system.activationScripts.networking.text = ''
echo "configuring timed..." >&2

systemsetup -setUsingNetworkTime 'off' &> /dev/null
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turned off deliberately at the beginning to ensure timed restarts


options.services.timed = {
enable = lib.mkOption {
default = true;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nixos equivalent of timed is timesyncd, and they have a guard on whether to enable the ntp client by default: https://github.com/NixOS/nixpkgs/blob/527be1432109cfaf305987865bc17cc908e8e77a/nixos/modules/system/boot/timesyncd.nix#L14

do we need such a guard in nix-darwin or we just set it to true like this?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep it enabled by default, since that's the default behavior on MacOS out of the box.

modules/services/timed.nix Outdated Show resolved Hide resolved
also following the NixOS module pattern
adding the `networking.timeServers` option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.