-
-
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
Configure NTP server via DHCP #7542
Comments
I don't know how it works, but it seems in isolation like the right way forward is to un-hardcode the ntp config and make a separate (configurable) module for it. |
Make sure this works for openntpd and ntpd. systemd-timesyncd should get it's information from systemd-networkd so it shouldn't be an issue. |
(triage) anyone? Otherwise I suggest we close. |
I don't think closing is appropriate. This seems to be a valid use case. |
I propose in this pull request to use timesyncd by default: #21160 |
It is generally possible to receive NTP servers through DHCP (RFC 2132). Other distros like Debian already support such a automatic NTP configuration. I think it would be great if NixOS does it well.
On Debian based systems there is a
request
option inside the/etc/dhcp/dhclient.conf
file which configures all attributes likentp-servers
. A simpledhclient eth0
restarts ntp with the new configuration (which is stored under/var/lib/ntp/ntp.conf.dhcp
)I've no idea how to implement this feature in NixOS because NTP's config file is hard coded in the systemd service. Any ideas?
The text was updated successfully, but these errors were encountered: