nixpkgs/nixos/tests/chrony-ptp.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
560 B
Nix
Raw Normal View History

2023-01-15 14:06:58 +01:00
import ./make-test-python.nix ({ lib, ... }:
{
name = "chrony-ptp";
meta = {
maintainers = with lib.maintainers; [ gkleen ];
};
2023-01-15 14:06:58 +01:00
nodes = {
qemuGuest = { lib, ... }: {
boot.kernelModules = [ "ptp_kvm" ];
services.chrony = {
enable = true;
extraConfig = ''
refclock PHC /dev/ptp_kvm poll 2 dpoll -2 offset 0 stratum 3
'';
};
};
};
testScript = ''
start_all()
qemuGuest.wait_for_unit('multi-user.target')
qemuGuest.succeed('systemctl is-active chronyd.service')
'';
})