1{ lib, ... }:
2{
3 name = "watchdogd";
4 meta.maintainers = with lib.maintainers; [ vifino ];
5
6 nodes.machine =
7 { pkgs, ... }:
8 {
9 virtualisation.qemu.options = [
10 "-device i6300esb" # virtual watchdog timer
11 ];
12 boot.kernelModules = [ "i6300esb" ];
13 services.watchdogd.enable = true;
14 services.watchdogd.settings = {
15 supervisor.enabled = true;
16 };
17 };
18
19 testScript = ''
20 machine.wait_for_unit("watchdogd.service")
21
22 assert "i6300ESB" in machine.succeed("watchdogctl status")
23 machine.succeed("watchdogctl test")
24 '';
25}