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

Configure NTP server via DHCP #7542

Closed
jgeerds opened this issue Apr 24, 2015 · 5 comments · Fixed by #21160
Closed

Configure NTP server via DHCP #7542

jgeerds opened this issue Apr 24, 2015 · 5 comments · Fixed by #21160

Comments

@jgeerds
Copy link
Member

jgeerds commented Apr 24, 2015

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 like ntp-servers. A simple dhclient 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?

@copumpkin
Copy link
Member

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.

@wkennington
Copy link
Contributor

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.

@Profpatsch
Copy link
Member

(triage) anyone? Otherwise I suggest we close.

@kevincox
Copy link
Contributor

I don't think closing is appropriate. This seems to be a valid use case.

@Mic92
Copy link
Member

Mic92 commented Dec 14, 2016

I propose in this pull request to use timesyncd by default: #21160
this means that networkd is missing to make it complete.

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

Successfully merging a pull request may close this issue.

6 participants