vuls: init at 0.27.0
[NixPkgs.git] / nixos / tests / chrony.nix
blob2dcc363728bebf778cf1c097ee446f2cc9314c5c
1 import ./make-test-python.nix ({ lib, ... }:
3   name = "chrony";
5   meta = {
6     maintainers = with lib.maintainers; [ fpletz ];
7   };
9   nodes = {
10     machine = {
11       services.chrony.enable = true;
13       specialisation.hardened.configuration = {
14         services.chrony.enableMemoryLocking = true;
15         environment.memoryAllocator.provider = "graphene-hardened";
16         # dhcpcd privsep is incompatible with graphene-hardened
17         networking.useNetworkd = true;
18       };
19     };
20   };
22   testScript = ''
23     machine.start()
24     machine.wait_for_unit('multi-user.target')
25     machine.succeed('systemctl is-active chronyd.service')
26     machine.succeed('/run/booted-system/specialisation/hardened/bin/switch-to-configuration test')
27     machine.succeed('systemctl restart chronyd.service')
28     machine.wait_for_unit('chronyd.service')
29   '';