diff --git a/README.md b/README.md index 2379e42..17abc5c 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ EINTOPF_AUTHORIZATION_TOKEN=foobar23 services.mail-quota-warning = { enable = true; settings = { - EINTOPF_URL = "https://karlsunruh.eintopf.info"; - RADAR_GROUP_ID = "436012"; + CHECK_INTERVAL_DAYS = 7; + QUOTA_WARNING_THRESHOLD_PERCENT = 80; }; secrets = [ /etc/mail-quota-warning-secrets.yml ]; }; @@ -64,8 +64,7 @@ Replace setting variables according to your setup. ``` cd mail-quota-warning nix develop -export EINTOPF_URL = "https://karlsunruh.eintopf.info" -export EINTOPF_AUTHORIZATION_TOKEN = "secret key" -export RADAR_GROUP_ID = "436012" +export CHECK_INTERVAL_DAYS=7 +export QUOTA_WARNING_THRESHOLD_PERCENT=80 nix run ``` diff --git a/module.nix b/module.nix index 67061ed..9b21493 100644 --- a/module.nix +++ b/module.nix @@ -19,32 +19,34 @@ in settings = lib.mkOption { type = lib.types.submodule { - freeformType = with lib.types; attrsOf types.str; + freeformType = with lib.types; attrsOf types.str types.int; options = { CHECK_INTERVAL_DAYS = lib.mkOption { default = 7; type = lib.types.int; description = '' - Base URL of the target Eintopf host. + Interval of days in which a warning message will be + delivered. ''; }; QUOTA_WARNING_THRESHOLD_PERCENT = lib.mkOption { default = 80; type = lib.types.int; description = '' - Radar group ID which events to sync. + Threshold of used mailbox space in percent after which + a warning message will be delivered. ''; }; }; }; default = {}; description = '' - Extra options which should be used by the Radar sync script. + Extra options which should be used by the mailbox quota warning script. ''; example = lib.literalExpression '' { - EINTOPF_URL = "eintopf.info"; - QUOTA_WARNING_RADAR_GROUP_ID = "436012"; + CHECK_INTERVAL_DAYS = 7; + QUOTA_WARNING_THRESHOLD_PERCENT = 80; } ''; };