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 {
environment.etc."syndicate/services/ssh-keygen.pr".text = let
serverList =
lib.lists.concatMap (s: " -p ${s}") config.networking.timeServers;
in ''
<require-service <daemon ntpd>>
<depends-on <daemon ntpd> <default-route ipv4>>
<daemon ntpd "${pkgs.busybox}/bin/busybox ntpd -d -n ${serverList}">
'';
environment.etc."syndicate/services/ntpd.pr".text =
let serverList = map (s: " -p ${s}") config.networking.timeServers;
in ''
<require-service <daemon ntpd>>
<depends-on <daemon ntpd> <default-route ipv4>>
<daemon ntpd "${pkgs.busybox}/bin/busybox ntpd -d -n ${
toString serverList
}">
'';
};
}