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

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

24 lines
610 B
Nix
Raw Normal View History

{ lib, ... }:
{
name = "chrony";
2023-08-10 02:02:33 +02:00
meta.maintainers = with lib.maintainers; [ fpletz ];
2023-08-10 02:02:33 +02:00
nodes.machine = {
services.chrony.enable = true;
specialisation.hardened.configuration = {
services.chrony.enableMemoryLocking = true;
2023-08-10 02:02:33 +02:00
};
};
2023-08-10 02:02:33 +02:00
testScript = ''
machine.start()
machine.wait_for_unit('multi-user.target')
machine.succeed('systemctl is-active chronyd.service')
machine.succeed('/run/booted-system/specialisation/hardened/bin/switch-to-configuration test')
machine.succeed('systemctl restart chronyd.service')
machine.wait_for_unit('chronyd.service')
'';
}