mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Make [notifications.pushover] optional for non-pushover methods
The pushover config section is now only required when notifications.method is "pushover". Validation at startup rejects the missing-section case so a misconfiguration fails fast instead of erroring on every notification. Updates the sample TOML, README and nix module for consistency. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
6c4f8c22bb
commit
be2a8fce58
@@ -111,15 +111,23 @@ in {
|
||||
description = "Send a notification if a device comes back online after not being seen for this timeframe.";
|
||||
default = "1w";
|
||||
};
|
||||
notifications.pushover.token = mkOption {
|
||||
type = types.str;
|
||||
description = "Your pushover token goes here, just copy&paste from their website after creating the app.";
|
||||
default = "";
|
||||
};
|
||||
notifications.pushover.user_key = mkOption {
|
||||
type = types.str;
|
||||
description = "User key goes here, this is the account wide code for pushover.";
|
||||
default = "";
|
||||
notifications.pushover = mkOption {
|
||||
type = types.nullOr (types.submodule {
|
||||
options = {
|
||||
token = mkOption {
|
||||
type = types.str;
|
||||
description = "Your pushover token goes here, just copy&paste from their website after creating the app.";
|
||||
default = "";
|
||||
};
|
||||
user_key = mkOption {
|
||||
type = types.str;
|
||||
description = "User key goes here, this is the account wide code for pushover.";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
});
|
||||
description = "Pushover credentials. Only required when notifications.method is \"pushover\"; leave it null (the default) for any other method.";
|
||||
default = null;
|
||||
};
|
||||
retention.window = mkOption {
|
||||
type = types.str;
|
||||
|
||||
Reference in New Issue
Block a user