nixpkgs/nixos/tests/watchdogd.nix

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

26 lines
586 B
Nix
Raw Permalink Normal View History

{ lib, ... }:
{
name = "watchdogd";
meta.maintainers = with lib.maintainers; [ vifino ];
2024-01-19 23:38:27 +01:00
nodes.machine =
{ pkgs, ... }:
{
virtualisation.qemu.options = [
"-device i6300esb" # virtual watchdog timer
];
boot.kernelModules = [ "i6300esb" ];
services.watchdogd.enable = true;
services.watchdogd.settings = {
supervisor.enabled = true;
2024-01-19 23:38:27 +01:00
};
};
2024-01-19 23:38:27 +01:00
testScript = ''
machine.wait_for_unit("watchdogd.service")
2024-01-19 23:38:27 +01:00
assert "i6300ESB" in machine.succeed("watchdogctl status")
machine.succeed("watchdogctl test")
'';
}