synit: fixup ntp service

This commit is contained in:
Emery Hemingway 2023-07-10 15:11:00 +01:00
parent 131ca1bec5
commit 2b60a063df
1 changed files with 9 additions and 8 deletions

View File

@ -2,13 +2,14 @@
{ {
config = lib.mkIf config.services.ntp.enable { config = lib.mkIf config.services.ntp.enable {
environment.etc."syndicate/services/ssh-keygen.pr".text = let environment.etc."syndicate/services/ntpd.pr".text =
serverList = let serverList = map (s: " -p ${s}") config.networking.timeServers;
lib.lists.concatMap (s: " -p ${s}") config.networking.timeServers;
in '' in ''
<require-service <daemon ntpd>> <require-service <daemon ntpd>>
<depends-on <daemon ntpd> <default-route ipv4>> <depends-on <daemon ntpd> <default-route ipv4>>
<daemon ntpd "${pkgs.busybox}/bin/busybox ntpd -d -n ${serverList}"> <daemon ntpd "${pkgs.busybox}/bin/busybox ntpd -d -n ${
toString serverList
}">
''; '';
}; };
} }