0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-19 08:31:01 +03:00
nixpkgs/nixos/tests/chrony-ptp.nix
2025-07-04 20:58:28 +08:00

24 lines
472 B
Nix

{ lib, ... }:
{
name = "chrony-ptp";
meta.maintainers = with lib.maintainers; [ gkleen ];
nodes.qemuGuest = {
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')
'';
}