Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ntp: make timesyncd the new default #21160

Merged
merged 1 commit into from
Dec 16, 2016
Merged

ntp: make timesyncd the new default #21160

merged 1 commit into from
Dec 16, 2016

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Dec 14, 2016

Motivation for this change
  • most nixos user only require time synchronisation,
    while ntpd implements a battery-included ntp server (1,215 LOCs of C-Code vs 64,302)
  • timesyncd support ntp server per interface (if configured through dhcp for instance, fix Configure NTP server via DHCP #7542 if networkd is used)
  • timesyncd is already included in the systemd package, switching to it would
    save a little disk space (1,5M)
  • ntpd has a history of weird hang ups: ntpd.service does not shut down cleanly #21136

What do you think? I would appreciate, if you would thumb up/down on this pull request.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@Mic92, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @aszlig and @offlinehacker to be potential reviewers.

@Mic92 Mic92 changed the title ntp: make timesyncd the new default [RFC] ntp: make timesyncd the new default Dec 14, 2016
"2.nixos.pool.ntp.org"
"3.nixos.pool.ntp.org"
];
default = config.services.timesyncd.servers;
Copy link
Member

Choose a reason for hiding this comment

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

Might be good to abstract over which service implements the time service by having an option like networking.timeServers.

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

- most nixos user only require time synchronisation,
  while ntpd implements a battery-included ntp server (1,215 LOCs of C-Code vs 64,302)
- timesyncd support ntp server per interface (if configured through dhcp for instance)
- timesyncd is already included in the systemd package, switching to it would
  save a little disk space (1,5M)
@jgeerds
Copy link
Member

jgeerds commented Dec 16, 2016

is this ready to be merged?

@Mic92 Mic92 changed the title [RFC] ntp: make timesyncd the new default ntp: make timesyncd the new default Dec 16, 2016
@Mic92 Mic92 merged commit 1590461 into NixOS:master Dec 16, 2016
@Mic92 Mic92 deleted the timesyncd branch December 16, 2016 23:00
@Ericson2314
Copy link
Member

Is the point of mkForce to make these clients mutually exclusive? Don't we need more of them then?

@Mic92
Copy link
Member Author

Mic92 commented Jan 3, 2017

@Ericson2314 timesyncd is enabled by default, that's why we disable it. If somebody explicitly configure multiple time server/clients, we should not block this at the moment as we cannot distinguish if this was indented.

@fpletz
Copy link
Member

fpletz commented Jan 4, 2017

Should we maybe add an assertion so that you cannot enable all ntp daemons simultaneously? I had both timesyncd and chrony running on a machine because I just disabled the ntp service before.

@Ericson2314
Copy link
Member

There is a new nix module system thing (open enums) for just this sort of thing. Would link but on phone.

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

Successfully merging this pull request may close these issues.

Configure NTP server via DHCP
7 participants