syndicate-flake/nixos/modules/synit/services/ntpd.nix

15 lines
432 B
Nix

{ config, lib, pkgs, ... }:
{
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}">
'';
};
}