mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-01 10:07:42 +03:00
25 lines
491 B
Nix
25 lines
491 B
Nix
import ./make-test-python.nix ({ lib, ... }:
|
|
{
|
|
name = "chrony-ptp";
|
|
|
|
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')
|
|
'';
|
|
})
|