enum instead of str for checker types, use "lego-monitoring" instead of "service" bin name

This commit is contained in:
Alex Tau 2025-04-30 17:24:52 +03:00
parent ffdd0429b3
commit 19ee6f487b
3 changed files with 7 additions and 4 deletions

View file

@ -12,7 +12,10 @@ package:
enable = lib.mkEnableOption "lego-monitoring service.";
enabledCheckerSets = lib.mkOption {
type = lib.types.listOf lib.types.str;
type = lib.types.listOf (lib.types.enum [
"start"
"stop"
]);
default = [ ];
description = "List of enabled checker sets. Each checker set is a module which checks something and generates alerts based on check results.";
};
@ -43,7 +46,7 @@ package:
systemd.services.lego-monitoring = {
name = "lego-monitoring.service";
description = "Lego-monitoring service";
script = "${package}/bin/service -c ${serviceConfigFile}";
script = "${package}/bin/lego-monitoring -c ${serviceConfigFile}";
wantedBy = [ "multi-user.target" ];
};
};