summary refs log tree commit diff
path: root/nixos/modules/services/networking/chrony.nix
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2018-10-23 15:49:42 -0500
committerAustin Seipp <aseipp@pobox.com>2018-11-02 09:10:15 -0500
commit93aa285376daea647df6d95c50622230d118fd01 (patch)
treebe1bd84215e7d831195f681f7730aae25d92cedf /nixos/modules/services/networking/chrony.nix
parente23ebd02ab2359dbd2d9a86a8822424ce330100d (diff)
downloadnixlib-93aa285376daea647df6d95c50622230d118fd01.tar
nixlib-93aa285376daea647df6d95c50622230d118fd01.tar.gz
nixlib-93aa285376daea647df6d95c50622230d118fd01.tar.bz2
nixlib-93aa285376daea647df6d95c50622230d118fd01.tar.lz
nixlib-93aa285376daea647df6d95c50622230d118fd01.tar.xz
nixlib-93aa285376daea647df6d95c50622230d118fd01.tar.zst
nixlib-93aa285376daea647df6d95c50622230d118fd01.zip
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>
Diffstat (limited to 'nixos/modules/services/networking/chrony.nix')
-rw-r--r--nixos/modules/services/networking/chrony.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/chrony.nix b/nixos/modules/services/networking/chrony.nix
index a363b545d649..9b8005e706ae 100644
--- a/nixos/modules/services/networking/chrony.nix
+++ b/nixos/modules/services/networking/chrony.nix
@@ -93,6 +93,8 @@ in
 
     services.timesyncd.enable = mkForce false;
 
+    systemd.services.systemd-timedated.environment = { SYSTEMD_TIMEDATED_NTP_SERVICES = "chronyd.service"; };
+
     systemd.services.chronyd =
       { description = "chrony NTP daemon";