prepare config for healthchecks integration

This commit is contained in:
Alex Tau 2025-08-13 16:59:23 +03:00
parent 4558cf9e6f
commit c01ab8303c
8 changed files with 89 additions and 34 deletions

View file

@ -50,14 +50,32 @@ in
* vulnix -- periodically scans system for known CVEs, alerts if any are found (NixOS only)'';
};
telegram = {
credsSecretPath = lib.mkOption {
type = lib.types.str;
description = "Path to a file containing Telegram api_id, api_hash, and bot token, separated by the `,` character.";
alertChannels = {
telegram = {
enable = lib.mkEnableOption "Telegram notification channel";
credsSecretPath = lib.mkOption {
type = lib.types.str;
default = "";
description = "Path to a file containing Telegram api_id, api_hash, and bot token, separated by the `,` character.";
};
roomId = lib.mkOption {
type = lib.types.int;
default = 0;
description = "ID of chat where to send alerts.";
};
};
roomId = lib.mkOption {
type = lib.types.int;
description = "ID of chat where to send alerts.";
healthchecks = {
enable = lib.mkEnableOption "[Healthchecks](https://healthchecks.io) notification channel";
pingingKeysSecretPath = lib.mkOption {
type = lib.types.str;
default = "";
description = ''
Path to a file containing the pinging keys in a `slug:key` format, one on each line (ex: `lego-cpu:aaaaaaaaaaaaaaaaaaaaaa`).
Specify `default` as the slug to use this key for check types that don't have a key explicitly assigned to them.
If you are unsure of the exact slug a check will generate, it is recommended to try it out with the default key first, before
assigning a specific one.'';
};
};
};