add watchdog service

This commit is contained in:
Daniel Barlow
2023-09-02 17:28:40 +01:00
parent 6805e0090d
commit 83092b7b73
5 changed files with 66 additions and 40 deletions

View File

@@ -0,0 +1,24 @@
{ lib, pkgs, config, ...}:
let
inherit (lib) mkOption types;
inherit (pkgs) liminix;
in
{
options = {
system.service.watchdog = mkOption {
type = liminix.lib.types.serviceDefn;
};
};
config.system.service.watchdog = liminix.callService ./watchdog.nix {
watched = mkOption {
description = "services to watch";
type = types.listOf liminix.lib.types.service;
};
headStart = mkOption {
description = "delay in seconds before watchdog starts checking service health";
default = 60;
type = types.int;
};
};
config.kernel.config.WATCHDOG = "y";
}