nixos: fix #48917 by setting SYSTEMD_TIMEDATED_NTP_SERVICES
Setting this variable in the environment of systemd-timedated allows 'timedatectl' to tell if an NTP service is running. Closes #48917. Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
@@ -93,6 +93,8 @@ in
|
|||||||
|
|
||||||
services.timesyncd.enable = mkForce false;
|
services.timesyncd.enable = mkForce false;
|
||||||
|
|
||||||
|
systemd.services.systemd-timedated.environment = { SYSTEMD_TIMEDATED_NTP_SERVICES = "chronyd.service"; };
|
||||||
|
|
||||||
systemd.services.chronyd =
|
systemd.services.chronyd =
|
||||||
{ description = "chrony NTP daemon";
|
{ description = "chrony NTP daemon";
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ in
|
|||||||
environment.systemPackages = [ pkgs.ntp ];
|
environment.systemPackages = [ pkgs.ntp ];
|
||||||
services.timesyncd.enable = mkForce false;
|
services.timesyncd.enable = mkForce false;
|
||||||
|
|
||||||
|
systemd.services.systemd-timedated.environment = { SYSTEMD_TIMEDATED_NTP_SERVICES = "ntpd.service"; };
|
||||||
|
|
||||||
users.users = singleton
|
users.users = singleton
|
||||||
{ name = ntpUser;
|
{ name = ntpUser;
|
||||||
uid = config.ids.uids.ntp;
|
uid = config.ids.uids.ntp;
|
||||||
|
|||||||
Reference in New Issue
Block a user