liminix/modules/watchdog/default.nix

25 lines
615 B
Nix
Raw Normal View History

2023-09-02 16:28:40 +00:00
{ 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";
}