0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-19 16:40:32 +03:00
nixpkgs/nixos/tests/chrony-ptp.nix

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

25 lines
472 B
Nix
Raw Normal View History

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