about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2015-02-06 14:45:41 -0800
committerWilliam A. Kennington III <william@wkennington.com>2015-02-06 14:45:47 -0800
commit9792b12e5355a3f2b11e579fce27a2b97646c468 (patch)
tree9712039d42c5679158db5260bda4b40b4536e9e8 /nixos/modules
parent67f28ac1a997aef17aa2a13605a32bd9fee3a641 (diff)
downloadnixlib-9792b12e5355a3f2b11e579fce27a2b97646c468.tar
nixlib-9792b12e5355a3f2b11e579fce27a2b97646c468.tar.gz
nixlib-9792b12e5355a3f2b11e579fce27a2b97646c468.tar.bz2
nixlib-9792b12e5355a3f2b11e579fce27a2b97646c468.tar.lz
nixlib-9792b12e5355a3f2b11e579fce27a2b97646c468.tar.xz
nixlib-9792b12e5355a3f2b11e579fce27a2b97646c468.tar.zst
nixlib-9792b12e5355a3f2b11e579fce27a2b97646c468.zip
nixos/openntpd: Don't start until we have networking
This attempts to fix an issues where ntp is unable to resolve hostnames
because it came up before local nameservers or networking.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/networking/openntpd.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/openntpd.nix b/nixos/modules/services/networking/openntpd.nix
index ef5250888989..e53fc574fbea 100644
--- a/nixos/modules/services/networking/openntpd.nix
+++ b/nixos/modules/services/networking/openntpd.nix
@@ -64,6 +64,8 @@ in
     systemd.services.openntpd = {
       description = "OpenNTP Server";
       wantedBy = [ "multi-user.target" ];
+      wants = [ "network-online.target" ];
+      after = [ "dnsmasq.service" "bind.service" "network-online.target" ];
       serviceConfig.ExecStart = "${package}/sbin/ntpd -d -f ${cfgFile} ${cfg.extraOptions}";
     };
   };