1{ lib, ... }:
2{
3 name = "ntpd";
4
5 meta = {
6 maintainers = with lib.maintainers; [ pyrox0 ];
7 };
8
9 nodes.machine = {
10 services.ntp = {
11 enable = true;
12 };
13 };
14
15 testScript = ''
16 start_all()
17
18 machine.wait_for_unit('ntpd.service')
19 machine.wait_for_console_text('Listen normally on 10 eth*')
20 machine.succeed('systemctl is-active ntpd.service')
21 machine.succeed('ntpq -p')
22 # ntp user must be able to create drift files
23 machine.succeed('su -s /bin/sh -c "touch /var/lib/ntp/ntp.drift" ntp')
24 '';
25}