-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Conversation
@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. |
"2.nixos.pool.ntp.org" | ||
"3.nixos.pool.ntp.org" | ||
]; | ||
default = config.services.timesyncd.servers; |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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)
is this ready to be merged? |
Is the point of |
@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. |
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. |
There is a new nix module system thing (open enums) for just this sort of thing. Would link but on phone. |
Motivation for this change
while ntpd implements a battery-included ntp server (1,215 LOCs of C-Code vs 64,302)
save a little disk space (1,5M)
What do you think? I would appreciate, if you would thumb up/down on this pull request.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)